diff --git a/web/locales/en_US.json b/web/locales/en_US.json index 807c7dfaec..0bd2ccf220 100644 --- a/web/locales/en_US.json +++ b/web/locales/en_US.json @@ -23,6 +23,10 @@ "

To support more storage devices as your server grows, click Upgrade Key.

": "

To support more storage devices as your server grows, click Upgrade Key.

", "

You have used all your Trial extensions. To continue using Unraid OS you may purchase a license key.

": "

You have used all your Trial extensions. To continue using Unraid OS you may purchase a license key.

", "

Your Trial key includes all the functionality and device support of an Unleashed key.

After your Trial has reached expiration, your server still functions normally until the next time you Stop the array or reboot your server.

At that point you may either purchase a license key or request a Trial extension.

": "

Your Trial key includes all the functionality and device support of an Unleashed key.

After your Trial has reached expiration, your server still functions normally until the next time you Stop the array or reboot your server.

At that point you may either purchase a license key or request a Trial extension.

", + "

Your Trial key includes all the functionality and device support of an Unleashed key.

When your Trial expires, the array will stop. At that point you may either purchase a license key or request a Trial extension.

": "

Your Trial key includes all the functionality and device support of an Unleashed key.

When your Trial expires, the array will stop. At that point you may either purchase a license key or request a Trial extension.

", + "

Your Trial key includes all the functionality and device support of an Unleashed key.

Your trial is expiring soon. When it expires, the array will stop. You may extend your trial now, purchase a license key, or wait until expiration to take action.

": "

Your Trial key includes all the functionality and device support of an Unleashed key.

Your trial is expiring soon. When it expires, the array will stop. You may extend your trial now, purchase a license key, or wait until expiration to take action.

", + "

Your Trial key includes all the functionality and device support of an Unleashed key.

Your trial is expiring soon and you have used all available extensions. When it expires, the array will stop. To continue using Unraid OS, you must purchase a license key.

": "

Your Trial key includes all the functionality and device support of an Unleashed key.

Your trial is expiring soon and you have used all available extensions. When it expires, the array will stop. To continue using Unraid OS, you must purchase a license key.

", + "

Your Trial key includes all the functionality and device support of an Unleashed key.

You have used all available trial extensions. When your Trial expires, the array will stop. To continue using Unraid OS after expiration, you must purchase a license key.

": "

Your Trial key includes all the functionality and device support of an Unleashed key.

You have used all available trial extensions. When your Trial expires, the array will stop. To continue using Unraid OS after expiration, you must purchase a license key.

", "

Your license key file is corrupted or missing. The key file should be located in the /config directory on your USB Flash boot device.

If you do not have a backup copy of your license key file you may attempt to recover your key.

If this was an expired Trial installation, you may purchase a license key.

": "

Your license key file is corrupted or missing. The key file should be located in the /config directory on your USB Flash boot device.

If you do not have a backup copy of your license key file you may attempt to recover your key.

If this was an expired Trial installation, you may purchase a license key.

", "

Your license key file is corrupted or missing. The key file should be located in the /config directory on your USB Flash boot device.

You may attempt to recover your key with your Unraid.net account.

If this was an expired Trial installation, you may purchase a license key.

": "

Your license key file is corrupted or missing. The key file should be located in the /config directory on your USB Flash boot device.

You may attempt to recover your key with your Unraid.net account.

If this was an expired Trial installation, you may purchase a license key.

", "

Your server will not be usable until you purchase a Registration key or install a free 30 day Trial key. A Trial key provides all the functionality of an Unleashed Registration key.

Registration keys are bound to your USB Flash boot device serial number (GUID). Please use a high quality name brand device at least 1GB in size.

Note: USB memory card readers are generally not supported because most do not present unique serial numbers.

Important:

": "

Your server will not be usable until you purchase a Registration key or install a free 30 day Trial key. A Trial key provides all the functionality of an Unleashed Registration key.

