Commit Graph

528 Commits

Author SHA1 Message Date
720f4e253a Fix: Correct props passed to PlexLibraryStats component
PlexLibraryStats expects individual number props:
- movies: number
- shows: number
- music: number
- watchtime: number
- loading?: boolean

PlexSettings was incorrectly passing:
- :stats="libraryStats" (single object)

Fixed to destructure and pass individual props:
- :movies="libraryStats.movies"
- :shows="libraryStats.shows"
- :music="libraryStats.music"
- :watchtime="libraryStats.watchtime"

Library stats now display correctly ✓
2026-02-27 19:21:13 +01:00
017a489b0d Fix: Correct API URL construction to prevent double URL issue
- Update fetchLibrarySections to accept serverUrl parameter
  - Was using internal plexServerUrl.value ref
  - Now accepts explicit serverUrl parameter
  - Prevents URL doubling when called from PlexSettings

- Update fetchLibraryDetails to accept serverUrl parameter
  - Changed signature: (authToken, serverUrl, sectionKey)
  - Was: (authToken, sectionKey) using internal ref
  - Now matches how it's called from loadLibraries composable

- Fixes 404 errors from malformed URLs like:
  http://server.com/library/sectionshttp://server.com/library/sections

Library API calls now use correct single URLs ✓
2026-02-27 19:21:13 +01:00
5e73b73783 Fix: Restore library stats functionality and remove debug logging
- Fix usePlexLibraries composable to return stats and details
  - Updated loadLibraries signature to match PlexSettings usage
  - Now accepts: sections, authToken, serverUrl, username, fetchFn
  - Returns: { stats, details } object instead of updating refs
  - Added watchtime calculation from Tautulli API

- Update processLibrarySection to work with passed parameters
  - Accept stats and details objects instead of using refs
  - Accept serverUrl and fetchLibraryDetailsFn as parameters
  - No longer depends on composable internal state

- Remove all debug console.log statements
  - Clean up usePlexAuth composable (removed 13 debug logs)
  - Clean up PlexSettings component (removed 9 debug logs)
  - Keep only error logging for troubleshooting

Library stats now display correctly after authentication ✓
Build size reduced by removing debug code
2026-02-27 19:21:13 +01:00
15b6c571d0 Fix: Correct event handling between PlexSettings and PlexAuthButton
**CRITICAL FIX - THIS WAS THE BUG!**

PlexAuthButton emits:
- auth-success (with token)
- auth-error (with error message)

