Fixes to stepper

This commit is contained in:
aditya.chandel
2024-12-29 23:42:05 -07:00
parent fb41ffdfe7
commit 38453d4beb
10 changed files with 576 additions and 171 deletions
+450 -82
View File
File diff suppressed because it is too large Load Diff
+4
View File
@@ -29,6 +29,7 @@
"primeicons": "^7.0.0", "primeicons": "^7.0.0",
"primeng": "19.0.2", "primeng": "19.0.2",
"rxjs": "~7.8.0", "rxjs": "~7.8.0",
"tailwindcss-primeui": "^0.3.4",
"tslib": "^2.3.0", "tslib": "^2.3.0",
"ws": "^8.18.0", "ws": "^8.18.0",
"zone.js": "~0.15.0" "zone.js": "~0.15.0"
@@ -38,12 +39,15 @@
"@angular/cli": "^19.0.2", "@angular/cli": "^19.0.2",
"@angular/compiler-cli": "^19.0.0", "@angular/compiler-cli": "^19.0.0",
"@types/jasmine": "~5.1.0", "@types/jasmine": "~5.1.0",
"autoprefixer": "^10.4.20",
"jasmine-core": "~5.4.0", "jasmine-core": "~5.4.0",
"karma": "~6.4.0", "karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0", "karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0", "karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0", "karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0", "karma-jasmine-html-reporter": "~2.1.0",
"postcss": "^8.4.49",
"tailwindcss": "^3.4.17",
"typescript": "~5.6.2" "typescript": "~5.6.2"
} }
} }
@@ -1,7 +1,7 @@
<div> <div>
<div class="book-browser-header"> <div class="book-browser-header">
<div class="left-items"> <div class="left-items">
<h4 class="entity-name">{{ (entityType$ | async) }}: {{ (entity$ | async)?.name }}</h4> <p class="entity-name text-2xl">{{ (entityType$ | async) }}: {{ (entity$ | async)?.name }}</p>
<p-button icon="pi pi-ellipsis-v" [rounded]="true" [text]="true" severity="info" (click)="entitymenu.toggle($event)"/> <p-button icon="pi pi-ellipsis-v" [rounded]="true" [text]="true" severity="info" (click)="entitymenu.toggle($event)"/>
<p-menu #entitymenu [model]="entityOptions" [popup]="true" appendTo="body"></p-menu> <p-menu #entitymenu [model]="entityOptions" [popup]="true" appendTo="body"></p-menu>
</div> </div>
@@ -13,8 +13,7 @@
} }
} }
.entity-name { .p {
margin: 0;
color: var(--text-color); color: var(--text-color);
} }
@@ -34,9 +34,14 @@ export class DashboardComponent {
this.ref = this.dialogService.open(LibraryCreatorComponent, { this.ref = this.dialogService.open(LibraryCreatorComponent, {
header: 'Create New Library', header: 'Create New Library',
modal: true, modal: true,
width: '50%', closable: true,
height: '50%', width: '675px',
style: { bottom: '15%' } height: '480px',
style: {
position: 'absolute',
top: '15%',
}
}); });
} }
} }
@@ -70,9 +70,13 @@ export class AppTopBarComponent implements OnDestroy {
this.ref = this.dialogService.open(LibraryCreatorComponent, { this.ref = this.dialogService.open(LibraryCreatorComponent, {
header: 'Create New Library', header: 'Create New Library',
modal: true, modal: true,
width: '40%', closable: true,
height: '50%', width: '675px',
style: {bottom: '15%'} height: '480px',
style: {
position: 'absolute',
top: '15%',
}
}); });
} }
@@ -80,9 +84,13 @@ export class AppTopBarComponent implements OnDestroy {
this.ref = this.dialogService.open(FileUploadComponent, { this.ref = this.dialogService.open(FileUploadComponent, {
header: 'Upload Book', header: 'Upload Book',
modal: true, modal: true,
width: '45%', closable: true,
height: '40%', width: '600px',
style: {bottom: '20%'} height: '330px',
style: {
position: 'absolute',
top: '15%',
}
}); });
} }
@@ -1,16 +1,20 @@
<p-stepper> <p-stepper [value]="1" class="basis-[50rem]">
<p-stepper header="Library Name"> <p-step-list>
<ng-template pTemplate="content" let-nextCallback="nextCallback" let-index="index"> <p-step [value]="1">Library Details</p-step>
<div class="flex flex-col h-[21rem]"> <p-step [value]="2">Select Directory</p-step>
<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"> </p-step-list>
<p-step-panels>
<p-step-panel [value]="1">
<ng-template #content let-activateCallback="activateCallback">
<div class="flex flex-col h-48 stepper-content-custom">
<div class="border-2 border-dashed border-surface-200 dark:border-surface-700 rounded 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-icon-parent">
<div class="library-name-div"> <div class="library-name-div">
<div>Library Name: </div> <p>Library Name: </p>
<input type="text" pInputText [(ngModel)]="value" placeholder="Enter library name..."/> <input type="text" pInputText [(ngModel)]="value" placeholder="Enter library name..."/>
</div> </div>
<div class="library-icon-div"> <div class="library-icon-div">
<div>Library Icon:</div> <p>Library Icon:</p>
<div *ngIf="!selectedIcon"> <div *ngIf="!selectedIcon">
<p-button label="Select Icon" icon="pi pi-search" (onClick)="openIconPicker()"></p-button> <p-button label="Select Icon" icon="pi pi-search" (onClick)="openIconPicker()"></p-button>
</div> </div>
@@ -22,22 +26,22 @@
</div> </div>
<app-icon-picker (iconSelected)="onIconSelected($event)"></app-icon-picker> <app-icon-picker (iconSelected)="onIconSelected($event)"></app-icon-picker>
</div> </div>
</div>
<div class="flex pt-6 justify-end"> <div class="flex pt-6 justify-end">
<p-button label="Next" icon="pi pi-arrow-right" iconPos="right" (onClick)="nextCallback.emit()"/> <p-button label="Next" icon="pi pi-arrow-right" iconPos="right" (onClick)="activateCallback(2)" />
</div>
</div> </div>
</ng-template> </ng-template>
</p-stepper> </p-step-panel>
<p-stepper header="Media Location">
<ng-template pTemplate="content" let-prevCallback="prevCallback" let-index="index"> <p-step-panel [value]="2">
<div class="flex flex-col xxx"> <ng-template #content let-activateCallback="activateCallback">
<div <div class="flex flex-col h-48 stepper-content-custom">
class="border-2 border-dashed border-surface rounded-border bg-surface-50 dark:bg-surface-950 flex-auto flex items-start" <div class="border-2 border-dashed border-surface-200 dark:border-surface-700 rounded bg-surface-50 dark:bg-surface-950 flex-auto flex justify-center items-center font-medium">
style="padding-top: 3rem;">
<div class="flex flex-col justify-center items-center w-100"> <div class="flex flex-col justify-center items-center w-100">
<p-button <p-button
severity="secondary" severity="info"
label="Browse for media folders" label="Add book folders"
[outlined]="true"
(onClick)="show()"> (onClick)="show()">
</p-button> </p-button>
<p-table [value]="folders" styleClass="p-datatable-striped" class="p-table-custom mt-4"> <p-table [value]="folders" styleClass="p-datatable-striped" class="p-table-custom mt-4">
@@ -58,11 +62,12 @@
</p-table> </p-table>
</div> </div>
</div> </div>
</div>
<div class="flex pt-6 justify-between"> <div class="flex pt-6 justify-between">
<p-button label="Back" icon="pi pi-arrow-left" (onClick)="prevCallback.emit()"/> <p-button label="Back" icon="pi pi-arrow-left" iconPos="right" (onClick)="activateCallback(1)" />
<p-button severity="success" label="Save" icon="pi pi-save" (onClick)="addLibrary()"></p-button> <p-button severity="success" label="Save" icon="pi pi-save" (onClick)="addLibrary()"></p-button>
</div> </div>
</div>
</ng-template> </ng-template>
</p-stepper> </p-step-panel>
</p-step-panels>
</p-stepper> </p-stepper>
@@ -2,7 +2,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
gap: 1rem; gap: 2.5rem;
} }
.library-name-div { .library-name-div {
@@ -49,7 +49,6 @@
} }
.p-table-custom { .p-table-custom {
margin: 1.5rem !important;
min-width: 35rem !important; min-width: 35rem !important;
max-height: 11.25rem !important; max-height: 11.25rem !important;
overflow: scroll; overflow: scroll;
@@ -86,6 +85,11 @@
} }
} }
.xxx { .stepper-content-custom {
min-height: 295px; height: 335px;
padding: 10px;
}
.p {
color: var(--text-color);
} }
+3 -2
View File
@@ -1,8 +1,9 @@
@import "../node_modules/primeicons/primeicons.css"; @import "../node_modules/primeicons/primeicons.css";
@import "assets/layout/styles/global.scss"; @import "assets/layout/styles/global.scss";
@import "../node_modules/primeflex/primeflex.scss"; @tailwind base;
@tailwind components;
@tailwind utilities;
html { html {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
+11
View File
@@ -0,0 +1,11 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./src/**/*.{html,ts}",
],
theme: {
extend: {},
},
plugins: [require('tailwindcss-primeui')]
}