mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
feat: electron building
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>BetterSEQTA Settings</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
padding: 20px;
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
.container {
|
||||
background: white;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
||||
}
|
||||
h1 {
|
||||
color: #333;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.form-group {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
label {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
color: #555;
|
||||
}
|
||||
input[type="url"] {
|
||||
width: 100%;
|
||||
padding: 8px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
font-size: 16px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
button {
|
||||
background: #4F46E5;
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 10px 20px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
}
|
||||
button:hover {
|
||||
background: #4338CA;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>BetterSEQTA Settings</h1>
|
||||
<div class="form-group">
|
||||
<label for="seqtaUrl">SEQTA Website URL</label>
|
||||
<input type="url" id="seqtaUrl" placeholder="https://your-school.seqta.com.au" required>
|
||||
<button onclick="saveSettings()">Save Settings</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Access electron APIs through the contextBridge
|
||||
const electron = window.require('electron');
|
||||
const { ipcRenderer } = electron;
|
||||
const Store = window.require('electron-store');
|
||||
const store = new Store();
|
||||
|
||||
// Load saved URL on page load
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
console.log('Loading saved URL...');
|
||||
const savedUrl = store.get('seqtaUrl') || '';
|
||||
console.log('Saved URL:', savedUrl);
|
||||
document.getElementById('seqtaUrl').value = savedUrl;
|
||||
});
|
||||
|
||||
// Save settings
|
||||
function saveSettings() {
|
||||
const url = document.getElementById('seqtaUrl').value;
|
||||
console.log('Saving URL:', url);
|
||||
if (url) {
|
||||
ipcRenderer.send('set-seqta-url', url);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user