PlexSettings was listening for:
- @authenticate (WRONG - this event doesn't exist!)

Changes:
- Update PlexSettings template to listen for correct events:
  - @auth-success="handleAuthSuccess"
  - @auth-error="handleAuthError"

- Replace authenticatePlex() with two event handlers:
  - handleAuthSuccess(token) - processes successful auth
  - handleAuthError(message) - displays error messages

- Remove unused openAuthPopup import (now handled by button)
- Remove intermediate completePlexAuth function
- Simplified auth flow: Button → Event → Handler

This explains why authentication wasn't working - the click event
was never being handled because the event names didn't match!
2026-02-27 19:21:13 +01:00
46880474d1 Debug: Add popup opening verification logs
- Log when openAuthPopup is called
- Log popup blocked vs success
- Helps identify if popup is even opening
2026-02-27 19:21:13 +01:00
8795845acf Debug: Add comprehensive logging to Plex authentication flow
- Add detailed console logs throughout auth process
  - PIN generation with CLIENT_IDENTIFIER
  - PIN polling status checks
  - Auth token received confirmation
  - Cookie setting and verification
  - User data fetch and account linking

- Helps diagnose authentication and cookie issues
- Logs show exact point of failure in auth flow
- Can be removed once issue is identified and fixed
2026-02-27 19:21:13 +01:00
368ad70096 Fix: Resolve Plex authentication cookie and polling issues
- Export CLIENT_IDENTIFIER and APP_NAME as module-level constants
  - Ensures same identifier used across all composables and API calls
  - Prevents auth failures from mismatched client identifiers

- Refactor PlexSettings.vue to use composable auth flow
  - Remove duplicate authentication logic (138 lines removed)
  - Use openAuthPopup() from usePlexAuth composable
  - Use cleanup() function in onUnmounted hook
  - Reduced from 498 lines to 360 lines (28% further reduction)

- Fix usePlexAuth to import constants directly
  - Previously tried to get constants from usePlexApi() instance
  - Now imports as shared module exports
  - Ensures consistent CLIENT_IDENTIFIER across auth flow

Total PlexSettings.vue reduction: 2094 → 360 lines (83% reduction)
Authentication flow now properly sets cookies and completes polling ✓
2026-02-27 19:21:13 +01:00
ac591cbebe Refactor: Complete PlexSettings modularization with modal components
- Create PlexLibraryModal.vue (365 lines) for detailed library view
  - Stats overview (total items, episodes/tracks, duration)
  - Recently added items with posters and metadata
  - Top genres with visual bar charts
  - Fully responsive modal design

- Create PlexUnlinkModal.vue (138 lines) for account unlinking
  - Confirmation dialog with feature loss warnings
  - Clean modal UI with cancel/confirm actions

- Refactor PlexSettings.vue: 2094 lines → 498 lines (76% reduction)
  - Replace inline UI with PlexAuthButton component
  - Replace profile card with PlexProfileCard component
  - Replace stats grid with PlexLibraryStats component
  - Replace server info with PlexServerInfo component
  - Use PlexLibraryModal and PlexUnlinkModal for overlays
  - Integrate usePlexAuth, usePlexApi, usePlexLibraries composables
  - Remove 1596 lines of duplicate template and logic
  - Maintain all functionality with cleaner architecture

Total extraction: 2031 lines from monolithic file into 10 modular components
Build verified successfully ✓
2026-02-27 19:21:12 +01:00
37ad9ecb7b Refactor: Add library stats, server info, and helper utilities
Extract more reusable components and utilities:

Components:
- PlexLibraryStats.vue: 4-card stats grid with loading states
- PlexServerInfo.vue: Server details and sync/unlink actions

Composables:
- usePlexLibraries.ts: Library data loading and processing logic

Utilities:
- plexHelpers.ts: Pure functions for formatting and calculations
  - getLibraryIcon/Title: Type to display mapping
  - formatDate/MemberSince: Date formatting
  - processLibraryItem: Parse API response to display format
  - calculateGenreStats: Top 5 genres from metadata
  - calculateDuration: Total hours, episodes, tracks

Benefits:
- Cleaner separation: UI vs logic vs utilities
- Testable pure functions
- Reusable across components
- Reduces PlexSettings.vue complexity
2026-02-27 19:21:12 +01:00
1813331673 Refactor: Extract Plex composables and smaller components
Split large PlexSettings component into reusable pieces:

Composables:
- usePlexApi.ts: API functions for user data, servers, libraries
- usePlexAuth.ts: OAuth authentication flow, PIN generation, polling

Components:
- PlexAuthButton.vue: Sign-in button with OAuth popup
- PlexProfileCard.vue: User profile with badges (Pass, 2FA, Labs, years)

Benefits:
- Better code organization and maintainability
- Reusable authentication logic
- Cleaner separation of concerns
- Easier testing and debugging
2026-02-27 19:21:12 +01:00
77c89fa520 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
2026-02-27 19:21:12 +01:00
9c7e0bd3b3 Refactor and optimize admin page components
- Remove unused imports and auto-refresh functionality
- Reduce padding and spacing for more compact admin layout
- Simplify stats generation and remove unused variables
- Adjust font sizes and icon sizes for better consistency
- Improve line-height on admin page title
- Minor performance optimizations
2026-02-27 19:21:12 +01:00
0a2e721cfc Minor UI component styling improvements
- Remove margin-right from SeasonedButton for better layout control
- Remove max-width constraint from SeasonedInput for full-width forms
- Simplify Toast component layout and remove unused icon section
- Improve toast text spacing and structure
2026-02-27 19:21:12 +01:00
7f089c5c48 Add theme initialization on app startup
- Load saved theme preference from localStorage
- Support for 'auto' theme that follows system preference
- Listen for system theme changes and update accordingly
- Apply theme before app mounts to prevent flash
2026-02-27 19:21:12 +01:00
75aa75dad1 Add password generator and user profile components
- PasswordGenerator: Generate secure random passwords with options
- UserProfile: User information display (deprecated, moved to SettingsPage hero card)
- Supporting components for settings functionality
2026-02-27 19:21:12 +01:00
c3ef3d968d Update password change component for new settings layout
- Remove section title (now in parent SettingsPage)
- Add password generator integration
- Info box with password requirements
- Compact form layout with consistent spacing
- Match settings page typography and spacing
2026-02-27 19:21:12 +01:00
258b1ef126 Add data export and account management component
- Export user data in JSON or CSV format
- Display request statistics with mini stat cards
- View full request history button
- Account deletion with confirmation modal
- Warning for permanent actions with DELETE confirmation
- Compact styling consistent with settings page design
2026-02-27 19:21:12 +01:00
6d7ade91ff Implement Plex OAuth authentication with popup flow
- Replace username/password with OAuth flow
- Generate PIN and open popup to app.plex.tv/auth
- Safari-compatible: open popup immediately, navigate after PIN generation
- Poll PIN status every second for authentication
- Custom loading screen in popup while generating PIN
- Plex orange button (#c87818) with icon
- Update API to accept authToken instead of credentials
- Cleanup on component unmount and popup close
- Handle popup blockers with user-friendly error messages
2026-02-27 19:21:12 +01:00
e1aaa3f1ea Redesign settings page with profile hero card
- Create single-page settings layout (removed sidebar navigation)
- Add large profile hero card with avatar, stats, and user info
- Display user stats: Requests and Magnets Added
- Compact spacing and improved typography hierarchy
- Section headers at 1.5rem for better hierarchy
- Reduced whitespace while maintaining readability
- Max-width: 800px for better content focus
2026-02-27 19:21:12 +01:00
244895f06a Add theme selection UI with Seed theme support
- Add ThemePreferences component with current theme display
- Visual theme preview cards showing colors for each theme
- Add Seed theme to available themes list
- Theme icon with gradient and preview card styling
- Support for Auto, Light, Dark, Ocean, Nordic, Seed, and Halloween themes
2026-02-27 19:21:12 +01:00
d9be15aad0 Add Seed theme inspired by seed.com
- Add new 'seed' theme with green color palette
- Primary colors: #1c3a13 (seed green), #fcfcf7 (snow white), #e9f0ca (lemongrass)
- Dark green backgrounds with light green accents
- Complete theme definition with all CSS variables
2026-02-27 19:21:12 +01:00
fd842b218b v2 - lift all w/ icons, reactive layout, sort & filter 2026-02-27 19:21:12 +01:00
0f774e8f2e admin page & components 2026-02-27 19:21:12 +01:00
081240c83e include credentials on login fetch requests, allows set header response 2026-02-24 22:22:22 +01:00
eac12748db mobile improvements
tries to setup layout for success with safari iso 26 bottom navigation
bar and having content appear behind it instead of having a fat lip of
background color.

Also fixes where main content was not taking full width on mobile & text
alignment on torrent search results.
2026-02-24 18:43:26 +01:00
426b376d05 Feat: Dynamic colors (#101)
* On every route change, update local variables from query params

* ResultSection is keyed to query to force re-render

* Feat: vite & upgraded dependencies (#100)

* On every route change, update local variables from query params

* ResultSection is keyed to query to force re-render

* Resolved lint warnings

* replace webpack w/ vite

* update all imports with alias @ and scss

* vite environment variables, also typed

* upgraded eslint, defined new rules & added ignore comments

* resolved linting issues

* moved index.html to project root

* updated dockerfile w/ build stage before runtime image definition

* sign drone config

* dynamic colors from poster for popup bg & text colors

* more torrents nav button now link elem & better for darker bg

* make list item title clickable

* removed extra no-shadow eslint rule definitions

* fixed movie import

* adhere to eslint rules & package.json clean command

* remove debounce autocomplete search, track & hault on failure
2026-02-24 00:22:51 +01:00
1238cf50cc Feat: Caddy webserver (#102)
* describe Caddyfile & update Dockerfile runtime image

* remove nginx config - replaced by caddy
2026-02-24 00:22:31 +01:00
8e586811ec Feat: vite & upgraded dependencies (#100)
* On every route change, update local variables from query params

* ResultSection is keyed to query to force re-render

* Resolved lint warnings

* replace webpack w/ vite

* update all imports with alias @ and scss

* vite environment variables, also typed

* upgraded eslint, defined new rules & added ignore comments

* resolved linting issues

* moved index.html to project root

* updated dockerfile w/ build stage before runtime image definition

* sign drone config
2026-02-23 20:53:19 +01:00
fb3b4c8f7d updated elastic autocomplete to include persons, also adds debounce & clearer handling of response 2025-01-11 14:07:07 +01:00
25da19eaf5 Removed import stmt defineEmits & defineProps as they are compiler macros 2024-02-25 16:28:11 +01:00
28a559727f Fixes table sort for file size (#86)
* Fixed algorithm to de-humanize size string to bytes

* Resolved linting issues
2023-01-16 22:50:25 +01:00
dependabot[bot]
ba3cb6486e Bump loader-utils from 1.4.0 to 1.4.2 (#81)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.2.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.2)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-30 01:26:34 +01:00
dependabot[bot]
f819120cde Bump decode-uri-component from 0.2.0 to 0.2.2 (#82)
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-30 01:26:06 +01:00
Snyk bot
2f48656454 fix: Dockerfile to reduce vulnerabilities (#83)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-DEBIAN11-CURL-3065656
- https://snyk.io/vuln/SNYK-DEBIAN11-LIBTASN16-3061097
- https://snyk.io/vuln/SNYK-DEBIAN11-LIBXML2-3059797
- https://snyk.io/vuln/SNYK-DEBIAN11-LIBXML2-3059801
- https://snyk.io/vuln/SNYK-DEBIAN11-TIFF-3113871
2022-12-30 01:25:47 +01:00
4a128044bf Defined request interface & updated expected request status response 2022-11-03 21:56:46 +01:00
dec15194e4 Fix: Search query reload (#79)
* On every route change, update local variables from query params

* ResultSection is keyed to query to force re-render

* Resolved lint warnings
2022-08-27 11:58:30 +02:00
2fed03a882 fix: updated plex_userid to camelcase 2022-08-19 10:49:16 +02:00
74d5868a5c Tried setting backdrop too fast, tries after mount & api response (#78)
* Tried setting backdrop too fast, tries after mount & api response

* Resolved linting issues
2022-08-15 21:12:50 +02:00
609ebc3940 Merge pull request #76 from KevinMidboe/feat/vue-3-typescripted
Feat: Vue 3 typescripted
2022-08-15 20:39:12 +02:00
5d2e667ceb Only build and publish docker image to github when pushing master 2022-08-15 20:34:59 +02:00
5786f55e78 Updated seasoned server ip address 2022-08-15 20:25:05 +02:00
ba888fb303 Moved github files into folder 2022-08-15 20:17:37 +02:00
5f942848aa Only search when query has length 2022-08-14 23:44:52 +02:00
3a58e77da0 Some icons look better using stroke over fill 2022-08-14 23:40:24 +02:00
8d03ea5eec Remove old htaccess file 2022-08-14 23:11:42 +02:00
2f4c6e2543 Also read SEASONED_DOMAIN from drone secret during build 2022-08-14 21:50:05 +02:00
7829ad7298 Removed console log, env variables from drone secrets seem to work 2022-08-14 21:32:57 +02:00
6642b2531e Test node_modules caching 2022-08-14 21:25:09 +02:00
abf005fd8d Read any matching secrets as env variable during build 2022-08-14 21:15:54 +02:00
c6cff7a0c4 If .env is not defined use sane defaults from .env.example 2022-08-14 21:05:45 +02:00