diff --git a/web/components/UserProfile/UptimeExpire.vue b/web/components/UserProfile/UptimeExpire.vue index 00014e899..1928b4156 100644 --- a/web/components/UserProfile/UptimeExpire.vue +++ b/web/components/UserProfile/UptimeExpire.vue @@ -34,6 +34,8 @@ const countUp = computed(() => { return state.value !== 'TRIAL' && state.value !== 'ENOCONN'; }); +console.debug('[useDateTimeHelper] params', dateTimeFormat.value, props.t, false, time.value, countUp.value); + const { outputDateTimeReadableDiff: readableDiff, outputDateTimeFormatted: formatted, diff --git a/web/store/server.ts b/web/store/server.ts index 0c07f339e..518ffd6b3 100644 --- a/web/store/server.ts +++ b/web/store/server.ts @@ -754,6 +754,7 @@ export const useServerStore = defineStore('server', () => { if (typeof data?.connectPluginInstalled !== 'undefined') { connectPluginInstalled.value = data.connectPluginInstalled; } if (typeof data?.connectPluginVersion !== 'undefined') { connectPluginVersion.value = data.connectPluginVersion; } if (typeof data?.csrf !== 'undefined') { csrf.value = data.csrf; } + if (typeof data?.dateTimeFormat !== 'undefined') { dateTimeFormat.value = data.dateTimeFormat; } if (typeof data?.description !== 'undefined') { description.value = data.description; } if (typeof data?.deviceCount !== 'undefined') { deviceCount.value = data.deviceCount; } if (typeof data?.email !== 'undefined') { email.value = data.email; } diff --git a/web/types/server.ts b/web/types/server.ts index 090a6e0d3..d36ff909e 100644 --- a/web/types/server.ts +++ b/web/types/server.ts @@ -34,6 +34,21 @@ export type ServerOsVersionBranch = 'stable' | 'next' | 'preview' | 'test'; export type ServerconnectPluginInstalled = 'dynamix.unraid.net.plg' | 'dynamix.unraid.net.staging.plg' | 'dynamix.unraid.net.plg_installFailed' | 'dynamix.unraid.net.staging.plg_installFailed' | ''; export type ServerRebootType = 'thirdPartyDriversDownloading' | 'downgrade' | 'update' | ''; +export interface DateFormatOption { + format: string; + display: string; +} + +export interface TimeFormatOption { + format: string; + display: string; +} + +export interface ServerDateTimeFormat { + date: string; + time: string; +} + export interface Server { apiKey?: string; apiVersion?: string; @@ -43,6 +58,7 @@ export interface Server { connectPluginInstalled?: ServerconnectPluginInstalled; connectPluginVersion?: string; csrf?: string; + dateTimeFormat?: ServerDateTimeFormat; description?: string; deviceCount?: number; email?: string; @@ -150,18 +166,3 @@ export interface ServerStateData { error?: ServerStateDataError | boolean; withKey?: boolean; // @todo potentially remove } - -export interface DateFormatOption { - format: string; - display: string; -} - -export interface TimeFormatOption { - format: string; - display: string; -} - -export interface ServerDateTimeFormat { - date: string; - time: string; -}