Skip to content

Commit c2ca6c5

Browse files
committed
fix: type issue
1 parent 02ef571 commit c2ca6c5

File tree

4 files changed

+33
-5
lines changed

4 files changed

+33
-5
lines changed

web/_data/serverState.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ const baseServerState: Server = {
193193
wanFQDN: '',
194194
};
195195

196-
type ServerSelector = 'default' | 'oemActivation';
196+
export type ServerSelector = 'default' | 'oemActivation';
197197
const defaultServer: ServerSelector = 'default';
198198

199199
const servers: Record<ServerSelector, Server> = {

web/components/DevSettings.vue

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<script lang="ts" setup>
2+
import {
3+
Popover,
4+
PopoverContent,
5+
PopoverTrigger,
6+
Button,
7+
} from '@unraid/ui';
8+
9+
import { CogIcon } from '@heroicons/vue/24/solid';
10+
</script>
11+
12+
<template>
13+
<Popover>
14+
<PopoverTrigger as-child>
15+
<Button type="button" variant="icon" class="fixed bottom-4 right-4 rounded-full bg-teal-500 z-50"><CogIcon class="size-6" /></Button>
16+
</PopoverTrigger>
17+
<PopoverContent>
18+
<DummyServerSwitcher />
19+
</PopoverContent>
20+
</Popover>
21+
22+
23+
</template>
24+
25+
<style lang="postcss">
26+
/* Import unraid-ui globals first */
27+
@import '@unraid/ui/styles';
28+
@import '../assets/main.css';
29+
</style>

web/components/DummyServerSwitcher.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<script lang="ts" setup>
22
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@unraid/ui';
3-
import { useDummyServerStore } from '~/_data/serverState';
3+
import { useDummyServerStore, type SelectorState } from '~/_data/serverState';
44
55
const store = useDummyServerStore();
66
const { selector, serverState } = storeToRefs(store);
77
88
const updateSelector = (val: string) => {
9-
selector.value = val;
9+
selector.value = val as SelectorState;
1010
};
1111
</script>
1212

@@ -23,7 +23,7 @@ const updateSelector = (val: string) => {
2323
</SelectTrigger>
2424
<SelectContent>
2525
<SelectItem value="default">Default</SelectItem>
26-
<SelectItem value="oemActivation">OEM Activation</SelectItem>
26+
<SelectItem value="oemActiviation">OEM Activation</SelectItem>
2727
</SelectContent>
2828
</Select>
2929
</div>

web/pages/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ onMounted(() => {
8383
<client-only>
8484
<div class="flex flex-col gap-6 p-6">
8585
<DummyServerSwitcher />
86-
<DevSettings />
8786
<ColorSwitcherCe />
8887
<h2 class="text-xl font-semibold font-mono">Vue Components</h2>
8988
<h3 class="text-lg font-semibold font-mono">UserProfileCe</h3>

0 commit comments

Comments
 (0)