Refactor settings.html to improve layout and functionality
This commit is contained in:
@@ -65,28 +65,27 @@
|
|||||||
accent-color: var(--accent);
|
accent-color: var(--accent);
|
||||||
flex-shrink: 0; /* <-- das ist wichtig! */
|
flex-shrink: 0; /* <-- das ist wichtig! */
|
||||||
}
|
}
|
||||||
.row {
|
.row {
|
||||||
display: flex;
|
display: flex; align-items: center; justify-content: space-between;
|
||||||
align-items: center;
|
}
|
||||||
gap: 0.7em;
|
.row > span {
|
||||||
margin-bottom: 0.5em;
|
flex: 1;
|
||||||
}
|
color: #1e293b;
|
||||||
.row > span {
|
font-weight: 600;
|
||||||
flex: 2;
|
}
|
||||||
font-size: 0.97rem;
|
.row > input,
|
||||||
color: #1e293b;
|
.row > select {
|
||||||
}
|
/* wenn Du es schmaler willst: */
|
||||||
.row > select {
|
min-width: 80px;
|
||||||
flex: 1;
|
max-width: 180px;
|
||||||
min-width: 110px;
|
padding: 0.4em 0.4em;
|
||||||
max-width: 180px;
|
border: 1.2px solid #cbd5e1;
|
||||||
padding: 0.4em 0.6em;
|
border-radius: 6px;
|
||||||
border: 1.2px solid #cbd5e1;
|
background: #f8fafc;
|
||||||
border-radius: 6px;
|
color: #334155;
|
||||||
background: #f8fafc;
|
font-size: 0.9rem;
|
||||||
color: #334155;
|
transition: border-color 0.2s, box-shadow 0.2s;
|
||||||
font-size: 0.97rem;
|
}
|
||||||
}
|
|
||||||
.row > input:focus,
|
.row > input:focus,
|
||||||
.row > select:focus {
|
.row > select:focus {
|
||||||
box-shadow: 0 0 0 2px rgba(56,189,248,0.3);
|
box-shadow: 0 0 0 2px rgba(56,189,248,0.3);
|
||||||
@@ -143,7 +142,7 @@
|
|||||||
color: #334155;
|
color: #334155;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>≈
|
<script>
|
||||||
window.addEventListener('DOMContentLoaded', async () => {
|
window.addEventListener('DOMContentLoaded', async () => {
|
||||||
const isSky = await window.settingsAPI.getSkyMode();
|
const isSky = await window.settingsAPI.getSkyMode();
|
||||||
document.body.classList.toggle('sky-mode', isSky);
|
document.body.classList.toggle('sky-mode', isSky);
|
||||||
@@ -237,19 +236,12 @@
|
|||||||
if (!qwen.length) {
|
if (!qwen.length) {
|
||||||
// keine qwen2.5-coder → Pull-Buttons
|
// keine qwen2.5-coder → Pull-Buttons
|
||||||
container.innerHTML = `
|
container.innerHTML = `
|
||||||
<div class="row">
|
<button id="pullCommitModelBtn" style="margin-bottom:8px;">
|
||||||
<span>Model for commit message generation:</span>
|
ollama pull qwen2.5-coder:7b
|
||||||
<select id="commitModelSelect">
|
</button><br>
|
||||||
${makeOpts(qwen, currentCommit)}
|
<button id="pullReadmeModelBtn">
|
||||||
</select>
|
ollama pull qwen2.5-coder:32b
|
||||||
</div>
|
</button>`;
|
||||||
<div class="row">
|
|
||||||
<span>Model for README generation:</span>
|
|
||||||
<select id="readmeModelSelect">
|
|
||||||
${makeOpts(qwen, currentReadme)}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
document.getElementById('pullCommitModelBtn').onclick = async () => {
|
document.getElementById('pullCommitModelBtn').onclick = async () => {
|
||||||
await window.electronAPI.ollamaPull('qwen2.5-coder:7b');
|
await window.electronAPI.ollamaPull('qwen2.5-coder:7b');
|
||||||
location.reload();
|
location.reload();
|
||||||
|
|||||||
Reference in New Issue
Block a user