Skip to content

Commit 1e8b428

Browse files
committed
Fix all Svelte UI warnings
1 parent e4898c8 commit 1e8b428

18 files changed

Lines changed: 39 additions & 37 deletions

src/routes/+page.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@
279279
</p>
280280
<p class="font-system">Come see the unique keyboards we all are making on the Discord server.</p>
281281
<div class="bg-gray-800 inline-flex my-6 py-2 px-4 rounded items-center gap-4">
282-
<img src="{base}/cosmos-icon.png" class="w-12 h-12 rounded-4" />
282+
<img src="{base}/cosmos-icon.png" class="w-12 h-12 rounded-4" alt="" />
283283
<div class="text-left mr-8">
284284
<p class="text-lg">Cosmos Keyboards</p>
285285
<p class="text-gray-400 mt--1">
@@ -336,7 +336,7 @@
336336
Discord server will keep you up to date with the changes.
337337
</p>
338338
<div class="bg-gray-700 inline-flex my-6 py-2 px-4 rounded items-center gap-4">
339-
<img src="{base}/cosmos-icon.png" class="w-12 h-12 rounded-4" />
339+
<img src="{base}/cosmos-icon.png" class="w-12 h-12 rounded-4" alt="" />
340340
<div class="text-left mr-8">
341341
<p class="text-lg">Cosmos Keyboards</p>
342342
<p class="text-gray-400 mt--1">

