From 77c89fa52055c15be337172861465f04a113bc5b Mon Sep 17 00:00:00 2001 From: Kevin Midboe Date: Fri, 27 Feb 2026 17:34:38 +0100 Subject: [PATCH] Enhance Plex integration with real API data and interactive library modal Major improvements to Plex integration: - Replace Vuex store dependency with localStorage-based connection detection - Fetch and display real Plex user data (username, email, subscription, 2FA status) - Add user badges: Plex Pass, member years, 2FA, experimental features - Properly format Unix timestamp joined dates - Remove success message box, add elegant checkmark icon next to username - Add Plex connection badge to main user profile Real-time Plex API integration: - Fetch actual library counts from Plex server (movies, shows, music) - Display real server name from user's Plex account - Load recently added items with actual titles, years, and ratings - Calculate real genre statistics from library metadata - Compute actual duration totals from item metadata - Count actual episodes (TV shows) and tracks (music) - Sync library on demand with fresh data from Plex API Interactive library modal: - Replace toast messages with rich modal showing library details - Display recently added items with poster images - Show genre distribution with animated bar charts - Add loading states with animated dots - Disable empty library cards - Modal appears above header with proper z-index - Blur backdrop for better focus - Fully responsive mobile design Store Plex data in localStorage: - Cache user profile data including subscription info - Store auth token in secure cookie (30 day expiration) - Load from cache for instant display on page load - Refresh data on authentication and manual sync Add Plex connection indicator to user profile: - Orange Plex badge in settings profile header - Shows 'Connected as [username]' below member info - Loads username from localStorage on mount --- src/components/profile/ChangePassword.vue | 57 +- src/components/settings/PasswordGenerator.vue | 61 +- src/components/settings/PlexSettings.vue | 1720 +++++++++++++++-- src/components/settings/UserProfile.vue | 64 + src/pages/GenPasswordPage.vue | 25 + src/routes.ts | 7 +- 6 files changed, 1676 insertions(+), 258 deletions(-) create mode 100644 src/pages/GenPasswordPage.vue diff --git a/src/components/profile/ChangePassword.vue b/src/components/profile/ChangePassword.vue index c6d524e..139496f 100644 --- a/src/components/profile/ChangePassword.vue +++ b/src/components/profile/ChangePassword.vue @@ -14,7 +14,17 @@ type="password" /> - +
+ +
+ +
+
= ref(""); const newPassword: Ref = ref(""); const newPasswordRepeat: Ref = ref(""); @@ -69,7 +81,7 @@ } function validate() { - return + return; return new Promise((resolve, reject) => { if (!oldPassword.value || oldPassword?.value?.length === 0) { addWarningMessage("Missing old password!", "Validation error"); @@ -120,6 +132,15 @@ loading.value = false; } } + + function toggleGenerator() { + showGenerator.value = !showGenerator.value; + /* + if (showGenerator.value && !generatedPassword.value) { + generateWordsPassword(); + } + */ + } diff --git a/src/components/settings/PasswordGenerator.vue b/src/components/settings/PasswordGenerator.vue index 268c376..4778bc1 100644 --- a/src/components/settings/PasswordGenerator.vue +++ b/src/components/settings/PasswordGenerator.vue @@ -1,11 +1,6 @@