refactor(web): registration feedback

This commit is contained in:
Zack Spear
2023-11-08 16:15:26 -08:00
parent 051faa06ac
commit fb31fb584b
3 changed files with 15 additions and 6 deletions

View File

@@ -37,6 +37,7 @@ const { t } = useI18n();
const serverStore = useServerStore();
const {
authAction,
dateTimeFormat,
deviceCount,
guid,
@@ -151,7 +152,7 @@ const items = computed((): RegistrationItemProps[] => {
: []),
...(!stateDataError.value && guid.value
? [{
label: t('Key Replacement Eligibility'),
label: t('Transfer License to New Flash'),
component: RegistrationReplaceCheck,
componentProps: { t },
}]
@@ -175,7 +176,7 @@ const items = computed((): RegistrationItemProps[] => {
<UiPageContainer class="max-w-800px">
<UiCardWrapper :increased-padding="true">
<div class="flex flex-col gap-20px sm:gap-24px">
<header class="grid gap-y-16px">
<header class="flex flex-col gap-y-16px">
<h3
class="text-20px md:text-24px font-semibold leading-normal flex flex-row items-center gap-8px"
:class="stateDataError ? 'text-unraid-red' : 'text-green-500'"
@@ -190,6 +191,14 @@ const items = computed((): RegistrationItemProps[] => {
class="prose text-16px leading-relaxed whitespace-normal opacity-75"
v-html="stateData.message"
/>
<span v-if="authAction" class="grow-0">
<BrandButton
:disabled="authAction?.disabled"
:icon="authAction.icon"
:text="t(authAction.text)"
@click="authAction.click()"
/>
</span>
</header>
<dl>
<RegistrationItem

View File

@@ -283,7 +283,7 @@
"Keyfile required to check replacement status": "Keyfile required to check replacement status",
"Unraid {0}": "Unraid {0}",
"OS Update Eligibility": "OS Update Eligibility",
"Key Replacement Eligibility": "Key Replacement Eligibility",
"Transfer License to New Flash": "Transfer License to New Flash",
"Starter": "Starter",
"Unleashed": "Unleashed",
"Lifetime": "Lifetime",

View File

@@ -417,7 +417,7 @@ export const useServerStore = defineStore('server', () => {
],
humanReadable: state.value === 'BASIC' ? 'Basic' : 'Starter',
heading: 'Thank you for choosing Unraid OS!',
message: registered.value && connectPluginInstalled.value
message: !registered.value && connectPluginInstalled.value
? '<p>Register for Connect by signing in to your Unraid.net account</p>'
: guidRegistered.value
? '<p>To support more storage devices as your server grows, click Upgrade Key.</p>'
@@ -432,7 +432,7 @@ export const useServerStore = defineStore('server', () => {
],
humanReadable: 'Plus',
heading: 'Thank you for choosing Unraid OS!',
message: registered.value && connectPluginInstalled.value
message: !registered.value && connectPluginInstalled.value
? '<p>Register for Connect by signing in to your Unraid.net account</p>'
: guidRegistered.value
? '<p>To support more storage devices as your server grows, click Upgrade Key.</p>'
@@ -451,7 +451,7 @@ export const useServerStore = defineStore('server', () => {
? 'Pro'
: (state.value === 'LIFETIME' ? 'Lifetime' : 'Unleashed'),
heading: 'Thank you for choosing Unraid OS!',
message: registered.value && connectPluginInstalled.value
message: !registered.value && connectPluginInstalled.value
? '<p>Register for Connect by signing in to your Unraid.net account</p>'
: '',
};