feat(web): registration too many devices messaging

This commit is contained in:
Zack Spear
2023-09-27 13:47:11 -07:00
committed by Zack Spear
parent e5b51564fd
commit a84b972121
4 changed files with 7 additions and 4 deletions

View File

@@ -29,7 +29,7 @@ const randomGuid = `1111-1111-${makeid(4)}-123412341234`; // this guid is regist
// EBLACKLISTED1
// EBLACKLISTED2
// ENOCONN
const state: ServerState = 'ENOCONN';
const state: ServerState = 'BASIC';
let regTy = '';
switch (state) {
// @ts-ignore
@@ -72,7 +72,7 @@ export const serverState: Server = {
connectPluginInstalled: 'dynamix.unraid.net.staging.plg',
// connectPluginInstalled: '',
description: 'DevServer9000',
deviceCount: 3,
deviceCount: 12,
expireTime,
flashProduct: 'SanDisk_3.2Gen1',
flashVendor: 'USB',

View File

@@ -132,7 +132,9 @@ const items = computed((): RegistrationItemProps[] => {
...(!stateDataError.value ? [{
error: deviceCount.value > devicesAvailable.value,
label: t('Attached Storage Devices'),
text: t('{0} out of {1} devices', [deviceCount.value, devicesAvailable.value > 12 ? t('unlimited') : devicesAvailable.value]),
text: deviceCount.value > devicesAvailable.value
? t('{0} out of {1} allowed devices upgrade your key to support more devices', [deviceCount.value, devicesAvailable.value > 12 ? t('unlimited') : devicesAvailable.value])
: t('{0} out of {1} devices', [deviceCount.value, devicesAvailable.value > 12 ? t('unlimited') : devicesAvailable.value]),
}] : []),
...(!stateDataError.value && guid.value ? [{
label: t('Key Replacement Eligibility'),

View File

@@ -29,7 +29,7 @@ const evenBgColor = computed(() => {
<span>{{ label }}</span>
</dt>
<dd class="leading-normal sm:col-span-2">
<span v-if="text" class="opacity-75 select-all">{{ text }}</span>
<span v-if="text" class="select-all" :class="!error ? 'opacity-75' : ''">{{ text }}</span>
<template v-if="$slots['right']">
<slot name="right"></slot>
</template>

View File

@@ -251,6 +251,7 @@
"Flash Product": "Flash Product",
"Attached Storage Devices": "Attached Storage Devices",
"{0} out of {1} devices": "{0} out of {1} devices",
"{0} out of {1} allowed devices upgrade your key to support more devices": "{0} out of {1} allowed devices upgrade your key to support more devices",
"{0} devices": "{0} devices",
"unlimited": "unlimited",
"Unable to check for updates": "Unable to check for updates",