diff --git a/web/_data/serverState.ts b/web/_data/serverState.ts index 8ec12b1c9..ae2451b1c 100644 --- a/web/_data/serverState.ts +++ b/web/_data/serverState.ts @@ -46,10 +46,10 @@ import type { // '1111-1111-5GDB-123412341234' Starter.key = TkJCrVyXMLWWGKZF6TCEvf0C86UYI9KfUDSOm7JoFP19tOMTMgLKcJ6QIOt9_9Psg_t0yF-ANmzSgZzCo94ljXoPm4BESFByR0K7nyY9KVvU8szLEUcBUT3xC2adxLrAXFNxiPeK-mZqt34n16uETKYvLKL_Sr5_JziG5L5lJFBqYZCPmfLMiguFo1vp0xL8pnBH7q8bYoBnePrAcAVb9mAGxFVPEInSPkMBfC67JLHz7XY1Y_K5bYIq3go9XPtLltJ53_U4BQiMHooXUBJCKXodpqoGxq0eV0IhNEYdauAhnTsG90qmGZig0hZalQ0soouc4JZEMiYEcZbn9mBxPg -const state: ServerState = 'TRIAL'; -const currentFlashGuid = '1111-1111-NUIK-TEST1234ZACK'; // this is the flash drive that's been booted from -const regGuid = '1111-1111-NUIK-TEST1234ZACK'; // this guid is registered in key server -const keyfileBase64 = ''; // @todo raycast download key to base64 +const state: ServerState = 'BASIC'; +const currentFlashGuid = '1111-1111-CFXF-TEST1234ZACK'; // this is the flash drive that's been booted from +const regGuid = '1111-1111-CFXF-TEST1234ZACK'; // this guid is registered in key server +const keyfileBase64 = 'asdf'; // @todo raycast download key to base64 // const randomGuid = `1111-1111-${makeid(4)}-123412341234`; // this guid is registered in key server // const newGuid = `1234-1234-${makeid(4)}-123412341234`; // this is a new USB, not registered diff --git a/web/components/Registration.ce.vue b/web/components/Registration.ce.vue index b4a407fb0..7c36aaf2b 100644 --- a/web/components/Registration.ce.vue +++ b/web/components/Registration.ce.vue @@ -32,6 +32,7 @@ import type { RegistrationItemProps } from '~/types/registration'; import KeyActions from '~/components/KeyActions.vue'; import RegistrationReplaceCheck from '~/components/Registration/ReplaceCheck.vue'; +import RegistrationKeyLinkedStatus from '~/components/Registration/KeyLinkedStatus.vue'; import RegistrationUpdateExpirationAction from '~/components/Registration/UpdateExpirationAction.vue'; import UserProfileUptimeExpire from '~/components/UserProfile/UptimeExpire.vue'; @@ -39,6 +40,8 @@ const { t } = useI18n(); const replaceRenewCheckStore = useReplaceRenewStore(); const serverStore = useServerStore(); + +const { keyLinkedStatus } = storeToRefs(replaceRenewCheckStore); const { computedArray, arrayWarning, @@ -103,7 +106,7 @@ const subheading = computed(() => { const showTrialExpiration = computed((): boolean => state.value === 'TRIAL' || state.value === 'EEXPIRED'); const showUpdateEligibility = computed((): boolean => !!(regExp.value)); const keyInstalled = computed((): boolean => !!(!stateDataError.value && state.value !== 'ENOKEYFILE')); -const showTransferStatus = computed((): boolean => !!(keyInstalled.value && guid.value && !showTrialExpiration.value)); +const showLinkedAndTransferStatus = computed((): boolean => !!(keyInstalled.value && guid.value && !showTrialExpiration.value)); // filter out renew action and only display other key actions…renew is displayed in RegistrationUpdateExpirationAction const showFilteredKeyActions = computed((): boolean => !!(keyActions.value && keyActions.value?.filter(action => !['renew'].includes(action.name)).length > 0)); @@ -189,13 +192,20 @@ const items = computed((): RegistrationItemProps[] => { : t('{0} out of {1} devices', [deviceCount.value, computedRegDevs.value === -1 ? t('unlimited') : computedRegDevs.value]), }] : []), - ...(showTransferStatus.value + ...(showLinkedAndTransferStatus.value ? [{ label: t('Transfer License to New Flash'), component: RegistrationReplaceCheck, componentProps: { t }, }] : []), + ...(regTo.value && showLinkedAndTransferStatus.value + ? [{ + label: t('Linked to Unraid.net account'), + component: RegistrationKeyLinkedStatus, + componentProps: { t }, + }] + : []), ...(showFilteredKeyActions.value ? [{ diff --git a/web/components/Registration/Item.vue b/web/components/Registration/Item.vue index 4127107a9..502ee2f2d 100644 --- a/web/components/Registration/Item.vue +++ b/web/components/Registration/Item.vue @@ -35,7 +35,13 @@ const evenBgColor = computed(() => { class="leading-normal sm:col-span-3" :class="!label && 'sm:col-start-2'" > - + {{ text }}