mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-20 08:52:59 +00:00
refactor: cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -65,8 +65,4 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
input[type="file"] {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user