Progressive UI Refinements for Mobile and Desktop Layouts
This commit is contained in:
committed by
Aditya Chandel
parent
fe2d307d2a
commit
06e58233b1
@@ -1,7 +1,7 @@
|
||||
<div class="relative flex flex-row">
|
||||
<div class="flex flex-col w-full">
|
||||
|
||||
<div class="flex items-center justify-between w-full gap-4 py-2 px-2 md:px-4 rounded-t-xl mb-4 bg-[var(--card-background)]">
|
||||
<div class="flex items-center justify-between w-full gap-4 py-2 px-2 md:px-4 rounded-t-xl md:mb-4 mb-2 bg-[var(--card-background)]">
|
||||
<div class="flex items-center min-w-0 max-w-full flex-shrink">
|
||||
@if (entityType$ | async; as entityType) {
|
||||
<p class="text-xl whitespace-nowrap overflow-hidden text-ellipsis w-full">
|
||||
@@ -252,40 +252,38 @@
|
||||
</div>
|
||||
}
|
||||
@if (bookState?.books; as books) {
|
||||
<div class="book-card-container">
|
||||
@if (currentViewMode === 'table' && books.length > 0) {
|
||||
<app-book-table
|
||||
[books]="books"
|
||||
(selectedBooksChange)="onSelectedBooksChange($event)"
|
||||
[sortOption]="this.bookSorter.selectedSort!"
|
||||
[visibleColumns]="visibleColumns"
|
||||
></app-book-table>
|
||||
}
|
||||
@if (currentViewMode === 'grid') {
|
||||
<virtual-scroller class="virtual-scroller" #scroll [items]="books">
|
||||
<div
|
||||
class="grid"
|
||||
#container
|
||||
[ngStyle]="{'grid-template-columns': 'repeat(auto-fill, minmax(' + gridColumnMinWidth + ', 1fr))'}">
|
||||
@for (book of scroll.viewPortItems; let i = $index; track book) {
|
||||
<div
|
||||
class="virtual-scroller-item relative"
|
||||
[ngStyle]="{width: currentCardSize.width + 'px', height: currentCardSize.height + 'px'}">
|
||||
<app-book-card
|
||||
[index]="i"
|
||||
[book]="book"
|
||||
[isCheckboxEnabled]="true"
|
||||
[onBookSelect]="handleBookSelect.bind(this)"
|
||||
[isSeriesCollapsed]="seriesCollapseFilter.isSeriesCollapsed"
|
||||
(checkboxClick)="onCheckboxClicked($event)"
|
||||
[isSelected]="selectedBooks.has(book.id)">
|
||||
</app-book-card>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</virtual-scroller>
|
||||
}
|
||||
</div>
|
||||
@if (currentViewMode === 'table' && books.length > 0) {
|
||||
<app-book-table
|
||||
[books]="books"
|
||||
(selectedBooksChange)="onSelectedBooksChange($event)"
|
||||
[sortOption]="this.bookSorter.selectedSort!"
|
||||
[visibleColumns]="visibleColumns"
|
||||
></app-book-table>
|
||||
}
|
||||
@if (currentViewMode === 'grid') {
|
||||
<virtual-scroller class="virtual-scroller" #scroll [items]="books">
|
||||
<div
|
||||
class="grid"
|
||||
#container
|
||||
[ngStyle]="{'grid-template-columns': 'repeat(auto-fill, minmax(' + gridColumnMinWidth + ', 1fr))'}">
|
||||
@for (book of scroll.viewPortItems; let i = $index; track book) {
|
||||
<div
|
||||
class="virtual-scroller-item relative"
|
||||
[ngStyle]="{width: currentCardSize.width + 'px', height: currentCardSize.height + 'px'}">
|
||||
<app-book-card
|
||||
[index]="i"
|
||||
[book]="book"
|
||||
[isCheckboxEnabled]="true"
|
||||
[onBookSelect]="handleBookSelect.bind(this)"
|
||||
[isSeriesCollapsed]="seriesCollapseFilter.isSeriesCollapsed"
|
||||
(checkboxClick)="onCheckboxClicked($event)"
|
||||
[isSelected]="selectedBooks.has(book.id)">
|
||||
</app-book-card>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</virtual-scroller>
|
||||
}
|
||||
}
|
||||
@if (selectedBooks.size > 0) {
|
||||
@if (userService.userState$ | async; as userData) {
|
||||
|
||||
@@ -18,6 +18,12 @@
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.virtual-scroller {
|
||||
height: calc(100dvh - 9rem);
|
||||
}
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(1px, 1fr));
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
showGridlines
|
||||
stripedRows
|
||||
[scrollable]="true"
|
||||
[scrollHeight]="'calc(100dvh - 160px)'"
|
||||
[scrollHeight]="scrollHeight"
|
||||
[virtualScroll]="true"
|
||||
[virtualScrollItemSize]="46"
|
||||
[(selection)]="selectedBooks"
|
||||
|
||||
@@ -70,6 +70,8 @@ export class BookTableComponent implements OnInit, OnDestroy, OnChanges {
|
||||
{field: 'hardcoverReviewCount', header: 'HC #'}
|
||||
];
|
||||
|
||||
scrollHeight = 'calc(100dvh - 160px)';
|
||||
|
||||
ngOnInit(): void {
|
||||
this.userService.userState$
|
||||
.pipe(
|
||||
@@ -79,6 +81,16 @@ export class BookTableComponent implements OnInit, OnDestroy, OnChanges {
|
||||
.subscribe(user => {
|
||||
this.metadataCenterViewMode = user?.userSettings.metadataCenterViewMode ?? 'route';
|
||||
});
|
||||
|
||||
this.setScrollHeight();
|
||||
window.addEventListener('resize', this.setScrollHeight.bind(this));
|
||||
}
|
||||
|
||||
setScrollHeight() {
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
this.scrollHeight = isMobile
|
||||
? 'calc(100dvh - 125px)'
|
||||
: 'calc(100dvh - 150px)';
|
||||
}
|
||||
|
||||
ngOnChanges() {
|
||||
@@ -255,5 +267,6 @@ export class BookTableComponent implements OnInit, OnDestroy, OnChanges {
|
||||
ngOnDestroy(): void {
|
||||
this.destroy$.next();
|
||||
this.destroy$.complete();
|
||||
window.removeEventListener('resize', this.setScrollHeight.bind(this));
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@
|
||||
<div class="epub-header">
|
||||
<div>
|
||||
<p-button size="small" class="menu-toggle-button" (click)="toggleDrawer()" icon="pi pi-bars" severity="secondary"></p-button>
|
||||
<p-drawer [(visible)]="isDrawerVisible" [modal]="false" [position]="'left'" header="Chapters">
|
||||
<p-drawer [(visible)]="isDrawerVisible" [modal]="true" [position]="'left'" header="Chapters">
|
||||
<ul class="chapter-list">
|
||||
@for (chapter of chapters; track chapter) {
|
||||
<li (click)="navigateToChapter(chapter); $event.stopPropagation()" class="chapter-item">
|
||||
@@ -29,7 +29,7 @@
|
||||
}
|
||||
<div>
|
||||
<p-button size="small" class="settings-toggle-button" (click)="toggleSettingsDrawer()" icon="pi pi-cog" severity="secondary"></p-button>
|
||||
<p-drawer [(visible)]="isSettingsDrawerVisible" [modal]="false" [position]="'right'" header="Settings">
|
||||
<p-drawer [(visible)]="isSettingsDrawerVisible" [modal]="true" [position]="'right'" header="Settings">
|
||||
<div class="flex flex-col gap-4 max-w-md mx-auto">
|
||||
|
||||
<div class="flex items-center gap-4">
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<div class="w-full h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
<div class="w-full h-[calc(100dvh-10.5rem)] md:h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
|
||||
<div class="p-4">
|
||||
<p class="text-lg gap-2 pb-4 pt-4">Internal Authentication:</p>
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.dashboard-container {
|
||||
height: calc(100dvh - 5rem);
|
||||
}
|
||||
}
|
||||
|
||||
.dashboard {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
<div class="rounded-xl overflow-hidden">
|
||||
<p-tabs [value]="tab" lazy="true" scrollable >
|
||||
<p-tabs [value]="tab" lazy="true" scrollable>
|
||||
<p-tablist>
|
||||
<p-tab value="view">
|
||||
<i [class]="'pi pi-book'"></i>
|
||||
@@ -18,7 +18,7 @@
|
||||
</p-tab>
|
||||
}
|
||||
</p-tablist>
|
||||
<p-tabpanels class="overflow-auto" style="height: calc(100dvh - 9.7rem);">
|
||||
<p-tabpanels class="tabpanels-responsive overflow-auto">
|
||||
<p-tabpanel value="view">
|
||||
<app-metadata-viewer [book$]="book$" [recommendedBooks]="recommendedBooks"></app-metadata-viewer>
|
||||
</p-tabpanel>
|
||||
|
||||
+8
@@ -1 +1,9 @@
|
||||
.tabpanels-responsive {
|
||||
height: calc(100vh - 9.7rem);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.tabpanels-responsive {
|
||||
height: calc(100vh - 8.5rem);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
<div class="p-0 md:p-2 flex flex-col h-full w-full rounded-xl">
|
||||
@if (book$ | async; as book) {
|
||||
<div class="flex flex-col md:flex-row gap-6 pb-8">
|
||||
<div class="flex flex-col md:flex-row gap-4 md:gap-6 pb-8">
|
||||
|
||||
<div class="flex justify-center md:justify-start">
|
||||
<div class="relative w-[250px] min-w-[250px] md:w-[250px]">
|
||||
<div class="relative w-[175px] md:w-[250px]">
|
||||
<img
|
||||
[attr.src]="urlHelper.getCoverUrl(book?.metadata!.bookId, book?.metadata!.coverUpdatedOn)"
|
||||
class="rounded-xl w-full object-cover"
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
<div class="flex flex-col items-center md:items-start gap-1">
|
||||
<div class="flex items-center gap-2 justify-center md:justify-start flex-wrap text-center md:text-left">
|
||||
<h2 class="text-3xl font-extrabold leading-tight">
|
||||
<h2 class="text-2xl md:text-3xl font-extrabold leading-tight">
|
||||
{{ book?.metadata!.title }}
|
||||
</h2>
|
||||
<i
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="w-full h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg p-4 enclosing-container">
|
||||
<div class="w-full h-[calc(100dvh-10.5rem)] md:h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg p-4 enclosing-container">
|
||||
<div class="pt-2">
|
||||
<app-email-provider></app-email-provider>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="w-full h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
<div class="w-full h-[calc(100dvh-10.5rem)] md:h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
|
||||
<div class="px-4 pt-4 pb-2">
|
||||
<div class="flex items-center gap-2 pb-4 pt-4">
|
||||
@@ -130,14 +130,6 @@
|
||||
<p-divider></p-divider>
|
||||
</div>
|
||||
|
||||
<div class="px-4 py-2">
|
||||
<app-opds-settings></app-opds-settings>
|
||||
</div>
|
||||
|
||||
<div class="pt-2 pb-4">
|
||||
<p-divider></p-divider>
|
||||
</div>
|
||||
|
||||
<div class="px-4 py-2">
|
||||
<app-file-upload-pattern></app-file-upload-pattern>
|
||||
</div>
|
||||
|
||||
+3
-2
@@ -36,15 +36,16 @@
|
||||
<form [formGroup]="form">
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-y-4 gap-x-6">
|
||||
@for (key of orderedKeys; track key) {
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="flex text-sm items-center gap-2">
|
||||
<label class="capitalize w-full max-w-[150px]">
|
||||
{{ labelMap[key] }}
|
||||
</label>
|
||||
<input
|
||||
pSize="small"
|
||||
type="number"
|
||||
pInputText
|
||||
[formControlName]="key"
|
||||
class="w-20 text-center"
|
||||
class="w-16 text-center"
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
|
||||
+168
-168
@@ -1,181 +1,181 @@
|
||||
<p class="text-lg flex items-center gap-2">
|
||||
OPDS Server Settings
|
||||
<i
|
||||
class="pi pi-info-circle text-sky-600"
|
||||
pTooltip="OPDS allows your book collection to be accessed by compatible reading apps through your private server."
|
||||
tooltipPosition="right"
|
||||
style="cursor: pointer;">
|
||||
</i>
|
||||
</p>
|
||||
<div class="flex flex-col space-y-6 p-4 m-4 custom-border">
|
||||
<div class="w-full h-[calc(100dvh-10.5rem)] md:h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
<p class="text-lg flex items-center gap-2 px-4 pt-4 pb-2">
|
||||
OPDS Server Settings
|
||||
<i
|
||||
class="pi pi-info-circle text-sky-600"
|
||||
pTooltip="OPDS allows your book collection to be accessed by compatible reading apps through your private server."
|
||||
tooltipPosition="right"
|
||||
style="cursor: pointer;">
|
||||
</i>
|
||||
</p>
|
||||
<div class="flex flex-col space-y-6 p-4 m-4 custom-border">
|
||||
|
||||
<div class="flex items-center gap-4">
|
||||
<p class="py-1">OPDS Server Enabled:</p>
|
||||
<p-toggleswitch
|
||||
[(ngModel)]="opdsEnabled"
|
||||
(onChange)="toggleOpdsServer()">
|
||||
</p-toggleswitch>
|
||||
<div class="flex items-center gap-4">
|
||||
<p class="py-1">OPDS Server Enabled:</p>
|
||||
<p-toggleswitch
|
||||
[(ngModel)]="opdsEnabled"
|
||||
(onChange)="toggleOpdsServer()">
|
||||
</p-toggleswitch>
|
||||
</div>
|
||||
|
||||
@if (opdsEnabled) {
|
||||
<div class="flex items-center gap-2 mt-4">
|
||||
<p class="text-lg py-1">OPDS Endpoint:</p>
|
||||
<div class="flex items-center gap-4">
|
||||
<input
|
||||
class="min-w-[600px] max-w-[600px]"
|
||||
type="text"
|
||||
pInputText
|
||||
[value]="opdsEndpoint"
|
||||
readonly/>
|
||||
<p-button
|
||||
icon="pi pi-copy"
|
||||
severity="info"
|
||||
(onClick)="copyOpdsEndpoint()"
|
||||
label="Copy"
|
||||
outlined="true">
|
||||
</p-button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (opdsEnabled) {
|
||||
<div class="mt-6">
|
||||
<div class="flex justify-between items-center">
|
||||
<h2 class="text-lg flex items-center gap-2">
|
||||
Current OPDS Users:
|
||||
</h2>
|
||||
<p-button
|
||||
label="Create OPDS User"
|
||||
icon="pi pi-plus"
|
||||
outlined="true"
|
||||
(onClick)="openCreateUserDialog()">
|
||||
</p-button>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<p-table [value]="users" [responsiveLayout]="'scroll'">
|
||||
<ng-template pTemplate="header">
|
||||
<tr>
|
||||
<th>Username</th>
|
||||
<th>Password</th>
|
||||
<th>Reset Password</th>
|
||||
<th>Delete</th>
|
||||
</tr>
|
||||
</ng-template>
|
||||
<ng-template pTemplate="body" let-user>
|
||||
<tr>
|
||||
<td>{{ user.username }}</td>
|
||||
<td class="flex items-center gap-2">
|
||||
<p-password
|
||||
[(ngModel)]="dummyPassword"
|
||||
[disabled]="true">
|
||||
</p-password>
|
||||
<i
|
||||
class="pi pi-info-circle text-sky-600"
|
||||
pTooltip="The password is hidden for security reasons and is only visible once during creation. You can reset the password if needed."
|
||||
tooltipPosition="right"
|
||||
style="cursor: pointer;">
|
||||
</i>
|
||||
</td>
|
||||
<td>
|
||||
<p-button
|
||||
icon="pi pi-key"
|
||||
severity="warn"
|
||||
size="small"
|
||||
outlined="true"
|
||||
(onClick)="openResetPasswordDialog(user)">
|
||||
</p-button>
|
||||
</td>
|
||||
<td>
|
||||
<p-button
|
||||
icon="pi pi-trash"
|
||||
severity="danger"
|
||||
size="small"
|
||||
outlined="true"
|
||||
(onClick)="deleteUser(user.id)">
|
||||
</p-button>
|
||||
</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
</p-table>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<p-dialog
|
||||
header="Create New OPDS User"
|
||||
[(visible)]="createUserDialogVisible"
|
||||
[modal]="true"
|
||||
[style]="{ width: '400px' }">
|
||||
<div>
|
||||
<div>
|
||||
<label for="username">Username</label>
|
||||
<input id="username" type="text" pInputText [(ngModel)]="newUser.username" class="w-full"/>
|
||||
</div>
|
||||
|
||||
@if (opdsEnabled) {
|
||||
<div class="flex items-center gap-2 mt-4">
|
||||
<p class="text-lg py-1">OPDS Endpoint:</p>
|
||||
<div class="flex items-center gap-4">
|
||||
<input
|
||||
class="min-w-[600px] max-w-[600px]"
|
||||
type="text"
|
||||
pInputText
|
||||
[value]="opdsEndpoint"
|
||||
readonly/>
|
||||
<div class="mt-4">
|
||||
<div class="flex items-center gap-2">
|
||||
<label for="password">Password</label>
|
||||
<i
|
||||
class="pi pi-info-circle text-yellow-500"
|
||||
pTooltip="Password can only be seen now. It won’t be retrievable later. Please save it securely."
|
||||
tooltipPosition="right"
|
||||
style="cursor: pointer;">
|
||||
</i>
|
||||
</div>
|
||||
<input id="password" pInputText [(ngModel)]="newUser.password" class="w-full"/>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end mt-6 gap-4">
|
||||
<p-button
|
||||
icon="pi pi-copy"
|
||||
severity="info"
|
||||
(onClick)="copyOpdsEndpoint()"
|
||||
label="Copy"
|
||||
outlined="true">
|
||||
label="Cancel"
|
||||
icon="pi pi-times"
|
||||
severity="secondary"
|
||||
(onClick)="cancelCreateUser()">
|
||||
</p-button>
|
||||
<p-button
|
||||
label="Save"
|
||||
icon="pi pi-check"
|
||||
severity="success"
|
||||
(onClick)="saveNewUser()">
|
||||
</p-button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</p-dialog>
|
||||
<p-dialog
|
||||
header="Reset User Password"
|
||||
[(visible)]="resetPasswordDialogVisible"
|
||||
[modal]="true"
|
||||
[style]="{ width: '400px' }">
|
||||
<div>
|
||||
<p class="mb-6 mt-2">Reset password for: <b>{{ selectedUser?.username }}</b></p>
|
||||
<div>
|
||||
<div class="flex items-center">
|
||||
<label for="newPassword">New Password</label>
|
||||
<i
|
||||
class="pi pi-info-circle text-yellow-500 ml-2"
|
||||
pTooltip="Password can only be seen now. It won’t be retrievable later. Please save it securely."
|
||||
tooltipPosition="right"
|
||||
style="cursor: pointer;">
|
||||
</i>
|
||||
</div>
|
||||
<input id="newPassword" pInputText [(ngModel)]="newPassword" class="w-full"/>
|
||||
</div>
|
||||
|
||||
@if (opdsEnabled) {
|
||||
<div class="mt-6">
|
||||
<div class="flex justify-between items-center">
|
||||
<h2 class="text-lg flex items-center gap-2">
|
||||
Current OPDS Users:
|
||||
</h2>
|
||||
<div class="flex justify-end mt-4 gap-4">
|
||||
<p-button
|
||||
label="Create OPDS User"
|
||||
icon="pi pi-plus"
|
||||
outlined="true"
|
||||
(onClick)="openCreateUserDialog()">
|
||||
label="Cancel"
|
||||
icon="pi pi-times"
|
||||
severity="secondary"
|
||||
(onClick)="cancelResetPassword()">
|
||||
</p-button>
|
||||
<p-button
|
||||
label="Save"
|
||||
icon="pi pi-check"
|
||||
severity="success"
|
||||
(onClick)="confirmResetPassword()">
|
||||
</p-button>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<p-table [value]="users" [responsiveLayout]="'scroll'">
|
||||
<ng-template pTemplate="header">
|
||||
<tr>
|
||||
<th>Username</th>
|
||||
<th>Password</th>
|
||||
<th>Reset Password</th>
|
||||
<th>Delete</th>
|
||||
</tr>
|
||||
</ng-template>
|
||||
<ng-template pTemplate="body" let-user>
|
||||
<tr>
|
||||
<td>{{ user.username }}</td>
|
||||
<td class="flex items-center gap-2">
|
||||
<p-password
|
||||
[(ngModel)]="dummyPassword"
|
||||
[disabled]="true">
|
||||
</p-password>
|
||||
<i
|
||||
class="pi pi-info-circle text-sky-600"
|
||||
pTooltip="The password is hidden for security reasons and is only visible once during creation. You can reset the password if needed."
|
||||
tooltipPosition="right"
|
||||
style="cursor: pointer;">
|
||||
</i>
|
||||
</td>
|
||||
<td>
|
||||
<p-button
|
||||
icon="pi pi-key"
|
||||
severity="warn"
|
||||
size="small"
|
||||
outlined="true"
|
||||
(onClick)="openResetPasswordDialog(user)">
|
||||
</p-button>
|
||||
</td>
|
||||
<td>
|
||||
<p-button
|
||||
icon="pi pi-trash"
|
||||
severity="danger"
|
||||
size="small"
|
||||
outlined="true"
|
||||
(onClick)="deleteUser(user.id)">
|
||||
</p-button>
|
||||
</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
</p-table>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</p-dialog>
|
||||
</div>
|
||||
|
||||
<p-dialog
|
||||
header="Create New OPDS User"
|
||||
[(visible)]="createUserDialogVisible"
|
||||
[modal]="true"
|
||||
[style]="{ width: '400px' }">
|
||||
<div>
|
||||
<div>
|
||||
<label for="username">Username</label>
|
||||
<input id="username" type="text" pInputText [(ngModel)]="newUser.username" class="w-full"/>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<div class="flex items-center gap-2">
|
||||
<label for="password">Password</label>
|
||||
<i
|
||||
class="pi pi-info-circle text-yellow-500"
|
||||
pTooltip="Password can only be seen now. It won’t be retrievable later. Please save it securely."
|
||||
tooltipPosition="right"
|
||||
style="cursor: pointer;">
|
||||
</i>
|
||||
</div>
|
||||
<input id="password" pInputText [(ngModel)]="newUser.password" class="w-full"/>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end mt-6 gap-4">
|
||||
<p-button
|
||||
label="Cancel"
|
||||
icon="pi pi-times"
|
||||
severity="secondary"
|
||||
(onClick)="cancelCreateUser()">
|
||||
</p-button>
|
||||
<p-button
|
||||
label="Save"
|
||||
icon="pi pi-check"
|
||||
severity="success"
|
||||
(onClick)="saveNewUser()">
|
||||
</p-button>
|
||||
</div>
|
||||
</div>
|
||||
</p-dialog>
|
||||
|
||||
<p-dialog
|
||||
header="Reset User Password"
|
||||
[(visible)]="resetPasswordDialogVisible"
|
||||
[modal]="true"
|
||||
[style]="{ width: '400px' }">
|
||||
<div>
|
||||
<p class="mb-6 mt-2">Reset password for: <b>{{ selectedUser?.username }}</b></p>
|
||||
<div>
|
||||
<div class="flex items-center">
|
||||
<label for="newPassword">New Password</label>
|
||||
<i
|
||||
class="pi pi-info-circle text-yellow-500 ml-2"
|
||||
pTooltip="Password can only be seen now. It won’t be retrievable later. Please save it securely."
|
||||
tooltipPosition="right"
|
||||
style="cursor: pointer;">
|
||||
</i>
|
||||
</div>
|
||||
<input id="newPassword" pInputText [(ngModel)]="newPassword" class="w-full"/>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end mt-4 gap-4">
|
||||
<p-button
|
||||
label="Cancel"
|
||||
icon="pi pi-times"
|
||||
severity="secondary"
|
||||
(onClick)="cancelResetPassword()">
|
||||
</p-button>
|
||||
<p-button
|
||||
label="Save"
|
||||
icon="pi pi-check"
|
||||
severity="success"
|
||||
(onClick)="confirmResetPassword()">
|
||||
</p-button>
|
||||
</div>
|
||||
</div>
|
||||
</p-dialog>
|
||||
|
||||
+4
@@ -1,3 +1,7 @@
|
||||
.enclosing-container {
|
||||
border-color: var(--p-content-border-color);
|
||||
}
|
||||
|
||||
.custom-border {
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--card-border);
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<div class="w-full h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
<div class="w-full h-[calc(100dvh-10.5rem)] md:h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
|
||||
<div class="p-4 pt-6 min-w-[50rem]">
|
||||
<p class="text-lg pb-4 pt-2">Auto-Download Metadata for Files in BookDrop Folder:</p>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="w-full h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
<div class="w-full h-[calc(100dvh-10.5rem)] md:h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
<div class="p-4">
|
||||
<p class="text-lg pb-4 pt-4 ">
|
||||
Book Reader Settings: Global or Per-Book
|
||||
|
||||
@@ -4,27 +4,30 @@
|
||||
<p-tabs [(value)]="activeTab" scrollable>
|
||||
<p-tablist>
|
||||
<p-tab [value]="SettingsTab.ReaderSettings">
|
||||
<i class="pi pi-book"></i> Reader Preferences
|
||||
<i class="pi pi-book"></i> Reader
|
||||
</p-tab>
|
||||
<p-tab [value]="SettingsTab.ViewPreferences">
|
||||
<i class="pi pi-desktop"></i> View Preferences
|
||||
<i class="pi pi-desktop"></i> View
|
||||
</p-tab>
|
||||
@if (userData.permissions.admin) {
|
||||
<p-tab [value]="SettingsTab.MetadataSettings">
|
||||
<i class="pi pi-sliders-h"></i> Metadata Settings
|
||||
<i class="pi pi-sliders-h"></i> Metadata
|
||||
</p-tab>
|
||||
<p-tab [value]="SettingsTab.ApplicationSettings">
|
||||
<i class="pi pi-cog"></i> Application Settings
|
||||
<i class="pi pi-cog"></i> Application
|
||||
</p-tab>
|
||||
<p-tab [value]="SettingsTab.UserManagement">
|
||||
<i class="pi pi-users"></i> User Management
|
||||
<i class="pi pi-users"></i> User
|
||||
</p-tab>
|
||||
<p-tab [value]="SettingsTab.EmailSettings">
|
||||
<i class="pi pi-envelope"></i> Email Settings
|
||||
<i class="pi pi-envelope"></i> Email
|
||||
</p-tab>
|
||||
<p-tab [value]="SettingsTab.AuthenticationSettings">
|
||||
<i class="pi pi-lock"></i> Authentication
|
||||
</p-tab>
|
||||
<p-tab [value]="SettingsTab.Opds">
|
||||
<i class="pi pi-globe"></i> OPDS
|
||||
</p-tab>
|
||||
}
|
||||
</p-tablist>
|
||||
<p-tabpanels>
|
||||
@@ -50,6 +53,9 @@
|
||||
<p-tabpanel [value]="SettingsTab.AuthenticationSettings">
|
||||
<app-authentication-settings></app-authentication-settings>
|
||||
</p-tabpanel>
|
||||
<p-tabpanel [value]="SettingsTab.Opds">
|
||||
<app-opds-settings></app-opds-settings>
|
||||
</p-tabpanel>
|
||||
}
|
||||
</p-tabpanels>
|
||||
</p-tabs>
|
||||
|
||||
@@ -11,6 +11,7 @@ import {AuthenticationSettingsComponent} from '../core/security/oauth2-managemen
|
||||
import {ViewPreferencesParentComponent} from './view-preferences-parent/view-preferences-parent.component';
|
||||
import {ReaderPreferences} from './reader-preferences/reader-preferences.component';
|
||||
import {MetadataSettingsComponent} from './metadata-settings-component/metadata-settings-component';
|
||||
import {OpdsSettingsComponent} from './global-preferences/opds-settings/opds-settings.component';
|
||||
|
||||
export enum SettingsTab {
|
||||
ReaderSettings = 'reader-settings',
|
||||
@@ -19,7 +20,8 @@ export enum SettingsTab {
|
||||
EmailSettings = 'email-settings',
|
||||
MetadataSettings = 'metadata-settings',
|
||||
ApplicationSettings = 'app-settings',
|
||||
AuthenticationSettings = 'auth-settings'
|
||||
AuthenticationSettings = 'auth-settings',
|
||||
Opds = 'opds-settings'
|
||||
}
|
||||
|
||||
@Component({
|
||||
@@ -37,8 +39,9 @@ export enum SettingsTab {
|
||||
AuthenticationSettingsComponent,
|
||||
ViewPreferencesParentComponent,
|
||||
ReaderPreferences,
|
||||
MetadataSettingsComponent
|
||||
],
|
||||
MetadataSettingsComponent,
|
||||
OpdsSettingsComponent
|
||||
],
|
||||
templateUrl: './settings.component.html',
|
||||
styleUrl: './settings.component.scss'
|
||||
})
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="w-full h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg p-4 enclosing-container">
|
||||
<div class="w-full h-[calc(100dvh-10.5rem)] md:h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg p-4 enclosing-container">
|
||||
|
||||
<div class="flex justify-between items-center pb-2 pt-2">
|
||||
<h2 class="text-lg flex items-center gap-2">
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<div class="w-full h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
<div class="w-full h-[calc(100dvh-10.5rem)] md:h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
<app-view-preferences></app-view-preferences>
|
||||
<p-divider></p-divider>
|
||||
<app-sidebar-sorting-preferences></app-sidebar-sorting-preferences>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
.layout-wrapper {
|
||||
.layout-main-container {
|
||||
padding: 4.75rem 0.75rem 0.75rem 0.75rem;
|
||||
padding: 4.4rem 0.5rem 0.5rem 0.5rem;
|
||||
}
|
||||
|
||||
.layout-sidebar {
|
||||
|
||||
Reference in New Issue
Block a user