Introduce multi-format book support, including audiobooks (#2486)
* fix: support reading alternative book formats using bookType query param * feat: add streaming reader support for alternative EPUB formats * refactor: extract tabs section into MetadataTabsComponent * feat: implement per-file reading progress tracking * feat: add configurable format priority with cascading fallback * refactor: redesign library creator with single-page layout * refactor: unify reading progress into ReadingProgressService * refactor: improve delete options with clearer file format and book deletion * refactor: improve book format matching with normalization and fuzzy fallback * feat: add folder-based audiobook support with ZIP downloads and preparing state * fix: display unique format types in metadata viewer * refactor: auto-attach files to single book in folder during rescan * feat: implement folder-centric book file grouping with fuzzy matching * refactor: consolidate book grouping with organization mode support * fix: use folder hash for folder-based audiobooks in auto-attach * fix: delete only BookFileEntity on file removal, not entire book * fix: set folderBased flag and correct file size for auto-attached audiobook folders * fix: use count query to avoid lazy initialization in file delete handler * fix: preserve book metadata when file is moved by detecting hash match * fix: skip books with no files in restoration to avoid NPE * fix: round all progress percentages to one decimal place before sending to UI * style: improve library creator dialog spacing and layout * fix: migrate FOLDER_AS_BOOK to BOOK_PER_FOLDER for backwards compatibility * fix: FileMoveService now handles multi-file BookEntity properly * style: redesign metadata-picker and file-mover UI components * style: redesign file-naming-pattern UI and improve theme contrast * style: relax spacing in library-creator component * style: tighten directory-picker layout for consistency * fix: PathPatternResolver now respects folderBased flag for audiobooks * style: move checkmark column to left side and add pending status in file-mover * refactor: consolidate BookFileType into BookType and add audiobook styling * feat: show 'Continue Reading' button for in-progress books * fix: preserve dots in folder names during grouping and prevent duplicate attachments * style: reduce gap between download-all button and primary file section * style: shorten 'Continue Reading' button to 'Read' on mobile * feat: add DISK_TYPE config to disable file moves on network storage * style: standardize settings pages with shared styles and consistent spacing * style: revamp settings pages with modern card-based layouts * style: revamp OPDS, auth, and task management settings layouts * fix: update FileMoveService tests to include AppProperties parameter * fix: derive BookFileType from extension when uploading additional book files * feat: show format type and size in download button with dropdown for alternatives * feat: add audiobook streaming player with HTTP Range support * feat: add M4B chapter extraction and chapter navigation * feat: add audiobook bookmarks and sleep timer * refactor: split AudiobookReaderService into focused services * feat: add Media Session API for background audio playback * feat: display file extensions in format tags with distinct colors and add audiobook upload support * feat: require bookFileId for viewer settings API * fix: show split button for audiobooks with readable alternatives * feat: improve reading sessions table with book type badges and better formatting * feat: add audiobook play button in files tab * feat: use file extension for format display and meaningful tab values * feat: add extension field to BookFile DTO * feat: use extension field for book card format pill * fix: use mixed orientation for format priority drag-drop to support multi-line layout * feat: add attach book files feature to consolidate single-file books * fix: increase drag handle size for format priority chips * fix: add missing BookFileRepository mock to BookServiceDeleteTests * feat: add delete buttons to files tab and move shelf to other items menu * feat: add physical books support for cataloging books without digital files * refactor: redesign icon-picker component with improved styling * refactor: redesign metadata-picker component with improved layout and alignment * refactor: move Add Physical Book to top of library menu * refactor: use p-autoComplete for authors/categories in add-physical-book dialog * feat: add square cover search and display support for audiobooks * fix: navigate to first page when opening unread ebooks * fix: exclude API requests from service worker interception * feat: support fileless books with automatic file attachment * fix: bypass service worker for audiobook streaming requests * refactor: remove alphabetical filter sorting, default to count, limit filters to 100 --------- Co-authored-by: acx10 <acx10@users.noreply.github.com>
This commit is contained in:
+236
-207
@@ -1,4 +1,4 @@
|
||||
<div class="main-container enclosing-container">
|
||||
<div class="main-container">
|
||||
<div class="settings-header">
|
||||
<h2 class="settings-title">
|
||||
<i class="pi pi-lock"></i>
|
||||
@@ -10,233 +10,262 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="settings-content">
|
||||
<div class="preferences-section">
|
||||
<div class="section-header">
|
||||
<h3 class="section-title">
|
||||
<i class="pi pi-shield"></i>
|
||||
Internal Authentication
|
||||
</h3>
|
||||
<p class="section-description">
|
||||
Internal authentication is always enabled and cannot be disabled. However, OIDC can be used alongside internal authentication if OIDC is enabled.
|
||||
</p>
|
||||
<div class="settings-card">
|
||||
<div class="section-header">
|
||||
<h3 class="section-title">
|
||||
<i class="pi pi-shield"></i>
|
||||
Authentication Methods
|
||||
</h3>
|
||||
<p class="section-description">
|
||||
Choose which authentication methods are available for users to sign in.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="section-body">
|
||||
<div class="auth-methods-list">
|
||||
<div class="auth-method-item is-active is-locked">
|
||||
<div class="auth-method-content">
|
||||
<div class="auth-method-header">
|
||||
<div class="auth-method-icon">
|
||||
<i class="pi pi-user"></i>
|
||||
</div>
|
||||
<div class="auth-method-info">
|
||||
<span class="auth-method-label">Internal Authentication</span>
|
||||
<span class="auth-method-status active">Always Enabled</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="auth-method-description">
|
||||
Built-in username and password authentication. This is the default method and cannot be disabled.
|
||||
</p>
|
||||
</div>
|
||||
<p-checkbox
|
||||
[(ngModel)]="internalAuthEnabled"
|
||||
[binary]="true"
|
||||
[disabled]="true">
|
||||
</p-checkbox>
|
||||
</div>
|
||||
|
||||
<div class="auth-method-item" [class.is-active]="oidcEnabled">
|
||||
<div class="auth-method-content">
|
||||
<div class="auth-method-header">
|
||||
<div class="auth-method-icon oidc">
|
||||
<i class="pi pi-key"></i>
|
||||
</div>
|
||||
<div class="auth-method-info">
|
||||
<span class="auth-method-label">
|
||||
OIDC Authentication
|
||||
<span class="experimental-badge">Experimental</span>
|
||||
</span>
|
||||
<span class="auth-method-status" [class.active]="oidcEnabled">
|
||||
{{ oidcEnabled ? 'Enabled' : 'Disabled' }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="auth-method-description">
|
||||
OpenID Connect for single sign-on with external providers (Authentik, Keycloak, etc.).
|
||||
<app-external-doc-link docType="authentication"></app-external-doc-link>
|
||||
@if (!isOidcFormComplete() && !oidcEnabled) {
|
||||
<span class="config-hint">Configure settings below to enable.</span>
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
<p-toggleswitch
|
||||
[(ngModel)]="oidcEnabled"
|
||||
[disabled]="!isOidcFormComplete()"
|
||||
(onChange)="toggleOidcEnabled()">
|
||||
</p-toggleswitch>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-card">
|
||||
<div class="section-header">
|
||||
<div class="section-header-row">
|
||||
<div class="section-header-text">
|
||||
<h3 class="section-title">
|
||||
<i class="pi pi-cog"></i>
|
||||
OIDC Provider Configuration
|
||||
</h3>
|
||||
<p class="section-description">
|
||||
Configure your OIDC provider settings. All fields are required to enable OIDC authentication.
|
||||
</p>
|
||||
</div>
|
||||
<p-button
|
||||
[outlined]="true"
|
||||
label="Save"
|
||||
icon="pi pi-save"
|
||||
severity="success"
|
||||
size="small"
|
||||
(click)="saveOidcProvider()"
|
||||
[disabled]="!isOidcFormComplete()">
|
||||
</p-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section-body">
|
||||
<div class="config-grid">
|
||||
<div class="config-item">
|
||||
<label for="providerName">Provider Name</label>
|
||||
<input
|
||||
pInputText
|
||||
id="providerName"
|
||||
[(ngModel)]="oidcProvider.providerName"
|
||||
placeholder="e.g. Authentik, Keycloak"/>
|
||||
</div>
|
||||
|
||||
<div class="config-item">
|
||||
<label for="clientId">Client ID</label>
|
||||
<input
|
||||
pInputText
|
||||
id="clientId"
|
||||
[(ngModel)]="oidcProvider.clientId"
|
||||
placeholder="Your OIDC client ID"/>
|
||||
</div>
|
||||
|
||||
<div class="config-item full-width">
|
||||
<label for="issuerUri">Issuer URI</label>
|
||||
<input
|
||||
pInputText
|
||||
id="issuerUri"
|
||||
[(ngModel)]="oidcProvider.issuerUri"
|
||||
placeholder="e.g. https://auth.example.com/realms/booklore"/>
|
||||
</div>
|
||||
|
||||
<div class="config-item full-width">
|
||||
<label for="scope">Scope</label>
|
||||
<input
|
||||
pInputText
|
||||
id="scope"
|
||||
[readonly]="true"
|
||||
disabled="disabled"
|
||||
value="openid profile email offline_access"/>
|
||||
<span class="field-hint">Required scopes for OIDC login. Must be supported by your provider.</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-card">
|
||||
<div class="auth-option">
|
||||
<div class="auth-control">
|
||||
<label class="auth-label">Internal Authentication Enabled</label>
|
||||
<p-checkbox
|
||||
[(ngModel)]="internalAuthEnabled"
|
||||
[binary]="true"
|
||||
[disabled]="true">
|
||||
</p-checkbox>
|
||||
<div class="claims-section">
|
||||
<h4 class="subsection-title">Claim Mappings</h4>
|
||||
<p class="subsection-description">
|
||||
Map OIDC token claims to Booklore user fields. These must match your provider's token claims.
|
||||
</p>
|
||||
<div class="claims-grid">
|
||||
<div class="config-item">
|
||||
<label for="claimUsername">Username Claim</label>
|
||||
<input
|
||||
pInputText
|
||||
id="claimUsername"
|
||||
[(ngModel)]="oidcProvider.claimMapping.username"
|
||||
placeholder="e.g. preferred_username"/>
|
||||
</div>
|
||||
<div class="config-item">
|
||||
<label for="claimEmail">Email Claim</label>
|
||||
<input
|
||||
pInputText
|
||||
id="claimEmail"
|
||||
[(ngModel)]="oidcProvider.claimMapping.email"
|
||||
placeholder="e.g. email"/>
|
||||
</div>
|
||||
<div class="config-item">
|
||||
<label for="claimName">Display Name Claim</label>
|
||||
<input
|
||||
pInputText
|
||||
id="claimName"
|
||||
[(ngModel)]="oidcProvider.claimMapping.name"
|
||||
placeholder="e.g. name"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="preferences-section">
|
||||
@if (oidcEnabled) {
|
||||
<div class="settings-card">
|
||||
<div class="section-header">
|
||||
<h3 class="section-title">
|
||||
<i class="pi pi-key"></i>
|
||||
OIDC Authentication (Experimental)
|
||||
<app-external-doc-link docType="authentication"></app-external-doc-link>
|
||||
</h3>
|
||||
<p class="section-description">
|
||||
Configure external authentication providers using OpenID Connect (OIDC) protocol for seamless single sign-on integration.
|
||||
</p>
|
||||
<div class="section-header-row">
|
||||
<div class="section-header-text">
|
||||
<h3 class="section-title">
|
||||
<i class="pi pi-users"></i>
|
||||
User Provisioning
|
||||
</h3>
|
||||
<p class="section-description">
|
||||
Configure how new OIDC users are created and what permissions they receive.
|
||||
</p>
|
||||
</div>
|
||||
<p-button
|
||||
icon="pi pi-save"
|
||||
label="Save"
|
||||
[outlined]="true"
|
||||
severity="success"
|
||||
size="small"
|
||||
(click)="saveOidcAutoProvisionSettings()">
|
||||
</p-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-card">
|
||||
<div class="auth-option">
|
||||
<div class="auth-control">
|
||||
<label class="auth-label">OIDC Enabled</label>
|
||||
<p-toggleswitch
|
||||
[(ngModel)]="oidcEnabled"
|
||||
[disabled]="!isOidcFormComplete()"
|
||||
(onChange)="toggleOidcEnabled()">
|
||||
</p-toggleswitch>
|
||||
@if (!isOidcFormComplete()) {
|
||||
<div class="auth-status">
|
||||
(Fill all required fields to enable)
|
||||
</div>
|
||||
}
|
||||
<div class="section-body">
|
||||
<div class="provisioning-toggle">
|
||||
<div class="toggle-content">
|
||||
<div class="toggle-info">
|
||||
<span class="toggle-label">Automatic User Provisioning</span>
|
||||
<span class="toggle-status" [class.active]="autoUserProvisioningEnabled">
|
||||
{{ autoUserProvisioningEnabled ? 'Enabled' : 'Disabled' }}
|
||||
</span>
|
||||
</div>
|
||||
<p class="toggle-description">
|
||||
When enabled, new users are automatically created on first OIDC login with the permissions below.
|
||||
When disabled, users must be manually created in Booklore before they can log in via OIDC.
|
||||
</p>
|
||||
</div>
|
||||
<p-toggleswitch
|
||||
[(ngModel)]="autoUserProvisioningEnabled"
|
||||
inputId="autoProvision"
|
||||
(onChange)="saveOidcAutoProvisionSettings()">
|
||||
</p-toggleswitch>
|
||||
</div>
|
||||
|
||||
<div class="provider-section">
|
||||
<h4 class="subsection-title">OIDC Provider Settings</h4>
|
||||
<div class="provider-form">
|
||||
<div class="form-grid">
|
||||
<div class="form-field">
|
||||
<label for="providerName">Provider Name</label>
|
||||
<input
|
||||
pInputText
|
||||
id="providerName"
|
||||
[(ngModel)]="oidcProvider.providerName"
|
||||
placeholder="e.g. Authentik"
|
||||
class="full-width"/>
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<label for="clientId">Client ID</label>
|
||||
<input
|
||||
pInputText
|
||||
id="clientId"
|
||||
[(ngModel)]="oidcProvider.clientId"
|
||||
placeholder="e.g. my-client-id"
|
||||
class="full-width"/>
|
||||
</div>
|
||||
<div class="form-field form-field-full">
|
||||
<label for="scope">Scope</label>
|
||||
<input
|
||||
pInputText
|
||||
id="scope"
|
||||
class="full-width"
|
||||
[readonly]="true"
|
||||
disabled="disabled"
|
||||
value="openid profile email offline_access"/>
|
||||
<div class="field-info">
|
||||
<i class="pi pi-info-circle info-icon"></i>
|
||||
<span>
|
||||
Required scopes for OIDC login and token exchange. Must be supported and advertised in the provider's discovery metadata.
|
||||
</span>
|
||||
@if (autoUserProvisioningEnabled) {
|
||||
<div class="default-settings">
|
||||
<div class="permissions-group">
|
||||
<h4 class="group-title">Default Permissions</h4>
|
||||
<div class="permissions-grid">
|
||||
<div class="permission-item">
|
||||
<p-checkbox
|
||||
[binary]="true"
|
||||
[disabled]="true"
|
||||
[ngModel]="true"
|
||||
inputId="permissionRead">
|
||||
</p-checkbox>
|
||||
<label for="permissionRead">Read Books</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-field form-field-full">
|
||||
<label for="issuerUri">Issuer URI</label>
|
||||
<input
|
||||
pInputText
|
||||
id="issuerUri"
|
||||
[(ngModel)]="oidcProvider.issuerUri"
|
||||
placeholder="e.g. https://authentik.domain.com/application/o/booklore/ or https://pocket-id.domain.com"
|
||||
class="full-width"/>
|
||||
</div>
|
||||
<div class="form-field form-field-full">
|
||||
<div class="claims-grid">
|
||||
<div class="form-field">
|
||||
<label for="claimUsername">Username Claim</label>
|
||||
<input
|
||||
pInputText
|
||||
id="claimUsername"
|
||||
[(ngModel)]="oidcProvider.claimMapping.username"
|
||||
placeholder="e.g. preferred_username"
|
||||
class="full-width"/>
|
||||
@for (perm of availablePermissions; track perm) {
|
||||
<div class="permission-item">
|
||||
<p-checkbox
|
||||
[(ngModel)]="perm.selected"
|
||||
[binary]="true"
|
||||
[inputId]="perm.value">
|
||||
</p-checkbox>
|
||||
<label [for]="perm.value">{{ perm.label }}</label>
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<label for="claimEmail">Email Claim</label>
|
||||
<input
|
||||
pInputText
|
||||
id="claimEmail"
|
||||
[(ngModel)]="oidcProvider.claimMapping.email"
|
||||
placeholder="e.g. email"
|
||||
class="full-width"/>
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<label for="claimName">Display Name Claim</label>
|
||||
<input
|
||||
pInputText
|
||||
id="claimName"
|
||||
[(ngModel)]="oidcProvider.claimMapping.name"
|
||||
placeholder="e.g. name or given_name"
|
||||
class="full-width"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field-info">
|
||||
<i class="pi pi-info-circle info-icon"></i>
|
||||
<span>
|
||||
These claims are used by Booklore to provision new OIDC users with their name, username, and email. Ensure they match the claims provided by your OIDC provider.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<p-button
|
||||
[outlined]="true"
|
||||
type="button"
|
||||
label="Save Settings"
|
||||
icon="pi pi-save"
|
||||
severity="success"
|
||||
(click)="saveOidcProvider()"
|
||||
[disabled]="!isOidcFormComplete()">
|
||||
</p-button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (oidcEnabled) {
|
||||
<div class="provisioning-section">
|
||||
<h4 class="subsection-title">OIDC User Provisioning</h4>
|
||||
<div class="provisioning-form">
|
||||
<div class="auth-option">
|
||||
<div class="auth-control">
|
||||
<label class="auth-label">Automatic user provisioning</label>
|
||||
<p-toggleswitch
|
||||
[(ngModel)]="autoUserProvisioningEnabled"
|
||||
inputId="autoProvision"
|
||||
(onChange)="saveOidcAutoProvisionSettings()">
|
||||
</p-toggleswitch>
|
||||
</div>
|
||||
<div class="auth-info">
|
||||
<i class="pi pi-info-circle info-icon"></i>
|
||||
<span>
|
||||
Enabling auto-provisioning ensures that new users are automatically created with the selected default permissions. If turned off, users must be manually created in Booklore before they can log in.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (autoUserProvisioningEnabled) {
|
||||
<div class="permissions-section">
|
||||
<h5 class="permissions-title">Default permissions for auto-provisioned users</h5>
|
||||
<div class="permissions-list">
|
||||
<div class="permission-item">
|
||||
<p-checkbox
|
||||
[binary]="true"
|
||||
[disabled]="true"
|
||||
[ngModel]="true"
|
||||
inputId="permissionRead">
|
||||
</p-checkbox>
|
||||
<label for="permissionRead">Read Books</label>
|
||||
</div>
|
||||
@for (perm of availablePermissions; track perm) {
|
||||
<div class="permission-item">
|
||||
<p-checkbox
|
||||
[(ngModel)]="perm.selected"
|
||||
[binary]="true"
|
||||
[inputId]="perm.value">
|
||||
</p-checkbox>
|
||||
<label [for]="perm.value">{{ perm.label }}</label>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<h5 class="permissions-title">Default libraries for auto-provisioned users</h5>
|
||||
<div class="libraries-section">
|
||||
<p-multiSelect
|
||||
[options]="allLibraries"
|
||||
optionLabel="name"
|
||||
optionValue="id"
|
||||
[(ngModel)]="editingLibraryIds"
|
||||
placeholder="Select Libraries"
|
||||
appendTo="body">
|
||||
</p-multiSelect>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<p-button
|
||||
icon="pi pi-save"
|
||||
label="Save Settings"
|
||||
[outlined]="true"
|
||||
severity="success"
|
||||
(click)="saveOidcAutoProvisionSettings()">
|
||||
</p-button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="libraries-group">
|
||||
<h4 class="group-title">Default Library Access</h4>
|
||||
<p-multiSelect
|
||||
[options]="allLibraries"
|
||||
optionLabel="name"
|
||||
optionValue="id"
|
||||
[(ngModel)]="editingLibraryIds"
|
||||
placeholder="Select libraries new users can access"
|
||||
appendTo="body"
|
||||
styleClass="libraries-select">
|
||||
</p-multiSelect>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
+270
-175
@@ -1,179 +1,204 @@
|
||||
@use '../../../shared/styles/settings-shared' as settings;
|
||||
|
||||
.main-container {
|
||||
width: 100%;
|
||||
padding: 1rem;
|
||||
height: calc(100dvh - 10.5rem);
|
||||
overflow-y: auto;
|
||||
border-width: 1px;
|
||||
border-radius: 0.5rem;
|
||||
|
||||
@media (min-width: 768px) {
|
||||
height: calc(100dvh - 11.65rem);
|
||||
}
|
||||
@include settings.settings-page-container;
|
||||
}
|
||||
|
||||
.enclosing-container {
|
||||
border-color: var(--p-content-border-color);
|
||||
background: var(--p-content-background);
|
||||
}
|
||||
|
||||
.settings-header {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
@include settings.settings-page-header;
|
||||
|
||||
.settings-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
color: var(--p-text-color);
|
||||
margin: 0 0 0.75rem 0;
|
||||
|
||||
.pi {
|
||||
color: var(--p-primary-color);
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
@include settings.settings-page-title;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.settings-description {
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.settings-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 3rem;
|
||||
}
|
||||
|
||||
.preferences-section {
|
||||
@media (min-width: 768px) {
|
||||
padding: 0 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.section-header {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
font-size: 1.125rem;
|
||||
font-weight: 600;
|
||||
color: var(--p-text-color);
|
||||
margin: 0 0 0.5rem 0;
|
||||
|
||||
.pi {
|
||||
color: var(--p-primary-color);
|
||||
}
|
||||
}
|
||||
|
||||
.section-description {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 0.5rem;
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
|
||||
.pi {
|
||||
color: var(--p-primary-color);
|
||||
margin-top: 0.125rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
@include settings.settings-page-description;
|
||||
}
|
||||
|
||||
.settings-card {
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-radius: 8px;
|
||||
background: var(--p-content-background);
|
||||
padding: 1.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
@include settings.settings-card;
|
||||
}
|
||||
|
||||
.auth-option {
|
||||
.section-header {
|
||||
@include settings.settings-section-header;
|
||||
}
|
||||
|
||||
.section-header-row {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
|
||||
@media (max-width: 767px) {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
|
||||
p-button {
|
||||
align-self: flex-end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.section-header-text {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
@include settings.settings-section-title;
|
||||
}
|
||||
|
||||
.section-description {
|
||||
@include settings.settings-section-description;
|
||||
}
|
||||
|
||||
.section-body {
|
||||
@include settings.settings-section-body;
|
||||
}
|
||||
|
||||
// Authentication Methods List
|
||||
.auth-methods-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.auth-control {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.auth-label {
|
||||
font-weight: 500;
|
||||
color: var(--p-text-color);
|
||||
min-width: 6rem;
|
||||
}
|
||||
|
||||
.auth-info {
|
||||
.auth-method-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 0.5rem;
|
||||
font-size: 0.875rem;
|
||||
color: var(--p-text-muted-color);
|
||||
padding-left: 1rem;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-left: 3px solid var(--p-content-border-color);
|
||||
border-radius: 6px;
|
||||
padding: 1rem;
|
||||
transition: border-color 0.2s ease, background 0.2s ease;
|
||||
|
||||
&:hover:not(.is-locked) {
|
||||
background: color-mix(in srgb, var(--ground-background) 40%, var(--p-surface-800) 60%);
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
border-left-color: var(--p-green-500);
|
||||
}
|
||||
|
||||
&.is-locked {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.auth-method-content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.auth-method-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.auth-method-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
background: color-mix(in srgb, var(--p-primary-color) 15%, transparent);
|
||||
color: var(--p-primary-color);
|
||||
border-radius: 8px;
|
||||
flex-shrink: 0;
|
||||
|
||||
.pi {
|
||||
margin-top: 0.125rem;
|
||||
flex-shrink: 0;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
&.oidc {
|
||||
background: color-mix(in srgb, var(--p-orange-500) 15%, transparent);
|
||||
color: var(--p-orange-500);
|
||||
}
|
||||
}
|
||||
|
||||
.auth-status {
|
||||
font-size: 0.875rem;
|
||||
color: var(--p-text-muted-color);
|
||||
}
|
||||
|
||||
.provider-section,
|
||||
.provisioning-section {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.subsection-title {
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
color: var(--p-text-color);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.provider-form,
|
||||
.provisioning-form {
|
||||
.auth-method-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
gap: 0.125rem;
|
||||
}
|
||||
|
||||
.form-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: 1rem;
|
||||
.auth-method-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
font-weight: 600;
|
||||
font-size: 0.9375rem;
|
||||
color: var(--p-text-color);
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
.experimental-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 0.125rem 0.5rem;
|
||||
background: color-mix(in srgb, var(--p-orange-500) 15%, transparent);
|
||||
color: var(--p-orange-500);
|
||||
border-radius: 12px;
|
||||
font-size: 0.625rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.auth-method-status {
|
||||
font-size: 0.8125rem;
|
||||
font-weight: 600;
|
||||
color: var(--p-text-muted-color);
|
||||
|
||||
&.active {
|
||||
color: var(--p-green-400);
|
||||
}
|
||||
}
|
||||
|
||||
.form-field {
|
||||
.auth-method-description {
|
||||
font-size: 0.875rem;
|
||||
color: var(--p-text-muted-color);
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
padding-left: calc(36px + 0.75rem);
|
||||
|
||||
@media (max-width: 600px) {
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.config-hint {
|
||||
display: block;
|
||||
color: var(--p-orange-400);
|
||||
font-weight: 500;
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
||||
// Configuration Grid
|
||||
.config-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 1rem;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.config-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
|
||||
&.form-field-full {
|
||||
@media (min-width: 768px) {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
&.full-width {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
label {
|
||||
@@ -181,57 +206,135 @@
|
||||
color: var(--p-text-color);
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.field-hint {
|
||||
font-size: 0.8125rem;
|
||||
color: var(--p-text-muted-color);
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
// Claims Section
|
||||
.claims-section {
|
||||
margin-top: 1.5rem;
|
||||
padding-top: 1.5rem;
|
||||
border-top: 1px dashed var(--p-content-border-color);
|
||||
}
|
||||
|
||||
.subsection-title {
|
||||
font-size: 0.9375rem;
|
||||
font-weight: 600;
|
||||
color: var(--p-text-color);
|
||||
margin: 0 0 0.5rem 0;
|
||||
}
|
||||
|
||||
.subsection-description {
|
||||
font-size: 0.875rem;
|
||||
color: var(--p-text-muted-color);
|
||||
line-height: 1.5;
|
||||
margin: 0 0 1rem 0;
|
||||
}
|
||||
|
||||
.claims-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 1rem;
|
||||
|
||||
@media (min-width: 768px) {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
@media (max-width: 900px) {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.field-info {
|
||||
// Provisioning Toggle
|
||||
.provisioning-toggle {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 0.5rem;
|
||||
font-size: 0.875rem;
|
||||
color: var(--p-text-muted-color);
|
||||
margin-top: 0.5rem;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-left: 3px solid var(--p-primary-color);
|
||||
border-radius: 6px;
|
||||
padding: 1rem;
|
||||
|
||||
.pi {
|
||||
margin-top: 0.125rem;
|
||||
flex-shrink: 0;
|
||||
@media (max-width: 600px) {
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
margin-top: 1rem;
|
||||
.toggle-content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.permissions-section {
|
||||
.toggle-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.permissions-title {
|
||||
font-size: 0.875rem;
|
||||
font-weight: 600;
|
||||
color: var(--p-text-color);
|
||||
gap: 0.125rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.permissions-list {
|
||||
.toggle-label {
|
||||
font-weight: 600;
|
||||
font-size: 0.9375rem;
|
||||
color: var(--p-text-color);
|
||||
}
|
||||
|
||||
.toggle-status {
|
||||
font-size: 0.8125rem;
|
||||
font-weight: 600;
|
||||
color: var(--p-text-muted-color);
|
||||
|
||||
&.active {
|
||||
color: var(--p-green-400);
|
||||
}
|
||||
}
|
||||
|
||||
.toggle-description {
|
||||
font-size: 0.875rem;
|
||||
color: var(--p-text-muted-color);
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
// Default Settings (Permissions & Libraries)
|
||||
.default-settings {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
margin-top: 1rem;
|
||||
padding-top: 1rem;
|
||||
border-top: 1px dashed var(--p-content-border-color);
|
||||
}
|
||||
|
||||
.permissions-group,
|
||||
.libraries-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
padding-left: 1rem;
|
||||
}
|
||||
|
||||
.group-title {
|
||||
font-size: 0.9375rem;
|
||||
font-weight: 600;
|
||||
color: var(--p-text-color);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.permissions-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
||||
gap: 0.625rem;
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
|
||||
.permission-item {
|
||||
@@ -246,15 +349,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.libraries-section {
|
||||
padding-left: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.full-width {
|
||||
.libraries-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.info-icon {
|
||||
color: #3b82f6;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user