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:
19
gui/prompt.html
Normal file
19
gui/prompt.html
Normal 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>
|
||||
Reference in New Issue
Block a user