Add function to alert user if their API key isnt set and open a popup for user to enter their key

This commit is contained in:
2024-03-09 02:42:30 -05:00
parent 61cf0bd49e
commit 97402a8b1f
5 changed files with 76 additions and 6 deletions

19
gui/prompt.html Normal file
View File

@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<title>Enter API Key</title>
</head>
<body>
<h1>Enter API Key</h1>
<input type="text" id="apiKeyInput" placeholder="API Key">
<button id="submitApiKey">Submit</button>
<script>
const { ipcRenderer } = require('electron');
document.getElementById('submitApiKey').addEventListener('click', () => {
const apiKey = document.getElementById('apiKeyInput').value;
ipcRenderer.send('submit-api-key', apiKey);
});
</script>
</body>
</html>