src/routes/beta/App.svelte

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,18 +724,23 @@
724724
class:selected={$view == 'right'}><Icon name="kb-right" /></button
725725
>
726726
</div>
727+
<!-- svelte-ignore a11y-label-has-associated-control -->
727728
<label class="flex items-center mt-2 mb-4">
728729
<Checkbox small purple basic bind:value={$showGrid} /> Show Grid
729730
</label>
731+
<!-- svelte-ignore a11y-label-has-associated-control -->
730732
<label class="flex items-center my-2">
731733
<Checkbox small purple basic bind:value={$noWall} /> Hide Wall
732734
</label>
735+
<!-- svelte-ignore a11y-label-has-associated-control -->
733736
<label class="flex items-center my-2">
734737
<Checkbox small purple basic bind:value={$noBase} /> Hide Base
735738
</label>
739+
<!-- svelte-ignore a11y-label-has-associated-control -->
736740
<label class="flex items-center my-2">
737741
<Checkbox small purple basic bind:value={$noLabels} /> Hide Labels
738742
</label>
743+
<!-- svelte-ignore a11y-label-has-associated-control -->
739744
<label class="flex items-center my-2">
740745
<Checkbox small purple basic bind:value={$noBlanks} /> Hide Shapers
741746
</label>
@@ -847,7 +852,7 @@
847852
<ViewerLayout {geometry} {darkMode} conf={config} confError={$confError} />
848853
{:else if viewer == 'programming'}
849854
{#if hasLemon}
850-
<ViewerPea {geometry} {darkMode} confError={$confError} bind:fullMatrix />
855+
<ViewerPea {geometry} confError={$confError} bind:fullMatrix />
851856
{:else}
852857
<ViewerMatrix {geometry} {darkMode} confError={$confError} />
853858
{/if}
@@ -1141,7 +1146,7 @@
11411146
<Dialog big on:close={() => (kleView = false)}>
11421147
<span slot="title">KLE Export</span>
11431148
<div slot="content">
1144-
<KleView conf={config} geo={geometry} />
1149+
<KleView geo={geometry} />
11451150
</div>
11461151
</Dialog>
11471152
{/if}

src/routes/beta/lib/ConfError.svelte

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,9 @@ wristRestOrigin,
247247
.errorMsg {
248248
--at-apply: 'absolute text-white m-4 right-[80px] rounded p-4 top-[5%] flex z-40';
249249
}
250-
.errorMsg.custom {
251-
--at-apply: 'top-[10%]';
252-
}
253250
.errorMsg.expand {
254251
--at-apply: 'top-[5%] left-0 right-0 block';
255252
}
256-
.errorMsg.expand.custom {
257-
--at-apply: 'top-[20%] left-0';
258-
}
259253
260254
.expandedMsg + .expandedMsg {
261255
--at-apply: 'pt-2 border-t-2 border-t-white';

src/routes/beta/lib/dialogs/AssemblyView.svelte

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
<Icon size={24} path={mdiChevronLeft} />
7777
Back to Generator
7878
</button>
79-
<img src={modelImg} class="w-full" />
79+
<img src={modelImg} class="w-full" alt="Preview of your keyboard model" />
8080
<p class="my-8">
8181
Your Keyboard arrives pre-assembled, pre-programmed, and ready to immediately start typing on!
8282
</p>
@@ -105,9 +105,13 @@
105105
>
106106
<div>
107107
<div class="flex items-center gap-4 my--1">
108-
<img src={vendor.logo} class="size-12 rounded-2 pointer-events-none flex-none" />
108+
<img src={vendor.logo} class="size-12 rounded-2 pointer-events-none flex-none" alt="" />
109109
<h2 class="text-2xl font-medium my-3 flex-shrink-0">Order from {vendor.name}</h2>
110-
<img src={vendor.banner} class="h-12 pointer-events-none flex-grow self-start flex-grow-0" />
110+
<img
111+
src={vendor.banner}
112+
class="h-12 pointer-events-none flex-grow self-start flex-grow-0"
113+
alt=""
114+
/>
111115
</div>
112116
<p class="my-3 text-justify">{vendor.description}</p>
113117
<p class="my-3 text-gray-600 dark:text-gray-400">

src/routes/beta/lib/dialogs/ConnectorsView.svelte

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,6 @@
172172
.button {
173173
--at-apply: 'bg-slate-300 dark:bg-gray-900 hover:bg-teal-500 dark:hover:bg-pink-700 dark:text-white font-bold py-2 px-4 rounded focus:outline-none border border-transparent focus:border-pink-500 flex items-center gap-2';
174174
}
175-
.button2 {
176-
--at-apply: 'bg-slate-300 dark:bg-purple-900 hover:bg-teal-500 dark:hover:bg-pink-700 dark:text-white font-bold py-1 px-1 rounded focus:outline-none border border-transparent focus:border-pink-500 flex items-center gap-2';
177-
}
178175
.button-thin {
179176
--at-apply: 'bg-slate-300 dark:bg-gray-900 hover:bg-teal-500 dark:hover:bg-pink-700 dark:text-white font-bold py-1 px-1 rounded focus:outline-none border border-transparent focus:border-pink-500 flex items-center gap-2';
180177
}

src/routes/beta/lib/dialogs/KleView.svelte

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<script lang="ts">
2-
import type { Cuttleform, FullCuttleform } from '$lib/worker/config'
32
import { download } from '$lib/browser'
43
import { toKLE } from '../firmware/kle'
54
import type { FullGeometry } from '../viewers/viewer3dHelpers'
65
7-
export let conf: FullCuttleform
86
export let geo: FullGeometry
97
108
function downloadKLE() {

src/routes/beta/lib/editor/SelectMicrocontrollerInner.svelte

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
>
4545
<div use:melt={$arrow} />
4646
<div class="px-6 py-4 max-w-80 cosmosprofileinfo">
47-
<img src={ucURL(option.key)} class="w-72 h-36 mx-auto" />
47+
<img src={ucURL(option.key)} class="w-72 h-36 mx-auto" alt="" />
4848

4949
{#if boardProps.soldByCosmos}
5050
<p
@@ -97,8 +97,4 @@
9797
.cosmos .requirements {
9898
--at-apply: 'bg-purple-300';
9999
}
100-
101-
img.disable {
102-
opacity: 40%;
103-
}
104100
</style>

src/routes/beta/lib/editor/SelectProfileInner.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
<img
5050
src={thumbURL(option.key)}
5151
class="size-4 inline mr-1 align-baseline pointer-events-none light:(filter-invert opacity-60)"
52+
alt=""
5253
/>
5354
<span>{option.label}</span>
5455
</div>
@@ -68,7 +69,7 @@
6869
transition:fly={{ x: flyAmount }}
6970
>
7071
{#each allProfiles as prof}
71-
<img src={profileURL(prof)} class="size-16" class:disable={prof != option.key} />
72+
<img src={profileURL(prof)} class="size-16" class:disable={prof != option.key} alt="" />
7273
{/each}
7374
</div>
7475
</div>

src/routes/beta/lib/editor/SelectProfileLabel.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
<img
1313
src={thumbURL(option.value)}
1414
class="size-4 inline mr-0.5 align-baseline pointer-events-none light:(filter-invert opacity-60)"
15+
alt=""
1516
/>
1617
<span>{option.label}</span>

src/routes/beta/lib/editor/ShapingSection.svelte

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
</tr>
5555
<tr>
5656
<th />
57-
<th class="font-normal pb-0.5 pl-4 text-left {staggerStyle[0]}" :>Thumb</th>
57+
<th class="font-normal pb-0.5 pl-4 text-left {staggerStyle[0]}">Thumb</th>
5858
<th class="font-normal pb-0.5 pl-4 text-left {staggerStyle[1]}">Index</th>
5959
<th class="font-normal pb-0.5 pl-4 text-left {staggerStyle[2]}">Middle</th>
6060
<th class="font-normal pb-0.5 pl-4 text-left {staggerStyle[3]}">Ring</th>
@@ -125,10 +125,6 @@
125125
--at-apply: 'appearance-none w-[5.45rem] rounded ml-2.5 input-basic text-ellipsis';
126126
}
127127
128-
input:focus + div > div {
129-
--at-apply: 'border-teal-500';
130-
}
131-
132128
.preset {
133129
--at-apply: 'bg-[#99F0DC] dark:bg-gray-900 hover:bg-teal-500 dark:hover:bg-teal-700 dark:text-white py-1 px-4 rounded focus:outline-none border border-transparent focus:border-teal-500 mb-2';
134130
}

0 commit comments

Comments
 (0)