Registration keys are bound to your USB Flash boot device serial number (GUID). Please use a high quality name brand device at least 1GB in size.

Note: USB memory card readers are generally not supported because most do not present unique serial numbers.

Important:

", diff --git a/web/store/server.ts b/web/store/server.ts index 313be3061d..17d834a981 100644 --- a/web/store/server.ts +++ b/web/store/server.ts @@ -495,6 +495,7 @@ export const useServerStore = defineStore('server', () => { }); let messageEGUID = ''; + let trialMessage = ''; const stateData = computed((): ServerStateData => { switch (state.value) { case 'ENOKEYFILE': @@ -510,16 +511,26 @@ export const useServerStore = defineStore('server', () => { '

Choose an option below, then use our Getting Started Guide to configure your array in less than 15 minutes.

', }; case 'TRIAL': + if (trialExtensionEligibleInsideRenewalWindow.value) { + trialMessage = '

Your Trial key includes all the functionality and device support of an Unleashed key.

Your trial is expiring soon. When it expires, the array will stop. You may extend your trial now, purchase a license key, or wait until expiration to take action.

'; + } else if (trialExtensionIneligibleInsideRenewalWindow.value) { + trialMessage = '

Your Trial key includes all the functionality and device support of an Unleashed key.

Your trial is expiring soon and you have used all available extensions. When it expires, the array will stop. To continue using Unraid OS, you must purchase a license key.

'; + } else if (trialExtensionEligibleOutsideRenewalWindow.value) { + trialMessage = '

Your Trial key includes all the functionality and device support of an Unleashed key.

When your Trial expires, the array will stop. At that point you may either purchase a license key or request a Trial extension.

'; + } else { // would be trialExtensionIneligibleOutsideRenewalWindow if it wasn't an else conditionally + trialMessage = '

Your Trial key includes all the functionality and device support of an Unleashed key.

You have used all available trial extensions. When your Trial expires, the array will stop. To continue using Unraid OS after expiration, you must purchase a license key.

'; + } + return { actions: [ ...(!registered.value && connectPluginInstalled.value ? [signInAction.value] : []), ...[purchaseAction.value, redeemAction.value], + ...(trialExtensionEligibleInsideRenewalWindow.value ? [trialExtendAction.value] : []), ...(registered.value && connectPluginInstalled.value ? [signOutAction.value] : []), ], humanReadable: 'Trial', heading: 'Thank you for choosing Unraid OS!', - message: - '

Your Trial key includes all the functionality and device support of an Unleashed key.

After your Trial has reached expiration, your server still functions normally until the next time you Stop the array or reboot your server.

At that point you may either purchase a license key or request a Trial extension.

', + message: trialMessage, }; case 'EEXPIRED': return { @@ -773,6 +784,18 @@ export const useServerStore = defineStore('server', () => { return stateData.value.actions.filter((action) => !authActionsNames.includes(action.name)); }); const trialExtensionEligible = computed(() => !regGen.value || regGen.value < 2); + const trialWithin5DaysOfExpiration = computed(() => { + if (!expireTime.value || state.value !== 'TRIAL') { + return false; + } + const today = dayjs(); + const expirationDate = dayjs(expireTime.value); + const daysUntilExpiration = expirationDate.diff(today, 'day'); + return daysUntilExpiration <= 5 && daysUntilExpiration >= 0; + }); + const trialExtensionEligibleInsideRenewalWindow = computed(() => trialExtensionEligible.value && trialWithin5DaysOfExpiration.value); + const trialExtensionEligibleOutsideRenewalWindow = computed(() => trialExtensionEligible.value && !trialWithin5DaysOfExpiration.value); + const trialExtensionIneligibleInsideRenewalWindow = computed(() => !trialExtensionEligible.value && trialWithin5DaysOfExpiration.value); const serverConfigError = computed((): Error | undefined => { if (!config.value?.valid && config.value?.error) {