Better header icon setup
This commit is contained in:
@@ -17,7 +17,25 @@
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-8">
|
||||
|
||||
<a *ngIf="isFilterActive" class="topbar-items topbar-item" (click)="clearFilter()">
|
||||
<i
|
||||
class="pi pi-filter-slash"
|
||||
pTooltip="Clear applied filters"
|
||||
tooltipPosition="top">
|
||||
</i>
|
||||
</a>
|
||||
|
||||
<a class="topbar-items topbar-item" (click)="toggleTableGrid()">
|
||||
<i
|
||||
[ngClass]="viewIcon"
|
||||
pTooltip="Toggle between Grid and Table view"
|
||||
tooltipPosition="top">
|
||||
</i>
|
||||
</a>
|
||||
|
||||
<input type="text" pInputText placeholder="Search title or author..." [(ngModel)]="bookTitle" (ngModelChange)="onBookTitleChange($event)"/>
|
||||
|
||||
<p-select
|
||||
[options]="sortOptions"
|
||||
optionLabel="label"
|
||||
@@ -25,16 +43,16 @@
|
||||
[(ngModel)]="selectedSort"
|
||||
(onChange)="updateSortOption($event.value)"/>
|
||||
|
||||
<p-button
|
||||
<!--<p-button
|
||||
[icon]="viewIcon"
|
||||
size="large"
|
||||
[rounded]="true"
|
||||
text="true"
|
||||
pTooltip="Toggle between Grid and Table view"
|
||||
tooltipPosition="top"
|
||||
(click)="toggleTableGrid()"/>
|
||||
(click)="toggleTableGrid()"/>-->
|
||||
|
||||
<p-button
|
||||
<!--<p-button
|
||||
*ngIf="isFilterActive"
|
||||
icon="pi pi-filter-slash"
|
||||
size="large"
|
||||
@@ -42,14 +60,14 @@
|
||||
text="true"
|
||||
(click)="clearFilter()"
|
||||
pTooltip="Clear applied filters"
|
||||
tooltipPosition="top"/>
|
||||
tooltipPosition="top"/>-->
|
||||
|
||||
<p-button
|
||||
class="pr-2"
|
||||
icon="pi pi-chevron-right"
|
||||
size="large"
|
||||
text="true"
|
||||
[rounded]="true"
|
||||
[outlined]="true"
|
||||
[rounded]="true"
|
||||
(click)="toggleFilterSidebar()"
|
||||
pTooltip="Toggle filter sidebar"
|
||||
tooltipPosition="top"/>
|
||||
|
||||
@@ -66,3 +66,44 @@
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.topbar-items {
|
||||
display: flex;
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
gap: 0.3rem;
|
||||
align-items: center;
|
||||
|
||||
li {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.topbar-item {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
font-size: 1.5rem;
|
||||
border: 1px solid var(--border-color);
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
transition: outline-color .2s, border-color .2s;
|
||||
border-radius: 6px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
outline-color: transparent;
|
||||
background-color: var(--card-background);
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
border-color: var(--primary-color);
|
||||
}
|
||||
|
||||
i, span {
|
||||
color: var(--primary-color);
|
||||
font-size: 1.25rem;
|
||||
font-weight: 100;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ import {BookTableComponent} from './book-table/book-table.component';
|
||||
import {animate, state, style, transition, trigger} from '@angular/animations';
|
||||
import {MetadataFetchOptionsComponent} from '../../../metadata/metadata-options-dialog/metadata-fetch-options/metadata-fetch-options.component';
|
||||
import {MetadataRefreshType} from '../../../metadata/model/request/metadata-refresh-type.enum';
|
||||
import {Button} from 'primeng/button';
|
||||
import {AsyncPipe, NgForOf, NgIf} from '@angular/common';
|
||||
import {Button, ButtonDirective, ButtonIcon} from 'primeng/button';
|
||||
import {AsyncPipe, NgClass, NgForOf, NgIf} from '@angular/common';
|
||||
import {VirtualScrollerModule} from '@iharbeck/ngx-virtual-scroller';
|
||||
import {BookCardComponent} from './book-card/book-card.component';
|
||||
import {ProgressSpinner} from 'primeng/progressspinner';
|
||||
@@ -30,6 +30,8 @@ import {InputText} from 'primeng/inputtext';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {BookFilterComponent} from './book-filter/book-filter.component';
|
||||
import {Tooltip} from 'primeng/tooltip';
|
||||
import {WindowMaximizeIcon} from 'primeng/icons';
|
||||
import {Ripple} from 'primeng/ripple';
|
||||
|
||||
export enum EntityType {
|
||||
LIBRARY = 'Library',
|
||||
@@ -42,7 +44,7 @@ export enum EntityType {
|
||||
standalone: true,
|
||||
templateUrl: './book-browser.component.html',
|
||||
styleUrls: ['./book-browser.component.scss'],
|
||||
imports: [Button, NgIf, VirtualScrollerModule, BookCardComponent, AsyncPipe, ProgressSpinner, Select, Menu, NgForOf, InputText, FormsModule, BookTableComponent, BookFilterComponent, Tooltip],
|
||||
imports: [Button, NgIf, VirtualScrollerModule, BookCardComponent, AsyncPipe, ProgressSpinner, Select, Menu, NgForOf, InputText, FormsModule, BookTableComponent, BookFilterComponent, Tooltip, ButtonDirective, WindowMaximizeIcon, ButtonIcon, Ripple, NgClass],
|
||||
animations: [
|
||||
trigger('slideInOut', [
|
||||
state('void', style({
|
||||
@@ -139,7 +141,7 @@ export class BookBrowserComponent implements OnInit, AfterViewInit {
|
||||
}
|
||||
|
||||
get viewIcon(): string {
|
||||
return this.gridOrTable === 'grid' ? 'pi pi-table' : 'pi pi-objects-column';
|
||||
return this.gridOrTable === 'grid' ? 'pi pi-objects-column' : 'pi pi-table';
|
||||
}
|
||||
|
||||
private getEntityInfoFromRoute(): Observable<{ entityId: number; entityType: EntityType }> {
|
||||
|
||||
Reference in New Issue
Block a user