Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions web/components/Activation/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ const description = computed<string>(() =>
const docsButtons = computed<BrandButtonProps[]>(() => {
return [
{
btnStyle: 'underline',
variant: 'underline',
external: true,
href: 'https://docs.unraid.net/unraid-os/faq/licensing-faq/',
iconRight: ArrowTopRightOnSquareIcon,
size: '14px',
text: props.t('More about Licensing'),
},
{
btnStyle: 'underline',
variant: 'underline',
external: true,
href: 'https://docs.unraid.net/account/',
iconRight: ArrowTopRightOnSquareIcon,
Expand Down
63 changes: 31 additions & 32 deletions web/components/Activation/Steps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type StepState = 'inactive' | 'active' | 'completed';

withDefaults(
defineProps<{
activeStep: number;
activeStep?: number;
}>(),
{
activeStep: 1,
Expand Down Expand Up @@ -75,44 +75,43 @@ const steps: readonly Step[] = [
<template>
<Stepper :default-value="activeStep" class="text-foreground flex w-full items-start gap-2 text-16px">
<StepperItem
v-for="step in steps"
v-for="(step, index) in steps"
:key="step.step"
v-slot="{ state }: { state: StepState }"
class="relative flex w-full flex-col items-center justify-center"
class="relative flex w-full flex-col items-center justify-center data-[disabled]:opacity-100"
:step="step.step"
:disabled="true"
>
<StepperSeparator
v-if="step.step !== steps[steps.length - 1].step"
class="absolute left-[calc(50%+20px)] right-[calc(-50%+10px)] top-[1.5rem] &block h-0.5 shrink-0 rounded-full bg-muted group-data-[state=completed]:bg-primary"
/>
<StepperTrigger>
<div class="flex items-center justify-center">
<Button
:variant="state === 'completed' ? 'primary' : state === 'active' ? 'primary' : 'outline'"
size="md"
:class="`z-10 rounded-full ${
state !== 'inactive'
? 'ring-2 ring-offset-2 ring-offset-background *:cursor-default ' +
(state === 'completed' ? 'ring-success' : 'ring-primary')
: ''
}`"
:disabled="state === 'inactive'"
>
<component :is="step.icon[state]" class="size-4" />
</Button>
</div>

<StepperTrigger as-child>
<Button
:variant="state === 'completed' || state === 'active' ? 'primary' : 'outline'"
size="md"
:class="`z-10 rounded-full shrink-0 opacity-100 ${
state !== 'inactive'
? 'ring-2 ring-primary ring-offset-2 ring-offset-background *:cursor-default'
: ''
}`"
:disabled="state === 'inactive'"
>
<component :is="step.icon[state]" class="size-4" />
</Button>
<div class="mt-2 flex flex-col items-center text-center">
<StepperTitle
:class="[state === 'active' && 'text-primary']"
class="text-2xs font-semibold transition"
>
{{ step.title }}
</StepperTitle>
<StepperDescription class="text-2xs font-normal">
{{ step.description }}
</StepperDescription>
</div>
</StepperTrigger>

<div class="mt-2 flex flex-col items-center text-center">
<StepperTitle
:class="[state === 'active' && 'text-primary']"
class="text-2xs font-semibold transition"
>
{{ step.title }}
</StepperTitle>
<StepperDescription class="text-2xs font-normal">
{{ step.description }}
</StepperDescription>
</div>
<StepperSeparator v-if="index < steps.length - 1" class="w-[50px] bg-black h-[30px]" />
</StepperItem>
</Stepper>
</template>
2 changes: 0 additions & 2 deletions web/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ const bannerImage = watch(theme, () => {
<ModalsCe />
<hr class="border-black dark:border-white" />
<h3 class="text-lg font-semibold font-mono">WelcomeModalCe</h3>
<!-- <WelcomeModalCe :server="serverState ?? undefined" /> -->
Uncomment the WelcomeModalCe component to test it.
<hr class="border-black dark:border-white" />
<h3 class="text-lg font-semibold font-mono">Test Callback Builder</h3>
<div class="flex flex-col justify-end gap-8px">
Expand Down
3 changes: 3 additions & 0 deletions web/pages/webComponents.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ onBeforeMount(() => {
<hr class="border-black dark:border-white" />
<h3 class="text-lg font-semibold font-mono">SSOSignInButtonCe</h3>
<unraid-sso-button :ssoenabled="serverState.ssoEnabled" />
<hr class="border-black dark:border-white" />
<h3 class="text-lg font-semibold font-mono">ActivationCodeCe</h3>
<unraid-welcome-modal />
</unraid-i18n-host>
<Toaster rich-colors close-button />
</client-only>
Expand Down
14 changes: 14 additions & 0 deletions web/pages/welcome.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script setup lang="ts">
import { useDummyServerStore } from '~/_data/serverState';

import DummyServerSwitcher from '~/components/DummyServerSwitcher.vue';
const serverStore = useDummyServerStore();
const { serverState } = storeToRefs(serverStore);
</script>

<template>
<div class="flex flex-col gap-6 p-6">
<DummyServerSwitcher />
<WelcomeModalCe :server="serverState ?? undefined" />
</div>
</template>
Loading