mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-07-09 03:04:19 -04:00
Misc UI fixes (#1461)
* Misc fixes - Fixed modal being stretched when not needed. - Fixed Logo vertical align - Fixed drawer content scroll, and from it being squished due to overridden by bootstrap. * series detail cover image stretch fix - Fixes: Fixes series detail cover image being stretched on larger resolutions * fixing empty lists scrollbar * Fixing want to read error * fixing unnecessary scrollbar * Fixing recently updated tooltip
This commit is contained in:
parent
ca2137fbfe
commit
ff26a45c9b
@ -9,11 +9,11 @@
|
|||||||
.collection {
|
.collection {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
.modal-body {
|
.modal-body {
|
||||||
height: calc(100vh - 235px);
|
max-height: calc(100vh - 235px);
|
||||||
min-height: 150px;
|
min-height: 150px;
|
||||||
.list-group {
|
.list-group {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
height: calc(100vh - 355px);
|
max-height: calc(100vh - 355px);
|
||||||
min-height: 32px;
|
min-height: 32px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
.tab-content {
|
.tab-content {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
height: calc(40vh - 63px); // drawer height - offcanvas heading height
|
height: calc(40vh - (46px + 1rem)); // drawer height - offcanvas heading height
|
||||||
}
|
}
|
||||||
|
|
||||||
.h6 {
|
.h6 {
|
||||||
|
@ -13,13 +13,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<app-metadata-filter [filterSettings]="filterSettings" [filterOpen]="filterOpen" (applyFilter)="applyMetadataFilter($event)"></app-metadata-filter>
|
<app-metadata-filter [filterSettings]="filterSettings" [filterOpen]="filterOpen" (applyFilter)="applyMetadataFilter($event)"></app-metadata-filter>
|
||||||
<div class="viewport-container">
|
<div class="viewport-container" [ngClass]="{'empty': items.length === 0}">
|
||||||
<div class="content-container">
|
<div class="content-container">
|
||||||
<div class="card-container mt-2 mb-2">
|
<div class="card-container mt-2 mb-2">
|
||||||
<p *ngIf="items.length === 0 && !isLoading">
|
<p *ngIf="items.length === 0 && !isLoading">
|
||||||
<ng-container [ngTemplateOutlet]="noDataTemplate"></ng-container>
|
<ng-container [ngTemplateOutlet]="noDataTemplate"></ng-container>
|
||||||
</p>
|
</p>
|
||||||
<virtual-scroller #scroll [items]="items" [bufferAmount]="1" [parentScroll]="parentScroll">
|
<virtual-scroller [ngClass]="{'empty': items.length === 0}" #scroll [items]="items" [bufferAmount]="1" [parentScroll]="parentScroll">
|
||||||
<div class="grid row g-0" #container>
|
<div class="grid row g-0" #container>
|
||||||
<div class="card col-auto mt-2 mb-2" *ngFor="let item of scroll.viewPortItems; trackBy:trackByIdentity; index as i" id="jumpbar-index--{{i}}" [attr.jumpbar-index]="i">
|
<div class="card col-auto mt-2 mb-2" *ngFor="let item of scroll.viewPortItems; trackBy:trackByIdentity; index as i" id="jumpbar-index--{{i}}" [attr.jumpbar-index]="i">
|
||||||
<ng-container [ngTemplateOutlet]="itemTemplate" [ngTemplateOutletContext]="{ $implicit: item, idx: scroll.viewPortInfo.startIndexWithBuffer + i }"></ng-container>
|
<ng-container [ngTemplateOutlet]="itemTemplate" [ngTemplateOutletContext]="{ $implicit: item, idx: scroll.viewPortInfo.startIndexWithBuffer + i }"></ng-container>
|
||||||
@ -29,7 +29,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ng-container *ngIf="jumpBarKeysToRender.length >= 4 && scroll.viewPortInfo.maxScrollPosition > 0" [ngTemplateOutlet]="jumpBar" [ngTemplateOutletContext]="{ id: 'jumpbar' }"></ng-container>
|
<ng-container *ngIf="jumpBarKeysToRender.length >= 4 && items.length !== 0 && scroll.viewPortInfo.maxScrollPosition > 0" [ngTemplateOutlet]="jumpBar" [ngTemplateOutletContext]="{ id: 'jumpbar' }"></ng-container>
|
||||||
</div>
|
</div>
|
||||||
<ng-template #cardTemplate>
|
<ng-template #cardTemplate>
|
||||||
<virtual-scroller #scroll [items]="items" [bufferAmount]="1">
|
<virtual-scroller #scroll [items]="items" [bufferAmount]="1">
|
||||||
|
@ -2,8 +2,12 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc((var(--vh) *100) - 162px);
|
height: calc((var(--vh) *100) - 173px);
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
&.empty {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-container {
|
.content-container {
|
||||||
@ -85,12 +89,16 @@
|
|||||||
.virtual-scroller, virtual-scroller {
|
.virtual-scroller, virtual-scroller {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
//height: calc(100vh - 160px); // 64 is a random number, 523 for me.
|
//height: calc(100vh - 160px); // 64 is a random number, 523 for me.
|
||||||
height: calc(var(--vh) * 100 - 160px);
|
height: calc(var(--vh) * 100 - 173px);
|
||||||
//height: calc(100vh - 160px);
|
//height: calc(100vh - 160px);
|
||||||
//background-color: red;
|
//background-color: red;
|
||||||
//max-height: calc(var(--vh)*100 - 170px);
|
//max-height: calc(var(--vh)*100 - 170px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual-scroller.empty {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
|
@ -151,8 +151,13 @@ export class CardItemComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
if (this.utilityService.isChapter(this.entity)) {
|
if (this.utilityService.isChapter(this.entity)) {
|
||||||
const chapterTitle = this.utilityService.asChapter(this.entity).titleName;
|
const chapterTitle = this.utilityService.asChapter(this.entity).titleName;
|
||||||
if (chapterTitle === '' || chapterTitle === null) {
|
if (chapterTitle === '' || chapterTitle === null || chapterTitle === undefined) {
|
||||||
this.tooltipTitle = (this.utilityService.asChapter(this.entity).volumeTitle + ' ' + this.title).trim();
|
const volumeTitle = this.utilityService.asChapter(this.entity).volumeTitle
|
||||||
|
if (volumeTitle === '' || volumeTitle === null || volumeTitle === undefined) {
|
||||||
|
this.tooltipTitle = (this.title).trim();
|
||||||
|
} else {
|
||||||
|
this.tooltipTitle = (this.utilityService.asChapter(this.entity).volumeTitle + ' ' + this.title).trim();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.tooltipTitle = chapterTitle;
|
this.tooltipTitle = chapterTitle;
|
||||||
}
|
}
|
||||||
|
@ -13,4 +13,8 @@
|
|||||||
<ng-template #cardItem let-item let-position="idx">
|
<ng-template #cardItem let-item let-position="idx">
|
||||||
<app-card-item [title]="item.title" [entity]="item" [actions]="collectionTagActions" [imageUrl]="imageSerivce.getCollectionCoverImage(item.id)" (clicked)="loadCollection(item)"></app-card-item>
|
<app-card-item [title]="item.title" [entity]="item" [actions]="collectionTagActions" [imageUrl]="imageSerivce.getCollectionCoverImage(item.id)" (clicked)="loadCollection(item)"></app-card-item>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
|
<ng-template #noData>
|
||||||
|
There are no collections. Try creating <a href="https://wiki.kavitareader.com/en/guides/get-started-using-your-library/collections" target="_blank">one <i class="fa fa-external-link-alt" aria-hidden="true"></i></a>.
|
||||||
|
</ng-template>
|
||||||
</app-card-detail-layout>
|
</app-card-detail-layout>
|
@ -179,7 +179,7 @@ NZ0ZV4zm4/L1dfnYNCrjTFq9G03rmj5D+Y4i0OHuL3GFPJytaM54AAAAAElFTkSuQmCC
|
|||||||
id="image71"
|
id="image71"
|
||||||
x="34.013355"
|
x="34.013355"
|
||||||
y="59.091763"/></g></svg>
|
y="59.091763"/></g></svg>
|
||||||
<span class="d-none d-md-inline"> Kavita</span>
|
<span class="d-none d-md-inline logo"> Kavita</span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="navbar-nav col me-auto">
|
<ul class="navbar-nav col me-auto">
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
max-height: 28px;
|
max-height: 28px;
|
||||||
vertical-align: top;
|
vertical-align: text-top;
|
||||||
}
|
}
|
||||||
|
|
||||||
.phone-hidden {
|
.phone-hidden {
|
||||||
|
@ -12,9 +12,13 @@
|
|||||||
[jumpBarKeys]="jumpbarKeys"
|
[jumpBarKeys]="jumpbarKeys"
|
||||||
[filteringDisabled]="true"
|
[filteringDisabled]="true"
|
||||||
>
|
>
|
||||||
<ng-template #cardItem let-item let-position="idx">
|
<ng-template #cardItem let-item let-position="idx" >
|
||||||
<app-card-item [title]="item.title" [entity]="item" [actions]="getActions(item)"
|
<app-card-item [title]="item.title" [entity]="item" [actions]="getActions(item)"
|
||||||
[suppressLibraryLink]="true" [imageUrl]="imageService.getReadingListCoverImage(item.id)"
|
[suppressLibraryLink]="true" [imageUrl]="imageService.getReadingListCoverImage(item.id)"
|
||||||
(clicked)="handleClick(item)"></app-card-item>
|
(clicked)="handleClick(item)"></app-card-item>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
|
<ng-template #noData>
|
||||||
|
There are no reading lists. Try creating <a href="https://wiki.kavitareader.com/en/guides/get-started-using-your-library#reading-list" target="_blank">one <i class="fa fa-external-link-alt" aria-hidden="true"></i></a>.
|
||||||
|
</ng-template>
|
||||||
</app-card-detail-layout>
|
</app-card-detail-layout>
|
||||||
|
@ -56,8 +56,8 @@
|
|||||||
|
|
||||||
<div [ngStyle]="{'height': ScrollingBlockHeight}" class="main-container container-fluid pt-2" *ngIf="series !== undefined" #scrollingBlock>
|
<div [ngStyle]="{'height': ScrollingBlockHeight}" class="main-container container-fluid pt-2" *ngIf="series !== undefined" #scrollingBlock>
|
||||||
<div class="row mb-3 info-container">
|
<div class="row mb-3 info-container">
|
||||||
<div class="col-md-2 col-xs-4 col-sm-6 d-none d-sm-block">
|
<div class="image-container col-md-2 col-xs-4 col-sm-6 d-none d-sm-block">
|
||||||
<app-image maxWidth="300px" maxHeight="400px" [imageUrl]="seriesImage"></app-image>
|
<app-image height="100%" maxHeight="100%" objectFit="contain" background="none" [imageUrl]="seriesImage"></app-image>
|
||||||
<!-- NOTE: We can put continue point here as Vol X Ch Y or just Ch Y or Book Z ?-->
|
<!-- NOTE: We can put continue point here as Vol X Ch Y or just Ch Y or Book Z ?-->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-10 col-xs-8 col-sm-6 mt-2">
|
<div class="col-md-10 col-xs-8 col-sm-6 mt-2">
|
||||||
|
@ -32,3 +32,7 @@
|
|||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.image-container {
|
||||||
|
max-height: 400px;
|
||||||
|
}
|
||||||
|
@ -40,6 +40,14 @@ export class ImageComponent implements OnChanges, OnDestroy {
|
|||||||
* Border Radius of the image. If not defined, will not be applied
|
* Border Radius of the image. If not defined, will not be applied
|
||||||
*/
|
*/
|
||||||
@Input() borderRadius: string = '';
|
@Input() borderRadius: string = '';
|
||||||
|
/**
|
||||||
|
* Object fit of the image. If not defined, will not be applied
|
||||||
|
*/
|
||||||
|
@Input() objectFit: string = '';
|
||||||
|
/**
|
||||||
|
* Background of the image. If not defined, will not be applied
|
||||||
|
*/
|
||||||
|
@Input() background: string = '';
|
||||||
/**
|
/**
|
||||||
* If the image component should respond to cover updates
|
* If the image component should respond to cover updates
|
||||||
*/
|
*/
|
||||||
@ -93,6 +101,14 @@ export class ImageComponent implements OnChanges, OnDestroy {
|
|||||||
if (this.borderRadius != '') {
|
if (this.borderRadius != '') {
|
||||||
this.renderer.setStyle(this.imgElem.nativeElement, 'border-radius', this.borderRadius);
|
this.renderer.setStyle(this.imgElem.nativeElement, 'border-radius', this.borderRadius);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.objectFit != '') {
|
||||||
|
this.renderer.setStyle(this.imgElem.nativeElement, 'object-fit', this.objectFit);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.background != '') {
|
||||||
|
this.renderer.setStyle(this.imgElem.nativeElement, 'background', this.background);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
|
@ -26,9 +26,18 @@
|
|||||||
(selection)="bulkSelectionService.handleCardSelection('series', position, series.length, $event)" [selected]="bulkSelectionService.isCardSelected('series', position)" [allowSelection]="true"
|
(selection)="bulkSelectionService.handleCardSelection('series', position, series.length, $event)" [selected]="bulkSelectionService.isCardSelected('series', position)" [allowSelection]="true"
|
||||||
></app-series-card>
|
></app-series-card>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
|
<div *ngIf="!filterActive && series.length === 0">
|
||||||
|
<ng-template #noData>
|
||||||
|
There are no items. Try adding a series.
|
||||||
|
</ng-template>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="filterActive && series.length === 0">
|
||||||
|
<ng-template #noData>
|
||||||
|
No items match your current filter.
|
||||||
|
</ng-template>
|
||||||
|
</div>
|
||||||
|
|
||||||
<ng-template #noData>
|
|
||||||
No Series match your filter or exist in your list.
|
|
||||||
</ng-template>
|
|
||||||
</app-card-detail-layout>
|
</app-card-detail-layout>
|
||||||
</div>
|
</div>
|
@ -8,5 +8,5 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.offcanvas-bottom {
|
.offcanvas-bottom {
|
||||||
height: 40vh;
|
height: 40vh !important;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user