Align the layout to be consistent throughout all dialogs (#1737)
This commit is contained in:
+165
-115
@@ -1,141 +1,191 @@
|
||||
@if ((libraryState$ | async)?.libraries; as libraries) {
|
||||
<div
|
||||
class="flex flex-col gap-8 p-4 items-center justify-center w-full max-w-[700px]">
|
||||
<div class="flex flex-col items-center gap-2 w-full">
|
||||
<label class="text-sm text-stone-400">Upload Destination</label>
|
||||
<p-selectbutton
|
||||
[options]="stateOptions"
|
||||
[(ngModel)]="value"
|
||||
[allowEmpty]="false"
|
||||
optionLabel="label"
|
||||
optionValue="value">
|
||||
</p-selectbutton>
|
||||
<div class="book-uploader">
|
||||
<div class="panel-header">
|
||||
<div class="header-icon-wrapper">
|
||||
<i class="pi pi-cloud-upload header-icon"></i>
|
||||
</div>
|
||||
<div class="header-text">
|
||||
<h2 class="panel-title">Upload Books</h2>
|
||||
<p class="panel-description">
|
||||
Upload your books to library or bookdrop folder
|
||||
</p>
|
||||
</div>
|
||||
<p-button
|
||||
icon="pi pi-times"
|
||||
(click)="closeDialog()"
|
||||
severity="secondary"
|
||||
[text]="true"
|
||||
[rounded]="true"
|
||||
class="close-button"/>
|
||||
</div>
|
||||
@if (value === 'library') {
|
||||
<p-select
|
||||
[options]="libraries"
|
||||
optionLabel="name"
|
||||
placeholder="Select Library"
|
||||
[(ngModel)]="selectedLibrary"
|
||||
class="w-full"></p-select>
|
||||
<p-select
|
||||
[options]="selectedLibrary?.paths"
|
||||
optionLabel="path"
|
||||
placeholder="Select Subpath"
|
||||
[(ngModel)]="selectedPath"
|
||||
[disabled]="!selectedLibrary"
|
||||
class="w-full"></p-select>
|
||||
}
|
||||
<p-fileupload class="w-full" name="file"
|
||||
[maxFileSize]="maxFileSizeBytes"
|
||||
[customUpload]="true"
|
||||
[multiple]="true" accept=".pdf,.epub,.cbz,.cbr,.cb7"
|
||||
(onSelect)="onFilesSelect($event)"
|
||||
(uploadHandler)="uploadFiles($event)"
|
||||
[disabled]="value === 'library' ? (!selectedLibrary || !selectedPath) : false">
|
||||
<ng-template #header let-files let-chooseCallback="chooseCallback" let-clearCallback="clearCallback" let-uploadCallback="uploadCallback">
|
||||
<div class="flex flex-col items-center justify-center flex-1 gap-4">
|
||||
<div class="flex gap-4">
|
||||
<p-button
|
||||
(onClick)="choose($event, chooseCallback)"
|
||||
icon="pi pi-images"
|
||||
[rounded]="true"
|
||||
[outlined]="true"
|
||||
[disabled]="isChooseDisabled()"
|
||||
pTooltip="Choose files to upload"
|
||||
tooltipPosition="top"/>
|
||||
|
||||
<p-button
|
||||
(onClick)="uploadEvent(uploadCallback)"
|
||||
icon="pi pi-cloud-upload"
|
||||
[rounded]="true"
|
||||
[outlined]="true"
|
||||
severity="success"
|
||||
[disabled]="isUploadDisabled()"
|
||||
pTooltip="Start uploading selected files"
|
||||
tooltipPosition="top"/>
|
||||
|
||||
<p-button
|
||||
(onClick)="onClear(clearCallback)"
|
||||
icon="pi pi-times"
|
||||
[rounded]="true"
|
||||
[outlined]="true"
|
||||
severity="danger"
|
||||
[disabled]="!filesPresent() || isUploading"
|
||||
pTooltip="Clear selected files"
|
||||
tooltipPosition="top"/>
|
||||
</div>
|
||||
<div>Click the upload icon to upload the files.</div>
|
||||
<div class="upload-container">
|
||||
<div class="destination-section">
|
||||
<div class="section-header">
|
||||
<span class="section-title">
|
||||
<i class="pi pi-map-marker"></i>
|
||||
Upload Destination
|
||||
</span>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #content let-files let-removeFileCallback="removeFileCallback">
|
||||
<div class="flex flex-col gap-8 px-4">
|
||||
@if (files?.length > 0) {
|
||||
<div>
|
||||
<div class="max-h-96 max-w-[22rem] md:max-w-none overflow-y-auto pr-2">
|
||||
<div class="flex flex-wrap">
|
||||
@for (uploadFile of this.files; track uploadFile; let i = $index) {
|
||||
<div class="flex justify-between items-center w-full gap-4">
|
||||
<div class="flex items-center gap-4 overflow-hidden flex-1">
|
||||
<p-badge [value]="uploadFile.status === 'Pending' ? 'Ready to Upload' : uploadFile.status" [severity]="getBadgeSeverity(uploadFile.status)"
|
||||
class="shrink-0"/>
|
||||
<span class="font-semibold text-ellipsis whitespace-nowrap overflow-hidden flex-1">
|
||||
{{ uploadFile.file.name }}
|
||||
</span>
|
||||
<div class="shrink-0">{{ formatSize(uploadFile.file.size) }}</div>
|
||||
</div>
|
||||
<div class="destination-selector">
|
||||
<p-selectbutton
|
||||
[options]="stateOptions"
|
||||
[(ngModel)]="value"
|
||||
[allowEmpty]="false"
|
||||
optionLabel="label"
|
||||
optionValue="value">
|
||||
</p-selectbutton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@if (value === 'library') {
|
||||
<div class="divider"></div>
|
||||
<div class="library-selection">
|
||||
<div class="section-header">
|
||||
<span class="section-title">
|
||||
<i class="pi pi-building"></i>
|
||||
Library Selection
|
||||
</span>
|
||||
</div>
|
||||
<div class="selection-fields">
|
||||
<div class="field-group">
|
||||
<label for="library-select" class="field-label">Library</label>
|
||||
<p-select
|
||||
inputId="library-select"
|
||||
[options]="libraries"
|
||||
optionLabel="name"
|
||||
placeholder="Select Library"
|
||||
[(ngModel)]="selectedLibrary"
|
||||
class="w-full">
|
||||
</p-select>
|
||||
</div>
|
||||
<div class="field-group">
|
||||
<label for="subpath-select" class="field-label">Subpath</label>
|
||||
<p-select
|
||||
inputId="subpath-select"
|
||||
[options]="selectedLibrary?.paths"
|
||||
optionLabel="path"
|
||||
placeholder="Select Subpath"
|
||||
[(ngModel)]="selectedPath"
|
||||
[disabled]="!selectedLibrary"
|
||||
class="w-full">
|
||||
</p-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="file-upload-section">
|
||||
<div class="section-header">
|
||||
<span class="section-title">
|
||||
<i class="pi pi-file"></i>
|
||||
Select Files
|
||||
</span>
|
||||
</div>
|
||||
<p-fileupload
|
||||
name="file"
|
||||
[maxFileSize]="maxFileSizeBytes"
|
||||
[customUpload]="true"
|
||||
[multiple]="true"
|
||||
accept=".pdf,.epub,.cbz,.cbr,.cb7"
|
||||
(onSelect)="onFilesSelect($event)"
|
||||
(uploadHandler)="uploadFiles($event)"
|
||||
[disabled]="value === 'library' ? (!selectedLibrary || !selectedPath) : false">
|
||||
<ng-template #header let-files let-chooseCallback="chooseCallback" let-clearCallback="clearCallback" let-uploadCallback="uploadCallback">
|
||||
<div class="upload-actions">
|
||||
<div class="action-buttons">
|
||||
<p-button
|
||||
severity="info"
|
||||
(onClick)="choose($event, chooseCallback)"
|
||||
icon="pi pi-images"
|
||||
label="Choose"
|
||||
[outlined]="true"
|
||||
[disabled]="isChooseDisabled()"
|
||||
pTooltip="Choose files to upload"
|
||||
tooltipPosition="top"/>
|
||||
<p-button
|
||||
(onClick)="uploadEvent(uploadCallback)"
|
||||
icon="pi pi-cloud-upload"
|
||||
label="Upload"
|
||||
severity="success"
|
||||
[disabled]="isUploadDisabled()"
|
||||
pTooltip="Start uploading selected files"
|
||||
tooltipPosition="top"/>
|
||||
<p-button
|
||||
(onClick)="onClear(clearCallback)"
|
||||
icon="pi pi-times"
|
||||
label="Clear"
|
||||
severity="danger"
|
||||
[outlined]="true"
|
||||
[disabled]="!filesPresent() || isUploading"
|
||||
pTooltip="Clear selected files"
|
||||
tooltipPosition="top"/>
|
||||
</div>
|
||||
<small class="upload-hint">Click "Choose" to select files or drag and drop them below</small>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #content let-files let-removeFileCallback="removeFileCallback">
|
||||
@if (files?.length > 0) {
|
||||
<div class="files-list">
|
||||
@for (uploadFile of this.files; track uploadFile; let i = $index) {
|
||||
<div class="file-item">
|
||||
<div class="file-info">
|
||||
<p-badge
|
||||
[value]="uploadFile.status === 'Pending' ? 'Ready' : uploadFile.status"
|
||||
[severity]="getBadgeSeverity(uploadFile.status)"/>
|
||||
<span class="file-name">{{ uploadFile.file.name }}</span>
|
||||
<span class="file-size">{{ formatSize(uploadFile.file.size) }}</span>
|
||||
</div>
|
||||
<div class="file-actions">
|
||||
@switch (uploadFile.status) {
|
||||
@case ('Pending') {
|
||||
<p-button
|
||||
icon="pi pi-times"
|
||||
(click)="onRemoveTemplatingFile($event, uploadFile.file, removeFileCallback, i)"
|
||||
severity="danger"
|
||||
[text]="true"/>
|
||||
[text]="true"
|
||||
[rounded]="true"/>
|
||||
}
|
||||
@case ('Uploading') {
|
||||
<i
|
||||
class="pi pi-spin pi-spinner p-3"
|
||||
style="color: slateblue"
|
||||
pTooltip="Uploading"
|
||||
tooltipPosition="top">
|
||||
</i>
|
||||
<i class="pi pi-spin pi-spinner status-icon uploading"></i>
|
||||
}
|
||||
@case ('Uploaded') {
|
||||
<i
|
||||
class="pi pi-check p-3"
|
||||
style="color: green"
|
||||
pTooltip="Uploaded"
|
||||
tooltipPosition="top">
|
||||
</i>
|
||||
<i class="pi pi-check status-icon success"></i>
|
||||
}
|
||||
@case ('Failed') {
|
||||
<i
|
||||
class="pi pi-exclamation-triangle p-3"
|
||||
style="color: darkred"
|
||||
pTooltip="{{ uploadFile.errorMessage || 'Upload failed' }}"
|
||||
class="pi pi-exclamation-triangle status-icon error"
|
||||
[pTooltip]="uploadFile.errorMessage || 'Upload failed'"
|
||||
tooltipPosition="top">
|
||||
</i>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</ng-template>
|
||||
<ng-template #file></ng-template>
|
||||
<ng-template #empty>
|
||||
<div class="empty-state">
|
||||
<div class="empty-icon-wrapper">
|
||||
<i class="pi pi-cloud-upload empty-icon"></i>
|
||||
</div>
|
||||
<h3 class="empty-title">Drag and Drop Files</h3>
|
||||
<p class="empty-description">
|
||||
Supported formats: <strong>.pdf</strong>, <strong>.epub</strong>, <strong>.cbz</strong>, <strong>.cbr</strong>, <strong>.cb7</strong>
|
||||
<br/>
|
||||
Maximum file size: 100 MB per file
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #file></ng-template>
|
||||
<ng-template #empty>
|
||||
<div class="flex items-center justify-center flex-col text-center">
|
||||
<i class="pi pi-cloud-upload !border-2 !rounded-full !p-8 !text-4xl"></i>
|
||||
<p class="mt-6 mb-2">Drag and drop files here to upload.</p>
|
||||
<p class="mt-2 mb-2">
|
||||
Only <strong>.pdf</strong>, <strong>.epub</strong>, <strong>.cbz</strong>, <strong>.cbr</strong>, and <strong>.cb7</strong> files are supported (max size: 100 MB per
|
||||
file).
|
||||
</p>
|
||||
</div>
|
||||
</ng-template>
|
||||
</p-fileupload>
|
||||
</ng-template>
|
||||
</p-fileupload>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -1,3 +1,438 @@
|
||||
.book-uploader {
|
||||
width: 700px;
|
||||
max-width: 700px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-top: 20px;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.panel-header {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
padding: 1.25rem;
|
||||
|
||||
border-radius: 10px 10px 0 0;
|
||||
border: 1px solid var(--border-color);
|
||||
border-bottom: none;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
|
||||
|
||||
.header-icon-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
background: var(--primary-color);
|
||||
border-radius: 10px;
|
||||
|
||||
|
||||
.header-icon {
|
||||
font-size: 1.5rem;
|
||||
color: var(--primary-contrast-color);
|
||||
}
|
||||
}
|
||||
|
||||
.header-text {
|
||||
flex: 1;
|
||||
|
||||
.panel-title {
|
||||
margin: 0 0 0.25rem 0;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.panel-description {
|
||||
margin: 0;
|
||||
font-size: 0.875rem;
|
||||
color: var(--text-secondary-color);
|
||||
}
|
||||
}
|
||||
|
||||
.close-button {
|
||||
position: absolute;
|
||||
top: 0.75rem;
|
||||
right: 0.75rem;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
padding: 1rem;
|
||||
|
||||
.header-icon-wrapper {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
|
||||
.header-icon {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
.header-text {
|
||||
.panel-title {
|
||||
font-size: 1.125rem;
|
||||
}
|
||||
|
||||
.panel-description {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
}
|
||||
|
||||
.close-button {
|
||||
top: 0.5rem;
|
||||
right: 0.5rem;
|
||||
|
||||
::ng-deep .p-button {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.upload-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
padding: 1.5rem;
|
||||
background: var(--card-background);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 0 0 10px 10px;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
|
||||
|
||||
@media (max-width: 480px) {
|
||||
padding: 1rem;
|
||||
gap: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.destination-section,
|
||||
.library-selection,
|
||||
.file-upload-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.section-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0.625rem 0.875rem;
|
||||
background: var(--overlay-background);
|
||||
border-radius: 6px;
|
||||
|
||||
.section-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-color);
|
||||
|
||||
i {
|
||||
color: var(--primary-color);
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
padding: 0.5rem 0.625rem;
|
||||
|
||||
.section-title {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.destination-selector {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.selection-fields {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
padding: 0 0.75rem 1rem 0.75rem;
|
||||
|
||||
.field-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
|
||||
.field-label {
|
||||
font-size: 0.875rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-color);
|
||||
padding-left: 0.25rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.file-upload-section {
|
||||
::ng-deep .p-fileupload {
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 8px;
|
||||
background: var(--ground-background);
|
||||
|
||||
.p-fileupload-buttonbar {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.p-fileupload-content {
|
||||
padding: 1rem;
|
||||
background: transparent;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.upload-actions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
padding: 1rem;
|
||||
width: 100%;
|
||||
|
||||
.action-buttons {
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.upload-hint {
|
||||
color: var(--text-secondary-color);
|
||||
font-size: 0.875rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
padding: 0.75rem;
|
||||
gap: 0.5rem;
|
||||
|
||||
.action-buttons {
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
|
||||
::ng-deep .p-button {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.upload-hint {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.files-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
max-height: 400px;
|
||||
overflow-y: auto;
|
||||
padding-right: 0.25rem;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
background: var(--overlay-background);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: var(--border-color);
|
||||
border-radius: 3px;
|
||||
transition: background 0.2s ease;
|
||||
|
||||
&:hover {
|
||||
background: var(--primary-color);
|
||||
}
|
||||
}
|
||||
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--border-color) var(--overlay-background);
|
||||
|
||||
.file-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
padding: 0.75rem;
|
||||
background: var(--card-background);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 8px;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&:hover {
|
||||
border-color: var(--primary-color);
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.file-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
|
||||
.file-name {
|
||||
flex: 1;
|
||||
font-weight: 500;
|
||||
color: var(--text-color);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.file-size {
|
||||
color: var(--text-secondary-color);
|
||||
font-size: 0.875rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.file-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
|
||||
.status-icon {
|
||||
font-size: 1.25rem;
|
||||
padding: 0.5rem;
|
||||
|
||||
&.uploading {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
&.success {
|
||||
color: var(--green-500);
|
||||
}
|
||||
|
||||
&.error {
|
||||
color: var(--red-500);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
padding: 0.625rem;
|
||||
gap: 0.5rem;
|
||||
|
||||
.file-info {
|
||||
gap: 0.5rem;
|
||||
|
||||
.file-name {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.file-size {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
}
|
||||
|
||||
.file-actions {
|
||||
.status-icon {
|
||||
font-size: 1rem;
|
||||
padding: 0.375rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
padding: 1.5rem 1rem;
|
||||
|
||||
.empty-icon-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
background: var(--overlay-background);
|
||||
border-radius: 50%;
|
||||
margin-bottom: 1rem;
|
||||
border: 3px dashed var(--border-color);
|
||||
|
||||
.empty-icon {
|
||||
font-size: 2.5rem;
|
||||
color: var(--text-secondary-color);
|
||||
opacity: 0.6;
|
||||
}
|
||||
}
|
||||
|
||||
.empty-title {
|
||||
margin: 0 0 0.5rem 0;
|
||||
font-size: 1.125rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.empty-description {
|
||||
margin: 0;
|
||||
font-size: 0.875rem;
|
||||
color: var(--text-secondary-color);
|
||||
max-width: 450px;
|
||||
line-height: 1.5;
|
||||
|
||||
strong {
|
||||
color: var(--text-color);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
padding: 1.5rem 0.75rem;
|
||||
min-height: 180px;
|
||||
|
||||
.empty-icon-wrapper {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
margin-bottom: 0.75rem;
|
||||
|
||||
.empty-icon {
|
||||
font-size: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.empty-title {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.empty-description {
|
||||
font-size: 0.8rem;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.divider {
|
||||
height: 1px;
|
||||
background: linear-gradient(90deg, transparent, var(--border-color), transparent);
|
||||
margin: 0.25rem 0;
|
||||
}
|
||||
|
||||
:host ::ng-deep .p-fileupload-content p-progressbar {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import {AppSettingsService} from '../../service/app-settings.service';
|
||||
import {filter, take} from 'rxjs/operators';
|
||||
import {AppSettings} from '../../model/app-settings.model';
|
||||
import {SelectButton} from 'primeng/selectbutton';
|
||||
import {DynamicDialogRef} from 'primeng/dynamicdialog';
|
||||
|
||||
interface UploadingFile {
|
||||
file: File;
|
||||
@@ -51,6 +52,7 @@ export class BookUploaderComponent implements OnInit {
|
||||
private readonly messageService = inject(MessageService);
|
||||
private readonly appSettingsService = inject(AppSettingsService);
|
||||
private readonly http = inject(HttpClient);
|
||||
private readonly ref = inject(DynamicDialogRef);
|
||||
|
||||
readonly libraryState$: Observable<LibraryState> = this.libraryService.libraryState$;
|
||||
appSettings$: Observable<AppSettings | null> = this.appSettingsService.appSettings$;
|
||||
@@ -223,4 +225,8 @@ export class BookUploaderComponent implements OnInit {
|
||||
return 'info';
|
||||
}
|
||||
}
|
||||
|
||||
closeDialog(): void {
|
||||
this.ref.close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user