From 9b9a6998b783f5786d4ffa376a3775996ef7751f Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Tue, 7 Nov 2023 10:17:07 -0800 Subject: [PATCH] refactor(web): update page redirect --- web/components/UpdateOs.ce.vue | 61 ++++++++++++++++++++++ web/components/UpdateOs/CallbackButton.vue | 12 ----- 2 files changed, 61 insertions(+), 12 deletions(-) diff --git a/web/components/UpdateOs.ce.vue b/web/components/UpdateOs.ce.vue index 82afe8c9b..1762084ef 100644 --- a/web/components/UpdateOs.ce.vue +++ b/web/components/UpdateOs.ce.vue @@ -18,6 +18,7 @@ fi import { storeToRefs } from 'pinia'; import { useI18n } from 'vue-i18n'; +import { WEBGUI_TOOLS_UPDATE } from '~/helpers/urls'; import { useUpdateOsActionsStore } from '~/store/updateOsActions'; import 'tailwindcss/tailwind.css'; @@ -34,11 +35,22 @@ const subtitle = computed(() => { } return ''; }); + +/** when we're not prompting for reboot /Tools/Update will automatically send the user to account.unraid.net/server/update-os */ +const showLoader = computed(() => window.location.pathname === WEBGUI_TOOLS_UPDATE.pathname && rebootType.value === '') + +onBeforeMount(() => { + if (showLoader.value) { + updateOsActionsStore.executeUpdateOsCallback(true); + } +});