From b1590ee609ebb2df19e17dac3735ddf8813e3523 Mon Sep 17 00:00:00 2001 From: Eli Bosley Date: Tue, 2 Sep 2025 10:24:33 -0400 Subject: [PATCH] refactor: improve button click handling and class management in components - Updated button click handlers in Notifications and RClone components to pass parameters directly, enhancing clarity and functionality. - Introduced a computed property for button classes in UserProfile component, streamlining class management based on item properties. - Refactored navigation logic in UpdateOs component for better readability and maintainability. --- web/components/Notifications/Item.vue | 4 +-- web/components/RClone/RCloneOverview.vue | 2 +- web/components/UpdateOs/Status.vue | 8 +++++- web/components/UserProfile/DropdownItem.vue | 27 +++++++++++++++------ 4 files changed, 30 insertions(+), 11 deletions(-) diff --git a/web/components/Notifications/Item.vue b/web/components/Notifications/Item.vue index a908c1761..1a775455b 100644 --- a/web/components/Notifications/Item.vue +++ b/web/components/Notifications/Item.vue @@ -128,7 +128,7 @@ const reformattedTimestamp = computed(() => { +
diff --git a/web/components/UpdateOs/Status.vue b/web/components/UpdateOs/Status.vue index c9e600c42..400b55cef 100644 --- a/web/components/UpdateOs/Status.vue +++ b/web/components/UpdateOs/Status.vue @@ -110,6 +110,12 @@ const checkButton = computed((): BrandButtonProps => { : props.t('Unraid OS {0} Update Available', [available.value]), }; }); + +const navigateToRegistration = () => { + if (typeof window !== 'undefined') { + window.location.href = WEBGUI_TOOLS_REGISTRATION.toString(); + } +};