Remove Tailwind CSS and all remaining references (#2413)

Co-authored-by: acx10 <acx10@users.noreply.github.com>
This commit is contained in:
ACX
2026-01-22 23:41:57 -07:00
committed by acx10
co-authored by acx10
parent 5d9e535a14
commit a0870cac86
104 changed files with 2852 additions and 1333 deletions
@@ -1,15 +1,15 @@
@if (fetchedMetadata && fetchedMetadata.title) {
<form [formGroup]="metadataForm" class="metapicker flex flex-col w-full">
<div class="flex-grow overflow-auto">
<div class="metaheader relative flex items-center">
<label class="md:w-[8rem] text-sm"></label>
<div class="flex w-full items-center">
<p class="w-1/2">File Data</p>
<form [formGroup]="metadataForm" class="metapicker">
<div class="form-scroll">
<div class="metaheader">
<label class="field-label"></label>
<div class="header-fields-row">
<p class="header-column">File Data</p>
<div class="midbuttons">
<p-button
size="small"
icon="pi pi-angle-left"
class="mx-2"
class="btn-margin"
[outlined]="true"
pTooltip="Copy missing fields from fetched metadata"
tooltipPosition="bottom"
@@ -18,7 +18,7 @@
<p-button
size="small"
icon="pi pi-angle-double-left"
class="mx-2"
class="btn-margin"
[outlined]="true"
pTooltip="Overwrite all fields with fetched metadata"
tooltipPosition="bottom"
@@ -28,21 +28,21 @@
size="small"
severity="warn"
icon="pi pi-refresh"
class="mx-2"
class="btn-margin"
[outlined]="true"
pTooltip="Reset all fields to original values"
tooltipPosition="bottom"
(onClick)="confirmReset()"
></p-button>
</div>
<p class="w-1/2">Fetched Data</p>
<p class="header-column">Fetched Data</p>
</div>
</div>
<div class="metacontent">
<div class="meta-row field-thumbnail">
<label class="md:w-[8rem] text-sm"></label>
<div class="flex w-full items-center justify-center">
<div class="flex w-1/2">
<label class="field-label"></label>
<div class="thumbnail-row">
<div class="thumbnail-column">
@if (metadataForm.get('thumbnailUrl')?.value) {
<p-image
class="thumbnail"
@@ -57,7 +57,7 @@
></p-image>
}
@else {
<div class="thumbnail text-sm">No cover image</div>
<div class="thumbnail no-cover-text">No cover image</div>
}
<input type="hidden" id="thumbnailUrl" formControlName="thumbnailUrl"/>
</div>
@@ -70,7 +70,7 @@
[disabled]="!isFetchedDifferent('thumbnailUrl') && !isValueCopied('thumbnailUrl')"
(click)="isValueCopied('thumbnailUrl') ? resetField('thumbnailUrl') : copyFetchedToCurrent('thumbnailUrl')"
/>
<div class="flex w-1/2">
<div class="thumbnail-column">
@if (fetchedMetadata.thumbnailUrl) {
<p-image
class="thumbnail"
@@ -82,7 +82,7 @@
></p-image>
}
@else {
<div class="thumbnail text-sm">Cover image not found</div>
<div class="thumbnail no-cover-text">Cover image not found</div>
}
<input type="hidden" [value]="fetchedMetadata.thumbnailUrl" readonly/>
</div>
@@ -90,7 +90,7 @@
</div>
@for (field of metadataFieldsTop; track field) {
<div class="meta-row field-{{field.controlName}}">
<label for="{{field.controlName}}" class="md:w-[8rem] text-sm">{{ field.label }}</label>
<label for="{{field.controlName}}" class="field-label">{{ field.label }}</label>
<div class="meta-fields">
<input
pSize="small"
@@ -116,7 +116,7 @@
(click)="isValueChanged(field.controlName) ? resetField(field.controlName) : copyFetchedToCurrent(field.controlName)"
/>
@if (fetchedMetadata[field.fetchedKey]) {
<input
<input
pSize="small"
pInputText
[value]="fetchedMetadata[field.fetchedKey] ?? null"
@@ -132,7 +132,7 @@
}
@for (field of metadataPublishDate; track field) {
<div class="meta-row field-{{field.controlName}}">
<label for="{{field.controlName}}" class="md:w-[8rem] text-sm">{{ field.label }}</label>
<label for="{{field.controlName}}" class="field-label">{{ field.label }}</label>
<div class="meta-fields">
<p-datepicker
size="small"
@@ -163,7 +163,7 @@
(click)="isValueChanged(field.controlName) ? resetField(field.controlName) : copyFetchedToCurrent(field.controlName)"
/>
@if (fetchedMetadata[field.fetchedKey]) {
<input
<input
pSize="small"
pInputText
[value]="fetchedMetadata[field.fetchedKey] ?? null"
@@ -179,7 +179,7 @@
}
@for (field of metadataChips; track field) {
<div class="meta-row field-{{field.controlName}}">
<label for="{{field.controlName}}" class="md:w-[8rem] text-sm">{{ field.label }}</label>
<label for="{{field.controlName}}" class="field-label">{{ field.label }}</label>
<div class="meta-fields">
<p-autoComplete
size="small"
@@ -188,7 +188,7 @@
[typeahead]="false"
[dropdown]="false"
[forceSelection]="false"
class="dest w-full"
class="dest full-width"
[ngClass]="{
'changed': isValueChanged(field.controlName),
}"
@@ -216,7 +216,7 @@
[typeahead]="false"
[dropdown]="false"
[forceSelection]="false"
class="src w-full"
class="src full-width"
[ngClass]="{
'diff': isFetchedDifferent(field.controlName),
}"
@@ -227,7 +227,7 @@
}
@for (field of metadataDescription; track field) {
<div class="meta-row field-{{field.controlName}}">
<label for="{{field.controlName}}" class="md:w-[8rem] text-sm">{{ field.label }}</label>
<label for="{{field.controlName}}" class="field-label">{{ field.label }}</label>
<div class="meta-fields">
<textarea
pTextarea
@@ -270,7 +270,7 @@
}
@for (field of metadataFieldsBottom; track field) {
<div class="meta-row field-{{field.controlName}}">
<label for="{{field.controlName}}" class="md:w-[8rem] text-sm">{{ field.label }}</label>
<label for="{{field.controlName}}" class="field-label">{{ field.label }}</label>
<div class="meta-fields">
<input
pInputText
@@ -313,10 +313,10 @@
</div>
</form>
} @else {
<form [formGroup]="metadataForm" class="metaeditor flex w-full">
<div class="flex-grow overflow-auto">
<div class="metaheader relative flex items-center">
<p class="text-sm missingmd">
<form [formGroup]="metadataForm" class="metaeditor">
<div class="form-scroll">
<div class="metaheader">
<p class="missingmd">
Unable to fetch metadata for this file
</p>
<p-button
@@ -329,22 +329,22 @@
(onClick)="confirmReset()"
></p-button>
</div>
<div class="metabody flex flex-col p-4 md:flex-row">
<div class="flex items-start justify-center md:w-[20%] md:h-full">
<div class="w-full md:h-full field-thumbnail">
<img
<div class="metabody">
<div class="editor-thumbnail-wrapper">
<div class="editor-thumbnail-inner field-thumbnail">
<img
[src]="metadataForm.get('thumbnailUrl')?.value"
alt="Book Thumbnail"
class="thumbnail w-full md:h-full object-contain"
class="thumbnail editor-thumbnail-img"
/>
<input type="hidden" id="thumbnailUrl" formControlName="thumbnailUrl"/>
</div>
</div>
<div class="metacontent md:w-[80%]">
<div class="metacontent editor-metacontent">
@for (field of metadataFieldsTop; track field) {
<div class="meta-row field-{{field.controlName}}">
<label for="{{field.controlName}}" class="w-[8rem] text-sm">{{ field.label }}</label>
<div class="flex w-full">
<label for="{{field.controlName}}" class="field-label field-label--fixed">{{ field.label }}</label>
<div class="field-input-row">
<input
pSize="small"
fluid
@@ -370,8 +370,8 @@
@for (field of metadataPublishDate; track field) {
<div class="meta-row field-{{field.controlName}}">
<label for="{{field.controlName}}" class="w-[8rem] text-sm">{{ field.label }}</label>
<div class="flex w-full">
<label for="{{field.controlName}}" class="field-label field-label--fixed">{{ field.label }}</label>
<div class="field-input-row">
<p-datepicker
size="small"
fluid
@@ -383,7 +383,7 @@
[showIcon]="true"
[iconDisplay]="'input'"
appendTo="body"
class="w-full"
class="full-width"
[ngClass]="{
'changed': isValueChanged(field.controlName),
}">
@@ -403,8 +403,8 @@
@for (field of metadataChips; track field) {
<div class="meta-row field-{{field.controlName}}">
<label for="{{field.controlName}}" class="w-[8rem] text-sm">{{ field.label }}</label>
<div class="flex w-full">
<label for="{{field.controlName}}" class="field-label field-label--fixed">{{ field.label }}</label>
<div class="field-input-row">
<p-autoComplete
size="small"
formControlName="{{field.controlName}}"
@@ -412,7 +412,7 @@
[typeahead]="false"
[dropdown]="false"
[forceSelection]="false"
class="w-full"
class="full-width"
[ngClass]="{
'changed': isValueChanged(field.controlName),
}"
@@ -433,8 +433,8 @@
@for (field of metadataDescription; track field) {
<div class="meta-row field-{{field.controlName}}">
<label for="{{field.controlName}}" class="w-[8rem] text-sm">{{ field.label }}</label>
<div class="flex w-full">
<label for="{{field.controlName}}" class="field-label field-label--fixed">{{ field.label }}</label>
<div class="field-input-row">
<textarea
pTextarea
fluid
@@ -461,8 +461,8 @@
@for (field of metadataFieldsBottom; track field) {
<div class="meta-row field-{{field.controlName}}">
<label for="{{field.controlName}}" class="w-[8rem] text-sm">{{ field.label }}</label>
<div class="flex w-full">
<label for="{{field.controlName}}" class="field-label field-label--fixed">{{ field.label }}</label>
<div class="field-input-row">
<input
pSize="small"
fluid
@@ -486,7 +486,7 @@
</div>
}
</div>
</div>
</div>
</div>
</form>
}
@@ -1,4 +1,4 @@
.thumbnail {
.thumbnail {
border: 1px solid var(--border-color);
border-radius: 0.5rem;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
@@ -36,7 +36,7 @@
max-height: 100%;
height: auto;
width: auto;
@media (max-width: 768px) {
max-height: 14em;
}
@@ -68,6 +68,112 @@ textarea.changed,
.metapicker, .metaeditor {
box-sizing: border-box;
display: flex;
width: 100%;
}
.metapicker {
flex-direction: column;
}
.form-scroll {
flex-grow: 1;
overflow: auto;
}
.field-label {
font-size: 0.875rem;
@media (min-width: 768px) {
width: 8rem;
}
}
.field-label--fixed {
width: 8rem;
}
.header-fields-row {
display: flex;
width: 100%;
align-items: center;
}
.header-column {
width: 50%;
}
.btn-margin {
margin: 0 0.5rem;
}
.thumbnail-row {
display: flex;
width: 100%;
align-items: center;
justify-content: center;
}
.thumbnail-column {
display: flex;
width: 50%;
}
.no-cover-text {
font-size: 0.875rem;
}
.full-width {
width: 100%;
}
.metabody {
display: flex;
flex-direction: column;
padding: 1rem;
@media (min-width: 768px) {
flex-direction: row;
}
}
.editor-thumbnail-wrapper {
display: flex;
align-items: flex-start;
justify-content: center;
@media (min-width: 768px) {
width: 20%;
height: 100%;
}
}
.editor-thumbnail-inner {
width: 100%;
@media (min-width: 768px) {
height: 100%;
}
}
.editor-thumbnail-img {
width: 100%;
object-fit: contain;
@media (min-width: 768px) {
height: 100%;
}
}
.editor-metacontent {
@media (min-width: 768px) {
width: 80%;
}
}
.field-input-row {
display: flex;
width: 100%;
}
.metapicker label,
@@ -112,6 +218,9 @@ textarea.changed,
}
.metaheader {
position: relative;
display: flex;
align-items: center;
border-bottom: 1px dotted var(--border-color);
padding: 1rem;
justify-content: space-between;
@@ -196,7 +305,7 @@ textarea.changed,
display: flex;
align-items: center;
margin-bottom: 0.5em;
label {
margin: auto 0;
}
@@ -286,4 +395,4 @@ textarea.changed,
}
}
}
}
}
@@ -76,7 +76,7 @@
[binary]="true"
[(ngModel)]="includeCoversOnCopy">
</p-checkbox>
<label for="includecovers"><i class="pi pi-image pl-2"></i></label>
<label for="includecovers"><i class="pi pi-image icon-padding-left"></i></label>
</p-inputgroup-addon>
</p-inputgroup>
@@ -170,7 +170,7 @@
class="cover-image"
(click)="file.showDetails = !file.showDetails"/>
} @else {
<div title="No cover found" class="cover-image text-sm">?</div>
<div title="No cover found" class="cover-image cover-placeholder">?</div>
}
@if (file.file.fetchedMetadata?.thumbnailUrl) {
@@ -181,7 +181,7 @@
class="cover-image"
(click)="file.showDetails = !file.showDetails"/>
} @else {
<div title="No cover fetched" class="cover-image text-sm">?</div>
<div title="No cover fetched" class="cover-image cover-placeholder">?</div>
}
<div class="file-name" (click)="file.showDetails = !file.showDetails">
@@ -270,7 +270,7 @@
@if (bookdropFileUis.length > 0) {
<p-inputgroup class="selectall">
<p-inputgroup-addon>
<label class="text-sm" pTooltip="Number of files selected" tooltipPosition="top">{{ selectedCount }}</label>
<label class="selected-count-label" pTooltip="Number of files selected" tooltipPosition="top">{{ selectedCount }}</label>
</p-inputgroup-addon>
<p-button
label="Select&nbsp;All"
@@ -433,3 +433,15 @@ div.cover-image {
.spacer {
min-width: 10rem;
}
.icon-padding-left {
padding-left: 0.5rem;
}
.cover-placeholder {
font-size: 0.875rem;
}
.selected-count-label {
font-size: 0.875rem;
}
@@ -1,17 +1,17 @@
<div class="staging-border p-4 rounded">
<div class="flex justify-between items-center">
<div class="staging-border">
<div class="widget-row">
<div class="flex flex-col justify-center">
<p class="text font-bold text-zinc-300">Pending Bookdrop Files</p>
<p class="text-lg font-bold text-primary">{{ pendingCount }}</p>
<div class="widget-info">
<p class="widget-title">Pending Bookdrop Files</p>
<p class="widget-count">{{ pendingCount }}</p>
@if (lastUpdatedAt) {
<p class="text-xs text-zinc-400 mt-1">
<p class="widget-date">
Last updated: {{ lastUpdatedAt | date: 'short' }}
</p>
}
</div>
<div class="flex items-center">
<div class="widget-actions">
<p-button
size="small"
outlined
@@ -2,4 +2,39 @@
background: var(--card-background);
border: 1px solid var(--primary-color);
border-radius: 0.5rem;
padding: 1rem;
}
.widget-row {
display: flex;
justify-content: space-between;
align-items: center;
}
.widget-info {
display: flex;
flex-direction: column;
justify-content: center;
}
.widget-title {
font-weight: 700;
color: #d4d4d8;
}
.widget-count {
font-size: 1.125rem;
font-weight: 700;
color: var(--primary-color);
}
.widget-date {
font-size: 0.75rem;
color: #a1a1aa;
margin-top: 0.25rem;
}
.widget-actions {
display: flex;
align-items: center;
}