Checkpoint
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
</div>
|
||||
<div class="book-card-container" *ngIf="(bookState$ | async)?.books as books">
|
||||
<virtual-scroller *ngIf="books.length > 0" class="virtual-scroller" #scroll [items]="books">
|
||||
<div class="grid" #container>
|
||||
<div class="grid grid-cols-12 gap-4" #container>
|
||||
<div class="virtual-scroller-item" *ngFor="let book of scroll.viewPortItems">
|
||||
<app-book-card
|
||||
[book]="book"
|
||||
|
||||
@@ -64,7 +64,6 @@
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
|
||||
gap: 1.3rem;
|
||||
padding: 1rem;
|
||||
overflow: hidden;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ import {Ripple} from 'primeng/ripple';
|
||||
[queryParams]="item.queryParams"
|
||||
[attr.target]="item.target" tabindex="0" pRipple>
|
||||
<i [ngClass]="item.icon" class="layout-menuitem-icon"></i>
|
||||
<span class="layout-menuitem-text flex justify-content-between w-full">
|
||||
<span class="layout-menuitem-text w-full">
|
||||
{{ item.label }}
|
||||
<span *ngIf="item.bookCount$ | async as bookCount">
|
||||
{{ bookCount }}
|
||||
|
||||
@@ -1,42 +1,47 @@
|
||||
<div class="layout-topbar">
|
||||
|
||||
<a class="layout-topbar-logo" routerLink="">
|
||||
<img src="assets/layout/images/{{layoutService.config().colorScheme === 'light' ? 'logo-dark' : 'logo-white'}}.svg" alt="logo">
|
||||
<img src="assets/layout/images/{{layoutService.config().colorScheme === 'light' ? 'logo-dark' : 'logo-white'}}.svg"
|
||||
alt="logo">
|
||||
<span>BookLore</span>
|
||||
</a>
|
||||
|
||||
<button #menubutton class="p-link layout-menu-button layout-topbar-button" (click)="layoutService.onMenuToggle()">
|
||||
<i class="pi pi-bars"></i>
|
||||
</button>
|
||||
<p-button #menubutton icon="pi pi-arrow-left" [rounded]="true" [outlined]="true" (click)="layoutService.onMenuToggle()"></p-button>
|
||||
|
||||
<div>
|
||||
<div class="xxx">
|
||||
<app-search></app-search>
|
||||
<ul class="topbar-items">
|
||||
<li>
|
||||
<i class="topbar-item pi pi-wave-pulse p-link layout-topbar-menu-button layout-topbar-button"
|
||||
(click)="toggleEventDisplay()"
|
||||
(mouseenter)="onMouseEnter()"
|
||||
(mouseleave)="onMouseLeave()"
|
||||
[class.pulsating]="eventHighlight"
|
||||
[class.highlight]="eventHighlight"></i>
|
||||
<div *ngIf="showEvents" class="live-event-container" (mouseleave)="onMouseLeave()">
|
||||
<p *ngIf="latestEvent.timestamp">{{ latestEvent.timestamp }}</p>
|
||||
<p>{{ latestEvent.message }}</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a class="topbar-item">
|
||||
<i class="pi pi-plus-circle text-surface-700 dark:text-surface-100" (click)="openLibraryCreatorDialog()"
|
||||
pTooltip="Create New Library" tooltipPosition="top"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="topbar-item">
|
||||
<i class="pi pi-upload text-surface-700 dark:text-surface-100" (click)="openFileUploadDialog()"
|
||||
pTooltip="Upload book" tooltipPosition="top"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="relative">
|
||||
<button type="button" class="topbar-item config-item" enterActiveClass="animate-scalein" enterFromClass="hidden" leaveActiveClass="animate-fadeout" leaveToClass="hidden" pStyleClass="@next" [hideOnOutsideClick]="true">
|
||||
<i class="pi pi-palette"></i>
|
||||
</button>
|
||||
<app-configurator></app-configurator>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<button #topbarmenubutton class="p-link layout-topbar-menu-button layout-topbar-button" (click)="layoutService.showProfileSidebar()">
|
||||
<i class="pi pi-ellipsis-v"></i>
|
||||
</button>
|
||||
|
||||
<div #topbarmenu class="layout-topbar-menu">
|
||||
<button class="p-link layout-topbar-button"
|
||||
(click)="toggleEventDisplay()"
|
||||
(mouseenter)="onMouseEnter()"
|
||||
(mouseleave)="onMouseLeave()"
|
||||
[class.pulsating]="eventHighlight"
|
||||
[class.highlight]="eventHighlight">
|
||||
<i class="pi pi-wave-pulse"></i>
|
||||
</button>
|
||||
|
||||
<div *ngIf="showEvents" class="live-event-container" (mouseleave)="onMouseLeave()">
|
||||
<p *ngIf="latestEvent.timestamp">{{ latestEvent.timestamp }}</p>
|
||||
<p>{{ latestEvent.message }}</p>
|
||||
</div>
|
||||
<button class="p-link layout-menu-button layout-topbar-button" (click)="openLibraryCreatorDialog()" pTooltip="Create New Library" tooltipPosition="top">
|
||||
<i class="pi pi-plus-circle"></i>
|
||||
</button>
|
||||
<p-button [rounded]="true" [outlined]="true" severity="help" (click)="openFileUploadDialog()">
|
||||
<i class="pi pi-upload"></i>
|
||||
</p-button>
|
||||
<p-button [rounded]="true" [outlined]="true" severity="help"> </p-button>
|
||||
<app-configurator></app-configurator>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -37,3 +37,4 @@
|
||||
.pulsating {
|
||||
animation: pulsate 1.5s infinite ease-in-out;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,11 +9,12 @@ import {FormsModule} from '@angular/forms';
|
||||
import {InputTextModule} from 'primeng/inputtext';
|
||||
import {SearchComponent} from '../search/search.component';
|
||||
import {FileUploadComponent} from '../file-upload/file-upload.component';
|
||||
import {NgClass, NgIf} from '@angular/common';
|
||||
import {NgIf} from '@angular/common';
|
||||
import {EventService} from '../../service/event.service';
|
||||
import {LogNotification} from '../../model/log-notification.model';
|
||||
import {Button} from 'primeng/button';
|
||||
import {AppConfiguratorComponent} from '../../../configurator/configurator.component';
|
||||
import {StyleClass} from 'primeng/styleclass';
|
||||
|
||||
@Component({
|
||||
selector: 'app-topbar',
|
||||
@@ -27,7 +28,8 @@ import {AppConfiguratorComponent} from '../../../configurator/configurator.compo
|
||||
SearchComponent,
|
||||
NgIf,
|
||||
Button,
|
||||
AppConfiguratorComponent
|
||||
AppConfiguratorComponent,
|
||||
StyleClass
|
||||
],
|
||||
})
|
||||
export class AppTopBarComponent implements OnDestroy {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<p-stepper>
|
||||
<p-stepper header="Library Name">
|
||||
<ng-template pTemplate="content" let-nextCallback="nextCallback" let-index="index">
|
||||
<div class="flex flex-column h-21rem">
|
||||
<div class="border-2 border-dashed surface-border border-round surface-ground flex-auto flex justify-content-center align-items-center font-medium">
|
||||
<div class="flex flex-col h-[21rem]">
|
||||
<div class="border-2 border-dashed border-surface rounded-border bg-surface-50 dark:bg-surface-950 flex-auto flex justify-center items-center font-medium">
|
||||
|
||||
<div class="library-name-icon-parent">
|
||||
<div class="library-name-div">
|
||||
@@ -23,24 +23,24 @@
|
||||
<app-icon-picker (iconSelected)="onIconSelected($event)"></app-icon-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex pt-4 justify-content-end">
|
||||
<div class="flex pt-6 justify-end">
|
||||
<p-button label="Next" icon="pi pi-arrow-right" iconPos="right" (onClick)="nextCallback.emit()"/>
|
||||
</div>
|
||||
</ng-template>
|
||||
</p-stepper>
|
||||
<p-stepper header="Media Location">
|
||||
<ng-template pTemplate="content" let-prevCallback="prevCallback" let-index="index">
|
||||
<div class="flex flex-column xxx">
|
||||
<div class="flex flex-col xxx">
|
||||
<div
|
||||
class="border-2 border-dashed surface-border border-round surface-ground flex-auto flex align-items-start"
|
||||
class="border-2 border-dashed border-surface rounded-border bg-surface-50 dark:bg-surface-950 flex-auto flex items-start"
|
||||
style="padding-top: 3rem;">
|
||||
<div class="flex flex-column justify-content-center align-items-center w-100">
|
||||
<div class="flex flex-col justify-center items-center w-100">
|
||||
<p-button
|
||||
severity="secondary"
|
||||
label="Browse for media folders"
|
||||
(onClick)="show()">
|
||||
</p-button>
|
||||
<p-table [value]="folders" styleClass="p-datatable-striped" class="p-table-custom mt-3">
|
||||
<p-table [value]="folders" styleClass="p-datatable-striped" class="p-table-custom mt-4">
|
||||
<ng-template pTemplate="body" let-folder let-i="rowIndex">
|
||||
<tr>
|
||||
<td class="tr-custom">{{ folder }}</td>
|
||||
@@ -59,7 +59,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex pt-4 justify-content-between">
|
||||
<div class="flex pt-6 justify-between">
|
||||
<p-button label="Back" icon="pi pi-arrow-left" (onClick)="prevCallback.emit()"/>
|
||||
<p-button severity="success" label="Save" icon="pi pi-save" (onClick)="addLibrary()"></p-button>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="search-container" #searchContainer>
|
||||
<span class="p-input-icon-left">
|
||||
<i class="pi pi-search"></i>
|
||||
<div class="search-container">
|
||||
<div class="search-input-wrapper">
|
||||
<i class="pi pi-search search-icon"></i>
|
||||
<input
|
||||
style="width: 400px;"
|
||||
type="text"
|
||||
@@ -9,9 +9,9 @@
|
||||
(input)="onSearchInputChange()"
|
||||
placeholder="Search books..."
|
||||
class="search-input"
|
||||
#searchInput/>
|
||||
<button *ngIf="searchQuery" pButton icon="pi pi-times" (click)="clearSearch()" class="clear-btn" type="button" aria-label="Clear Search"></button>
|
||||
</span>
|
||||
/>
|
||||
<p-button *ngIf="searchQuery" icon="pi pi-times" (click)="clearSearch()" [text]="true" [rounded]="true" class="clear-btn" aria-label="Clear Search"></p-button>
|
||||
</div>
|
||||
|
||||
<div class="search-dropdown layout-menu" [class.show]="(books.length > 0)">
|
||||
<ng-container *ngIf="books.length > 0; else noResults">
|
||||
@@ -21,7 +21,6 @@
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<!-- No results message -->
|
||||
<ng-template #noResults>
|
||||
<div class="search-dropdown-item">
|
||||
<span>No results found</span>
|
||||
|
||||
@@ -3,12 +3,43 @@
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.search-input-wrapper {
|
||||
position: relative;
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
.search-icon {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 10px;
|
||||
transform: translateY(-50%);
|
||||
color: var(--text-color-secondary);
|
||||
font-size: 1.0rem;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
width: 100%;
|
||||
padding-left: 30px;
|
||||
height: 2.5rem;
|
||||
line-height: 2.5rem;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.clear-btn {
|
||||
color: var(--text-color-secondary);
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.search-dropdown {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
background-color: var(--surface-overlay);
|
||||
border: 1px solid var(--surface-border);
|
||||
border-radius: var(--border-radius);
|
||||
background-color: var(--code-background);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--card-border);
|
||||
z-index: 1000;
|
||||
max-height: 500px;
|
||||
overflow-y: auto;
|
||||
@@ -51,30 +82,3 @@
|
||||
color: var(--text-color);
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.search-dropdown.show {
|
||||
opacity: 1;
|
||||
height: auto;
|
||||
transition: opacity 0.3s ease, height 0.4s ease-in-out;
|
||||
}
|
||||
|
||||
.clear-btn {
|
||||
color: var(--text-color-secondary);
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.search-dropdown-item.no-results {
|
||||
font-size: 14px;
|
||||
color: var(--text-color-secondary);
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import {Book} from '../../model/book.model';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {InputTextModule} from 'primeng/inputtext';
|
||||
import {NgForOf, NgIf} from '@angular/common';
|
||||
import {ButtonDirective} from 'primeng/button';
|
||||
import {Button} from 'primeng/button';
|
||||
import {Router} from '@angular/router';
|
||||
import {BookService} from '../../service/book.service';
|
||||
|
||||
@@ -17,7 +17,7 @@ import {BookService} from '../../service/book.service';
|
||||
InputTextModule,
|
||||
NgForOf,
|
||||
NgIf,
|
||||
ButtonDirective
|
||||
Button
|
||||
],
|
||||
styleUrls: ['./search.component.scss']
|
||||
})
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<div *ngIf="!selectedIcon">
|
||||
<p-button label="Select Icon" icon="pi pi-search" (onClick)="openIconPicker()"></p-button>
|
||||
</div>
|
||||
<div *ngIf="selectedIcon" class="mt-2 flex align-items-center">
|
||||
<div *ngIf="selectedIcon" class="mt-2 flex items-center">
|
||||
<i [class]="selectedIcon" class="mr-2"></i>
|
||||
<p-button label="Remove" icon="pi pi-times" text="true" outlined="true" severity="warn" (onClick)="clearSelectedIcon()"></p-button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user