From 345e83bfb0904381d784fc77b3dcd3ad7e53d898 Mon Sep 17 00:00:00 2001 From: Eli Bosley Date: Tue, 8 Jul 2025 10:05:39 -0400 Subject: [PATCH] feat: upgrade nuxt-custom-elements (#1461) ## Summary by CodeRabbit * **New Features** * Added new modal dialogs and UI components, including activation steps, OS update feedback, and expanded notification management. * Introduced a plugin to configure internationalization, state management, and Apollo client support in web components. * Added a new Log Viewer page with a streamlined interface for viewing logs. * **Improvements** * Centralized Pinia state management by consolidating all stores to use a shared global Pinia instance. * Simplified component templates by removing redundant internationalization host wrappers. * Enhanced ESLint configuration with stricter rules and global variable declarations. * Refined custom element build process to prevent jQuery conflicts and optimize minification. * Updated component imports and templates for consistent structure and maintainability. * Streamlined log viewer dropdowns using simplified select components with improved formatting. * Improved notification sidebar with filtering by importance and modular components. * Replaced legacy notification popups with new UI components and added automatic root session creation for localhost requests. * Updated OS version display and user profile UI with refined styling and component usage. * **Bug Fixes** * Fixed component tag capitalization and improved type annotations across components. * **Chores** * Updated development dependencies including ESLint plugins and build tools. * Removed deprecated log viewer patch class and cleaned up related test fixtures. * Removed unused imports and simplified Apollo client setup. * Cleaned up test mocks and removed obsolete i18n host component tests. --- - To see the specific tasks where the Asana app for GitHub is being used, see below: - https://app.asana.com/0/0/1210730229632804 --------- Co-authored-by: Pujit Mehrotra Co-authored-by: Zack Spear --- .claude/settings.local.json | 6 + .../downloaded/.login.php.last-download-time | 2 +- .../DefaultPageLayout.php.last-download-time | 2 +- .../Notifications.page.last-download-time | 2 +- .../auth-request.php.last-download-time | 2 +- .../downloaded/rc.nginx.last-download-time | 2 +- ...efaultPageLayout.php.modified.snapshot.php | 1 + .../default-page-layout.modification.ts | 4 + .../modifications/log-viewer.modification.ts | 67 ---- .../patches/default-page-layout.patch | 13 +- .../plugins/dynamix.my.servers/ApiKeys.page | 4 +- .../plugins/dynamix.my.servers/Connect.page | 2 +- .../plugins/dynamix.my.servers/LogViewer.page | 6 + .../dynamix.my.servers/Registration.page | 4 +- .../dynamix.my.servers/include/myservers2.php | 17 +- .../dynamix.my.servers/include/sso-login.php | 4 +- .../include/web-components-extractor.php | 14 +- .../include/welcome-modal.php | 4 +- .../dynamix.plugin.manager/Downgrade.page | 4 +- .../dynamix.plugin.manager/Update.page | 4 +- pnpm-lock.yaml | 333 +++++++++++++----- unraid-ui/eslint.config.ts | 16 +- .../src/components/form/select/Select.vue | 13 +- unraid-ui/src/composables/useTeleport.ts | 3 +- unraid-ui/src/forms/Select.vue | 12 +- web/__test__/components/Auth.test.ts | 9 + .../components/HeaderOsVersion.test.ts | 39 +- web/__test__/components/I18nHost.test.ts | 133 ------- web/__test__/components/Registration.test.ts | 16 + web/__test__/components/UserProfile.test.ts | 1 + web/app.vue | 7 +- web/components/Activation/ActivationModal.vue | 3 + .../Activation/store/activationCodeData.ts | 5 +- .../Activation/store/activationCodeModal.ts | 5 +- web/components/ApiKeyPage.ce.vue | 4 +- web/components/Brand/Avatar.vue | 2 + web/components/CallbackHandler.ce.vue | 5 +- .../ConnectSettings/ConnectSettings.ce.vue | 7 +- web/components/DevSettings.vue | 2 + web/components/DowngradeOs.ce.vue | 37 +- web/components/HeaderOsVersion.ce.vue | 19 +- web/components/I18nHost.ce.vue | 54 --- web/components/Logs/LogViewer.ce.vue | 59 ++-- web/components/Modals.ce.vue | 5 + web/components/Notifications/Indicator.vue | 1 + web/components/Notifications/Item.vue | 2 + web/components/Notifications/List.vue | 3 + web/components/Notifications/Sidebar.vue | 9 +- web/components/Registration.ce.vue | 101 +++--- web/components/Registration/Item.vue | 1 + .../Registration/UpdateExpiration.vue | 1 + .../Registration/UpdateExpirationAction.vue | 2 + web/components/SsoButton.ce.vue | 28 +- web/components/ThemeSwitcher.ce.vue | 30 +- web/components/UpdateOs.ce.vue | 24 +- web/components/UpdateOs/ChangelogModal.vue | 1 + .../UpdateOs/CheckUpdateResponseModal.vue | 3 + web/components/UpdateOs/IgnoredRelease.vue | 2 + web/components/UpdateOs/Status.vue | 2 +- web/components/UpdateOs/Update.vue | 2 +- web/components/UpdateOs/UpdateIneligible.vue | 3 +- web/components/UserProfile.ce.vue | 15 +- .../UserProfile/CallbackFeedback.vue | 5 + .../UserProfile/DropdownConnectStatus.vue | 2 + .../UserProfile/DropdownContent.vue | 47 +-- web/components/UserProfile/DropdownError.vue | 1 + web/components/UserProfile/DropdownItem.vue | 1 + .../UserProfile/DropdownLaunchpad.vue | 4 +- .../UserProfile/DropdownTrigger.vue | 6 +- web/components/UserProfile/ServerState.vue | 2 + web/components/UserProfile/Trial.vue | 2 + web/components/UserProfile/UptimeExpire.vue | 7 +- web/components/WanIpCheck.ce.vue | 40 ++- .../Wrapper/web-component-plugins.ts | 49 +++ web/composables/api/use-notifications.ts | 3 +- web/composables/dateTime.ts | 3 +- web/composables/useTeleport.ts | 26 -- web/eslint.config.mjs | 47 +++ web/helpers/apollo-cache/index.ts | 8 +- web/helpers/create-apollo-client.ts | 5 +- web/helpers/globals.d.ts | 2 +- web/layouts/default.vue | 8 +- web/nuxt.config.ts | 104 +++++- web/package.json | 7 +- web/pages/changelog.vue | 3 + web/pages/flashbackup.vue | 10 +- web/pages/index.vue | 15 +- web/pages/redirect.vue | 2 + web/pages/webComponents.vue | 13 +- web/pages/welcome.vue | 1 + web/plugins/apollo.ts | 7 + web/plugins/i18n.ts | 1 + web/store/account.ts | 6 +- web/store/apiKey.ts | 4 +- web/store/callbackActions.ts | 6 +- web/store/dropdown.ts | 5 +- web/store/errors.ts | 5 +- web/store/globalPinia.ts | 7 + web/store/installKey.ts | 5 +- web/store/modal.ts | 5 +- web/store/notifications.ts | 4 +- web/store/purchase.ts | 5 +- web/store/replaceRenew.ts | 5 +- web/store/server.ts | 5 +- web/store/theme.ts | 5 +- web/store/trial.ts | 5 +- web/store/unraidApi.ts | 5 +- web/store/updateOs.ts | 5 +- web/store/updateOsActions.ts | 5 +- 109 files changed, 955 insertions(+), 746 deletions(-) delete mode 100644 api/src/unraid-api/unraid-file-modifier/modifications/log-viewer.modification.ts create mode 100644 plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/LogViewer.page delete mode 100644 web/__test__/components/I18nHost.test.ts delete mode 100644 web/components/I18nHost.ce.vue create mode 100644 web/components/Wrapper/web-component-plugins.ts delete mode 100644 web/composables/useTeleport.ts create mode 100644 web/plugins/apollo.ts create mode 100644 web/store/globalPinia.ts diff --git a/.claude/settings.local.json b/.claude/settings.local.json index e8f289d70..6f9df3fa2 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -1,3 +1,9 @@ { + "permissions": { + "allow": [ + "Bash(rg:*)", + "Bash(find:*)" + ] + }, "enableAllProjectMcpServers": false } \ No newline at end of file diff --git a/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/.login.php.last-download-time b/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/.login.php.last-download-time index 9fd8e72cf..83193e350 100644 --- a/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/.login.php.last-download-time +++ b/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/.login.php.last-download-time @@ -1 +1 @@ -1750864232307 \ No newline at end of file +1751630630443 \ No newline at end of file diff --git a/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/DefaultPageLayout.php.last-download-time b/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/DefaultPageLayout.php.last-download-time index c553508f3..125d1dfd8 100644 --- a/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/DefaultPageLayout.php.last-download-time +++ b/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/DefaultPageLayout.php.last-download-time @@ -1 +1 @@ -1750864231987 \ No newline at end of file +1751630630198 \ No newline at end of file diff --git a/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/Notifications.page.last-download-time b/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/Notifications.page.last-download-time index 8b702d8cb..c7db09181 100644 --- a/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/Notifications.page.last-download-time +++ b/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/Notifications.page.last-download-time @@ -1 +1 @@ -1750864232160 \ No newline at end of file +1751630630343 \ No newline at end of file diff --git a/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/auth-request.php.last-download-time b/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/auth-request.php.last-download-time index ddae972bd..c2f1dd9f4 100644 --- a/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/auth-request.php.last-download-time +++ b/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/auth-request.php.last-download-time @@ -1 +1 @@ -1750864232467 \ No newline at end of file +1751630630571 \ No newline at end of file diff --git a/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/rc.nginx.last-download-time b/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/rc.nginx.last-download-time index 3a0a01800..0e9029449 100644 --- a/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/rc.nginx.last-download-time +++ b/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/rc.nginx.last-download-time @@ -1 +1 @@ -1750864333264 \ No newline at end of file +1751630630810 \ No newline at end of file diff --git a/api/src/unraid-api/unraid-file-modifier/modifications/__test__/snapshots/DefaultPageLayout.php.modified.snapshot.php b/api/src/unraid-api/unraid-file-modifier/modifications/__test__/snapshots/DefaultPageLayout.php.modified.snapshot.php index 4c509b7d6..c6ba6a642 100644 --- a/api/src/unraid-api/unraid-file-modifier/modifications/__test__/snapshots/DefaultPageLayout.php.modified.snapshot.php +++ b/api/src/unraid-api/unraid-file-modifier/modifications/__test__/snapshots/DefaultPageLayout.php.modified.snapshot.php @@ -706,6 +706,7 @@ $.ajaxPrefilter(function(s, orig, xhr){ +