fix add to collection modal ui

This commit is contained in:
X4Lo committed 2025-02-15 22:46:03 +01:00
1 parent 6b7cca1fe9
commit edc09da8df
2 files changed
+34 -35

No files matched your search

@@ -1,6 +1,3 @@
.modal-content {
padding: 20px 20px 0 20px;
}
.modal-body { .modal-body {
padding-right: 5px; padding-right: 5px;
@@ -18,19 +15,29 @@
.simplebar-content-wrapper { .simplebar-content-wrapper {
padding-right: 10px; padding-right: 10px;
} padding-top: 0;
max-height: 350px;
.simplebar-content-wrapper {
max-height: 300px;
overflow-y: auto; overflow-y: auto;
} }
.user-lists { .card-body {
height: 100%; display: flex;
background-color: var(--bs-body-bg) !important; flex-direction: column;
border-right: 1px solid var(--bs-border-color); height: auto;
min-height: 50vh; /* Ensures the modal keeps a proper format */
max-height: 90vh; /* Prevents it from growing too large */
} }
.user-lists .btn { .modal-body {
color: var(--bs-border-color); flex-grow: 1;
overflow-y: auto;
min-height: 150px; /* Prevents collapsing when empty */
max-height: calc(90vh - 150px); /* Prevents unnecessary scroll */
} }
.footer-actions {
display: flex;
justify-content: flex-end; /* Moves button to the right */
background: white;
}
@@ -1,38 +1,30 @@
<div class="card border-top border-3 border-primary rounded-0 media-dialog-main mb-0"> <div class="card border-top border-3 border-primary rounded-0 media-dialog-main mb-0 overflow-hidden">
<div class="modal-header card-header py-3 px-4"> <div class="modal-header card-header py-3 px-4">
<h5 class="mb-0 text-primary">Add To Collection</h5> <h5 class="mb-0 text-primary">Add To Collection</h5>
<button type="button" class="btn-close" aria-label="Close" (click)="onClose()"></button> <button type="button" class="btn-close" aria-label="Close" (click)="onClose()"></button>
</div> </div>
<div class="card-body p-4"> <div class="card-body p-4 d-flex flex-column">
<div class="modal-body">
<div class="input-group mb-3 "> <div class="flex-grow-1">
<!-- <label for="listNameInput" class="form-label">List Name</label> --> <div class="input-group mb-3">
<input type="text" class="form-control" id="listNameInput" [formControl]="searchControl" <input type="text" class="form-control" id="listNameInput" [formControl]="searchControl"
placeholder="Collection name..." @scaleInOut> placeholder="Collection name..." @scaleInOut>
<button class="btn btn-success growing-width-element" type="button" *ngIf="doShowAddButton()" <button class="btn btn-success growing-width-element" type="button" *ngIf="doShowAddButton()"
(click)="createCollection()" @scaleInOut>Create (click)="createCollection()" @scaleInOut>Create Collection</button>
Collection</button>
</div> </div>
<div class="d-grid gap-2" *ngIf="doShowAddButton()">
</div>
<div data-simplebar class="simplebar-content-wrapper">
<div class="list-group">
<label *ngFor="let list of collectionsToShow" class="list-group-item"> <div data-simplebar class="list-group simplebar-content-wrapper h-100">
<input class="form-check-input me-1" type="checkbox" [value]="list.id" <label *ngFor="let list of collectionsToShow" class="list-group-item">
(change)="onSelectionChange(list, $event)" [checked]="list.isChecked"> <input class="form-check-input me-1" type="checkbox" [value]="list.id"
{{ list.name }} (change)="onSelectionChange(list, $event)" [checked]="list.isChecked">
</label> {{ list.name }}
</div> </label>
</div> </div>
</div> </div>
<div class="col-md-12"> <div class="footer-actions pt-3">
<div class="d-md-flex d-grid align-items-end gap-3"> <button type="button" class="btn btn-primary px-4 rounded-0" (click)="onSubmit()">Confirm</button>
<button type="button" class="btn btn-primary px-4 rounded-0" (click)="onSubmit()">Confirm</button>
</div>
</div> </div>
</div> </div>
</div> </div>