refactor: cleanup

This commit is contained in:
2023-11-15 01:46:23 +01:00
parent c5d9defc9d
commit 561300de64
10 changed files with 33 additions and 69 deletions

View File

@@ -6,9 +6,9 @@ export const prerender = true
export const trailingSlash = "always"
export const load = (async ({url, data, fetch}) => {
const importFile = new URLSearchParams(url.search).get("import")
const importFile = browser && new URLSearchParams(url.search).get("import")
return {
...data,
importFile: browser && importFile ? await charaFileFromUriComponent(importFile, fetch) : undefined,
importFile: importFile ? await charaFileFromUriComponent(importFile, fetch) : undefined,
}
}) satisfies LayoutLoad

View File

@@ -57,7 +57,16 @@
</div>
</div>
{#if powerDialog}
<div class="backdrop" transition:fade={{duration: 250}} on:click={() => (powerDialog = !powerDialog)} />
<div
class="backdrop"
role="button"
tabindex="-1"
transition:fade={{duration: 250}}
on:click={() => (powerDialog = !powerDialog)}
on:keypress={event => {
if (event.key === "Enter") powerDialog = !powerDialog
}}
/>
<dialog open transition:slide={{duration: 250}}>
<h3>{$LL.deviceManager.bootMenu.TITLE()}</h3>
<button

View File

@@ -34,10 +34,13 @@
<footer>
<ul>
<li>
<a href={HOMEPAGE_URL} rel="noreferrer" target="_blank"><span class="icon">commit</span> v{version}</a>
<!-- svelte-ignore not-defined -->
<a href={import.meta.env.VITE_HOMEPAGE_URL} rel="noreferrer" target="_blank"
><span class="icon">commit</span> v{version}</a
>
</li>
<li>
<a href={BUGS_URL} rel="noreferrer" target="_blank"
<a href={import.meta.env.VITE_BUGS_URL} rel="noreferrer" target="_blank"
><span class="icon">bug_report</span> File an issue</a
>
</li>

View File

@@ -65,8 +65,4 @@
width: 100%;
height: 100%;
}
input[type="file"] {
display: none;
}
</style>

View File

@@ -97,7 +97,7 @@
</fieldset>
<fieldset>
<legend><label>Device</label></legend>
<legend>Device</legend>
<label>Boot message<input type="checkbox" use:setting={{id: 93}} /></label>
<label>Realtime Feedback<input type="checkbox" use:setting={{id: 92}} /></label>
<label>
@@ -118,7 +118,7 @@
<fieldset>
<legend><label><input type="checkbox" />RGB</label></legend>
<label>Brightness<input type="range" min="0" max="50" step="1" /></label>
<label>Color</label>
Color
<label>Reactive Keys<input type="checkbox" /></label>
</fieldset>
{/if}
@@ -141,10 +141,6 @@
legend > label {
font-size: 24px;
font-weight: bold;
> input {
font-size: 12px;
}
}
fieldset {
@@ -230,6 +226,7 @@
}
}
// stylelint-disable-next-line
form label:has(:global(.pending-changes)) {
color: var(--md-sys-color-tertiary);
}