1
0
Files
auto-git-gui/settings.html
Victor Giers e5add84869 auto-git:
[change] settings.html
2025-05-24 05:50:37 +02:00

125 lines
3.3 KiB
HTML

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Einstellungen</title>
<style>
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden; /* keine Scrollbars */
display: flex;
align-items: center; /* vertikal zentrieren */
justify-content: center; /* horizontal zentrieren */
background: rgba(0,0,0,0.1);/* halbtransparenter Untergrund */
font-family: sans-serif;
-webkit-user-select: none;
user-select: none;
}
.dialog {
border: 2px solid #fbcfe8;
border-radius: 8px;
padding: 1rem;
width: 100%; /* 90% der Fensterbreite */
height: 100%;
box-sizing: border-box;
background: white;
position: relative;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
}
.header h1 {
font-size: 1.25rem;
margin: 0;
}
.close-btn {
background: transparent;
border: none;
font-size: 1.25rem;
cursor: pointer;
color: #9f1239;
}
.options {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.option {
display: flex;
align-items: center;
}
.option input[type="checkbox"] {
margin-left: 1.5rem;
margin-right: 0.5rem;
}
.buttons {
margin-top: 1rem;
display: flex;
justify-content: flex-end;
gap: 0.5rem;
}
button {
padding: 0.4rem 0.8rem;
border-radius: 4px;
border: 1px solid #ccc;
background: white;
cursor: pointer;
}
button:hover { background: #f3f4f6; }
</style>
<script>
window.addEventListener('DOMContentLoaded', async () => {
const cbSky = document.getElementById('skymode');
const cbSkip = document.getElementById('skipPrompt');
const ok = document.getElementById('okBtn');
const cancel = document.getElementById('cancelBtn');
const close = document.getElementById('closeBtn');
const [initialSky, initialSkip] = await Promise.all([
window.settingsAPI.getSkyMode(),
window.settingsAPI.getSkipPrompt()
]);
cbSky.checked = initialSky;
cbSkip.checked = initialSkip;
ok.addEventListener('click', async () => {
await window.settingsAPI.setSkyMode(cbSky.checked);
await window.settingsAPI.setSkipPrompt(cbSkip.checked);
window.close();
});
cancel.addEventListener('click', () => window.close());
close.addEventListener('click', () => window.close());
});
</script>
</head>
<body>
<div class="dialog">
<div class="header">
<h1>Settings</h1>
<button class="close-btn" id="closeBtn"></button>
</div>
<div class="options">
<label class="option">
<input type="checkbox" id="skymode" />
Sky Mode
</label>
<label class="option">
<input type="checkbox" id="skipPrompt" />
Skip prompt asking to remove .git folder if it has only one commit and no changes
</label>
<!-- Weitere Optionen in Zukunft hier hinzufügen -->
</div>
<div class="buttons">
<button id="cancelBtn">Abbrechen</button>
<button id="okBtn">OK</button>
</div>
</div>
</body>
</html>