mirror of
https://github.com/unraid/api.git
synced 2026-01-03 15:09:48 -06:00
fix: expired state
This commit is contained in:
@@ -9,28 +9,28 @@ import type { UserProfileLink } from '~/types/userProfile';
|
||||
const accountStore = useAccountStore();
|
||||
const { stateData } = storeToRefs(useServerStore());
|
||||
const links = ref<UserProfileLink[]>([
|
||||
{
|
||||
click: () => accountStore.troubleshoot(),
|
||||
external: true,
|
||||
icon: InformationCircleIcon,
|
||||
text: 'Placeholder Button',
|
||||
},
|
||||
{
|
||||
external: true,
|
||||
href: CONNECT_FORUMS,
|
||||
icon: InformationCircleIcon,
|
||||
text: 'Connect Support Forum',
|
||||
},
|
||||
// {
|
||||
// click: () => accountStore.troubleshoot(),
|
||||
// external: true,
|
||||
// icon: InformationCircleIcon,
|
||||
// text: 'Placeholder Button',
|
||||
// },
|
||||
// {
|
||||
// external: true,
|
||||
// href: CONNECT_FORUMS,
|
||||
// icon: InformationCircleIcon,
|
||||
// text: 'Connect Support Forum',
|
||||
// },
|
||||
]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ul v-if="stateData.error" class="list-reset flex flex-col gap-y-4px -mx-8px mb-4px py-12px px-16px bg-unraid-red/60 rounded">
|
||||
<ul v-if="stateData.error" class="font-semibold list-reset flex flex-col gap-y-4px -mx-8px mb-4px py-12px px-16px text-white bg-unraid-red/90 rounded">
|
||||
<h3 class="text-18px">{{ stateData.heading }}</h3>
|
||||
<p class="text-14px opacity-85">{{ stateData.message }}</p>
|
||||
<p class="text-14px">{{ stateData.message }}</p>
|
||||
<template v-if="links">
|
||||
<li v-for="(link, index) in links" :key="`link_${index}`" class="-mx-8px">
|
||||
<UpcDropdownItem :item="link" />
|
||||
<UpcDropdownItem :item="link" class="text-white" />
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
|
||||
@@ -16,13 +16,13 @@ const uptimeOrExpiredTime = computed(() => {
|
||||
|
||||
const parsedTime = ref<string>('');
|
||||
const formattedTime = computed<string>(() => {
|
||||
return dateFormat((uptimeOrExpiredTime.value).toString());
|
||||
return dateFormat(uptimeOrExpiredTime.value);
|
||||
});
|
||||
|
||||
const countUp = computed<boolean>(() => state.value !== 'TRIAL' && state.value !== 'ENOCONN');
|
||||
|
||||
const output = computed(() => {
|
||||
if (!countUp.value) {
|
||||
if (!countUp.value || state.value === 'EEXPIRED') {
|
||||
return {
|
||||
title: state.value === 'EEXPIRED'
|
||||
? `Trial Key Expired at ${formattedTime.value}`
|
||||
|
||||
@@ -214,6 +214,7 @@ export const useServerStore = defineStore('server', () => {
|
||||
return {
|
||||
actions: [
|
||||
...(!registered.value ? [signInAction] : []),
|
||||
...([purchaseAction, redeemAction]),
|
||||
...(trialExtensionEligible.value ? [trialExtendAction] : []),
|
||||
...(registered.value ? [signOutAction] : []),
|
||||
],
|
||||
@@ -287,7 +288,7 @@ export const useServerStore = defineStore('server', () => {
|
||||
return {
|
||||
actions: [
|
||||
...(!registered.value ? [signInAction] : []),
|
||||
...(registered.value ? [purchaseAction, redeemAction] : []),
|
||||
...([purchaseAction, redeemAction]),
|
||||
...(registered.value ? [signOutAction] : []),
|
||||
],
|
||||
error: true,
|
||||
|
||||
Reference in New Issue
Block a user