feat(plex): P0 admin Config UI — connection test + library picker
- ConfigPanel 'plex' group auto-renders; adds a Test-connection button + a library-picker (checked sections write plex_libraries, applied on Save) - api.testPlex + PlexTestResult/PlexSection types - i18n config namespace: plex group + 7 fields + test strings (en/hu/de); also fills the previously-missing 'downloads' group label
This commit is contained in:
parent
a88254c841
commit
5684d6c406
5 changed files with 215 additions and 9 deletions
|
|
@ -609,6 +609,20 @@ export interface SystemConfigData {
|
|||
secrets_manageable: boolean;
|
||||
}
|
||||
|
||||
// Admin: result of testing the Plex server connection (also drives the library-picker).
|
||||
export interface PlexSection {
|
||||
key: string;
|
||||
title: string;
|
||||
type: string; // "movie" | "show"
|
||||
count?: number;
|
||||
}
|
||||
export interface PlexTestResult {
|
||||
ok: boolean;
|
||||
server_name: string;
|
||||
version?: string;
|
||||
sections: PlexSection[];
|
||||
}
|
||||
|
||||
// Admin Users & roles page.
|
||||
export interface AdminUserRow {
|
||||
id: number;
|
||||
|
|
@ -921,6 +935,7 @@ export const api = {
|
|||
req(`/api/admin/config/${key}`, { method: "DELETE" }),
|
||||
testEmail: (): Promise<{ sent: boolean; to: string }> =>
|
||||
req("/api/admin/config/test-email", { method: "POST" }),
|
||||
testPlex: (): Promise<PlexTestResult> => req("/api/plex/test", { method: "POST" }),
|
||||
// --- admin: users & roles ---
|
||||
adminUsers: (): Promise<AdminUserRow[]> => req("/api/admin/users"),
|
||||
setUserRole: (id: number, role: "user" | "admin"): Promise<AdminUserRow> =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue