Admin support#126
Merged
Merged
Conversation
…anagement
This commit introduces a comprehensive server control panel for administrators and refactors the server management UI to support detailed statistics and connection handling for Jellyfin, Jellyseerr, and Audiobookshelf.
### Key Changes:
* **Administration & Control Panel**:
* Added `ControlPanelView.kt` and `ControlPanelViewModel.kt` to allow administrators to monitor active sessions, manage scheduled tasks (start/stop), and perform server power actions (restart/shutdown).
* Implemented real-time polling for server tasks and active sessions.
* Added visual indicators for "Now Playing" items in the control panel with progress tracking.
* Integrated WebSocket-aware snackbars to notify users when a server is restarting or has shut down.
* **Server Management UI Refactoring**:
* Decomposed the monolithic server management screen into modular components: `ServerCard.kt`, `ServerDetailDialog.kt`, and service-specific tabs (`JellyfinTab.kt`, `JellyseerrTab.kt`, `AudiobookshelfTab.kt`).
* Enhanced `ServerCard` with dynamic "LED" indicators for active services (TMDB, MDBList) and connection types (Local, Tailscale, Remote).
* Introduced a segmented tab interface in the server detail dialog for better organization of service-specific stats and network settings.
* **Data & Domain**:
* Updated the `User` model and database schema (v43) to include an `isAdmin` flag.
* Expanded `JellyfinRepository` to include administrative APIs for sessions, system power, and scheduled tasks.
* Updated `SessionManager` to proactively refresh admin status from the server policy.
* Improved `JellyfinWebSocketManager` to trigger home data refreshes upon library changes and handle server state transitions.
* **UI/UX Improvements**:
* Added specialized formatters for listening duration, task execution times, and media ticks.
* Introduced new vector assets for admin settings, power controls, and device status.
* Implemented "Manage Addresses" views for each service to allow adding/deleting secondary connection URLs.
…gement UI
This commit integrates the server control panel into the main settings flow for administrators and enhances the server management screen by categorizing active and saved connections.
### Key Changes:
* **Settings & Administration**:
* **Control Panel Access**: Added a new entry point for administrators in the `SettingsScreen` header, launching the `ControlPanelView` within a dialog.
* **ViewModel Integration**: Updated `SettingsViewModel` and its UI state to track `isAdmin` status, the `serverId`, and the currently `activeServer` object.
* **Lifecycle Management**: Implemented a `LaunchedEffect` in the settings screen to initialize the `ControlPanelViewModel` whenever the active server ID changes.
* **Server Management UI (`ServerManagementScreen.kt`)**:
* **Sectioned List**: Refactored the server list to visually separate the "Active Server" from "Saved Servers" using new `ServerSectionHeader` components.
* **Conditional Access**: Updated the Jellyfin server details tab to disable the Control Panel button for inactive servers, adding a descriptive label and adjusting visual opacity to reflect availability.
* **Data & Logic Improvements**:
* **Service Status Aggregation**: Enhanced `ServerManagementViewModel` to calculate aggregate `ServiceStatus` (TMDB, Jellyseerr, etc.) for servers that are not currently active, providing better visibility of available features across saved connections.
* **Address Filtering**: Refined the secondary address list in the server management view to exclude the primary base URL, preventing redundant display.
* **UI Components**:
* Introduced a new `ServerSectionHeader` for better organizational hierarchy in lazy lists.
* Integrated the `ic_admin_panel_settings` icon as a primary action for administrative tasks.
This commit upgrades the project's build infrastructure and several key dependencies to their latest versions, including Gradle, the Android Gradle Plugin, and the Media3 library suite.
### Key Changes:
* **Build System**:
* Updated Gradle wrapper from 9.3.1 to 9.4.1.
* Updated Android Gradle Plugin (AGP) from 9.1.0 to 9.2.1.
* **Core Libraries**:
* Updated Kotlin from 2.3.20 to 2.3.21.
* Updated Compose BOM from 2026.05.00 to 2026.05.01.
* Bumped Media3 (ExoPlayer, Session, and Common) from 1.10.0 to 1.10.1.
* Updated `aboutlibrariesCore` to 14.2.0.
…calization
This commit moves hardcoded UI strings, content descriptions, and error messages throughout the server management and control panel screens into `strings.xml`. This improves maintainability and prepares the application for localization.
### Key Changes:
* **Control Panel (`ControlPanelView.kt`)**:
* Externalized strings for server power actions, including titles, confirmation messages, and buttons for Restart and Shutdown dialogs.
* Updated active session headers, idle status indicators, and task category labels (e.g., "Running", "Other") to use string resources.
* Implemented localized placeholders for unknown devices, titles, and users.
* **Server Management UI**:
* **`ServerCard.kt`**: Moved connection type labels ("Local", "Tailscale", "Remote") and menu options into resources.
* **`ServerManagementScreen.kt`**: Refactored section headers for "Active" and "Saved" servers.
* **`ServerDetailDialog.kt`**: Updated the `DetailTab` enum to use string resource IDs for tab labels (Jellyfin, Seerr, ABS).
* **Service-Specific Tabs**:
* **Jellyfin**: Externalized administration headers, control panel descriptions, and user count pluralization logic.
* **Jellyseerr**: Moved role labels, permission names (Request, Auto-Approve, 4K, Manage), and quota duration strings to resources.
* **Audiobookshelf**: Refactored content duration formatting and network connection placeholders to use localized strings.
* **Resources & Infrastructure**:
* Added a comprehensive set of new strings to `strings.xml` covering navigation, actions, status messages, and accessibility descriptions.
* Updated `ServerManagementViewModel` to retrieve error messages (e.g., "Address already exists") using `context.getString()`.
* Enhanced accessibility by replacing hardcoded `contentDescription` strings with resource lookups across all shared server components.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a new admin-focused Server Control Panel for Jellyfin and refactors the server management experience across Jellyfin, Jellyseerr, and Audiobookshelf integrations.
Changes
Added real-time server control and monitoring features for administrators:
Refactored server management into modular components with:
Improved backend and session handling:
Integrated the Control Panel into Settings for admin users.
Externalized hardcoded strings for improved localization and accessibility.
Updated core dependencies: