Skip to content

Commit

Permalink
clean settings
Browse files Browse the repository at this point in the history
  • Loading branch information
TodePond committed Jan 17, 2025
1 parent 7906737 commit ba1736b
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 45 deletions.
84 changes: 44 additions & 40 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,40 +45,44 @@
<dialog id="settings-dialog">
<h1>Settings</h1>
<form method="dialog">
<p>
<label for="settings-username">
<span>Username:</span>
<input type="text" id="settings-username" data-1p-ignore spellcheck="false" />
</label>
</p>
<br />
<p>
<label>
<input type="checkbox" id="settings-strudel-enabled" />
Enable strudel
</label>
</p>
<p>
<label>
<input type="checkbox" id="settings-hydra-enabled" />
Enable hydra
</label>
</p>
<p>
<label>
<input type="checkbox" id="settings-shader-enabled" />
Enable shader
</label>
</p>
<p>
<label>
<input type="checkbox" id="settings-kabelsalat-enabled" />
Enable kabelsalat
</label>
</p>
<br />
<section>
<h2>Nudel appearance</h2>
<h3>User settings</h3>
<p>
<label for="settings-username" style="display: flex; align-items: center">
<span>Username</span>
<input type="text" id="settings-username" data-1p-ignore spellcheck="false" style="flex-grow: 1" />
</label>
</p>
</section>
<section>
<h3>Panel types</h3>
<p>
<label>
<input type="checkbox" id="settings-strudel-enabled" />
Enable strudel
</label>
</p>
<p>
<label>
<input type="checkbox" id="settings-hydra-enabled" />
Enable hydra
</label>
</p>
<p>
<label>
<input type="checkbox" id="settings-shader-enabled" />
Enable shader
</label>
</p>
<p>
<label>
<input type="checkbox" id="settings-kabelsalat-enabled" />
Enable kabelsalat
</label>
</p>
</section>
<section>
<h3>Nudel appearance</h3>
<p>
<label>
Layout
Expand All @@ -97,11 +101,11 @@ <h2>Nudel appearance</h2>
</p>
</section>
<section>
<h2>Editor settings</h2>
<h3>Editor settings</h3>
<p>
<label>
<input type="checkbox" id="settings-vim-mode" />
Vim keybindings
<input type="checkbox" id="settings-line-numbers" />
Line numbers
</label>
</p>
<p>
Expand All @@ -112,14 +116,14 @@ <h2>Editor settings</h2>
</p>
<p>
<label>
<input type="checkbox" id="settings-line-numbers" />
Line numbers
<input type="checkbox" id="settings-close-brackets" />
Auto-closing brackets
</label>
</p>
<p>
<label>
<input type="checkbox" id="settings-close-brackets" />
Auto-closing brackets
<input type="checkbox" id="settings-vim-mode" />
Vim keybindings
</label>
</p>
</section>
Expand Down
10 changes: 5 additions & 5 deletions src/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,9 @@ panelModeSelectBurger?.addEventListener('change', () => {
updateSettings({ panelMode: panelModeSelectBurger.value });
});

if (getSettings().welcomeMessage) {
aboutDialog.showModal();
yesButton.focus();
}
// if (getSettings().welcomeMessage) {
// aboutDialog.showModal();
// yesButton.focus();
// }

// settingsDialog.showModal();
settingsDialog.showModal();
4 changes: 4 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ dialog::backdrop {
background-color: rgba(0, 0, 0, 0.25);
}

dialog section {
margin: 40px 0;
}

dialog button {
border: none;
}
Expand Down

0 comments on commit ba1736b

Please sign in to comment.