fix: regTm format after key install without page refresh

This commit is contained in:
Zack Spear
2024-01-29 16:08:41 -08:00
committed by Zack Spear
parent f1059aa381
commit 90b1432875

View File

@@ -55,7 +55,17 @@ const {
stateDataError,
} = storeToRefs(serverStore);
const { outputDateTimeFormatted: formattedRegTm } = useDateTimeHelper(dateTimeFormat.value, t, false, regTm.value);
const formattedRegTm = ref<any>();
/**
* regTm may not have a value until we get a response from the refreshServerState action
* So we need to watch for this value to be able to format it based on the user's date time preferences.
*/
watch(regTm, (newV) => {
if (!newV) { return; }
const { outputDateTimeFormatted } = useDateTimeHelper(dateTimeFormat.value, t, false, regTm.value);
formattedRegTm.value = outputDateTimeFormatted.value;
});
const devicesAvailable = computed((): number => {
switch (regTy.value) {