]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix: small frontend css class fixes, remove unused component
authorshamoon <4887959+shamoon@users.noreply.github.com>
Thu, 27 Feb 2025 18:19:07 +0000 (10:19 -0800)
committershamoon <4887959+shamoon@users.noreply.github.com>
Thu, 27 Feb 2025 18:28:44 +0000 (10:28 -0800)
src-ui/src/app/components/common/select-dialog/select-dialog.component.html [deleted file]
src-ui/src/app/components/common/select-dialog/select-dialog.component.scss [deleted file]
src-ui/src/app/components/common/select-dialog/select-dialog.component.spec.ts [deleted file]
src-ui/src/app/components/common/select-dialog/select-dialog.component.ts [deleted file]
src-ui/src/app/components/common/toast/toast.component.html
src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html
src-ui/src/theme.scss

diff --git a/src-ui/src/app/components/common/select-dialog/select-dialog.component.html b/src-ui/src/app/components/common/select-dialog/select-dialog.component.html
deleted file mode 100644 (file)
index 00b2dc7..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<div class="modal-header">
-  <h4 class="modal-title" id="modal-basic-title">{{title}}</h4>
-  <button type="button" class="btn-close" aria-label="Close" (click)="cancelClicked()">
-  </button>
-</div>
-<div class="modal-body">
-
-  <pngx-input-select [items]="objects" [title]="message" [(ngModel)]="selected"></pngx-input-select>
-
-</div>
-<div class="modal-footer">
-  <button type="button" class="btn btn-outline-dark" (click)="cancelClicked()" i18n>Cancel</button>
-  <button type="button" class="btn btn-primary" (click)="selectClicked.emit(selected)" i18n>Select</button>
-</div>
diff --git a/src-ui/src/app/components/common/select-dialog/select-dialog.component.scss b/src-ui/src/app/components/common/select-dialog/select-dialog.component.scss
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/src-ui/src/app/components/common/select-dialog/select-dialog.component.spec.ts b/src-ui/src/app/components/common/select-dialog/select-dialog.component.spec.ts
deleted file mode 100644 (file)
index d67ea42..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing'
-import { FormsModule, ReactiveFormsModule } from '@angular/forms'
-import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
-import { NgSelectModule } from '@ng-select/ng-select'
-import { SelectComponent } from '../input/select/select.component'
-import { SelectDialogComponent } from './select-dialog.component'
-
-describe('SelectDialogComponent', () => {
-  let component: SelectDialogComponent
-  let fixture: ComponentFixture<SelectDialogComponent>
-  let modal: NgbActiveModal
-
-  beforeEach(async () => {
-    TestBed.configureTestingModule({
-      providers: [NgbActiveModal],
-      imports: [
-        NgSelectModule,
-        FormsModule,
-        ReactiveFormsModule,
-        SelectDialogComponent,
-        SelectComponent,
-      ],
-    }).compileComponents()
-
-    modal = TestBed.inject(NgbActiveModal)
-    fixture = TestBed.createComponent(SelectDialogComponent)
-    component = fixture.componentInstance
-    fixture.detectChanges()
-  })
-
-  it('should close modal on cancel', () => {
-    const closeSpy = jest.spyOn(modal, 'close')
-    component.cancelClicked()
-    expect(closeSpy).toHaveBeenCalled()
-  })
-})
diff --git a/src-ui/src/app/components/common/select-dialog/select-dialog.component.ts b/src-ui/src/app/components/common/select-dialog/select-dialog.component.ts
deleted file mode 100644 (file)
index 3c6c985..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-import { Component, EventEmitter, Input, Output } from '@angular/core'
-import { FormsModule, ReactiveFormsModule } from '@angular/forms'
-import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
-import { ObjectWithId } from 'src/app/data/object-with-id'
-import { SelectComponent } from '../input/select/select.component'
-
-@Component({
-  selector: 'pngx-select-dialog',
-  templateUrl: './select-dialog.component.html',
-  styleUrls: ['./select-dialog.component.scss'],
-  imports: [SelectComponent, FormsModule, ReactiveFormsModule],
-})
-export class SelectDialogComponent {
-  constructor(public activeModal: NgbActiveModal) {}
-
-  @Output()
-  public selectClicked = new EventEmitter()
-
-  @Input()
-  title = $localize`Select`
-
-  @Input()
-  message = $localize`Please select an object`
-
-  @Input()
-  objects: ObjectWithId[] = []
-
-  selected: number
-
-  cancelClicked() {
-    this.activeModal.close()
-  }
-}
index ede75ddea9d959e6567e252421e7cd6a0a4e0929..fc8e85e9c802c50e7410b2cf7abef4e48b1df484 100644 (file)
@@ -33,7 +33,7 @@
                 }
                 <div class="row">
                     <div class="col offset-sm-3">
-                    <button class="btn btn-sm btn-outline-dark" (click)="copyError(toast.error)">
+                    <button class="btn btn-sm btn-outline-secondary" (click)="copyError(toast.error)">
                         @if (!copied) {
                         <i-bs name="clipboard"></i-bs>&nbsp;
                         }
index 91db1041172efd9e6854509f01e5a41cb5780fc2..acfb15c84d5db687002daaad66aa3cef9930d0ec 100644 (file)
@@ -17,7 +17,7 @@
     }
   </div>
   <div class="modal-footer">
-    <button type="button" class="btn btn-outline-dark" (click)="cancel()" i18n [disabled]="!buttonsEnabled">Cancel</button>
+    <button type="button" class="btn btn-outline-secondary" (click)="cancel()" i18n [disabled]="!buttonsEnabled">Cancel</button>
     <button type="submit" class="btn btn-primary" i18n [disabled]="!buttonsEnabled">Save</button>
   </div>
 </form>
index d7cfa56283e77a24af00ff127472569009a196c2..cc60d38512d6d6f9105e4116e34b35dbe301d544 100644 (file)
@@ -291,10 +291,6 @@ $form-check-radio-checked-bg-image-dark: url("data:image/svg+xml,<svg xmlns='htt
     color: var(--pngx-primary-text-contrast);
   }
 
-  .toast .btn-outline-dark:hover {
-    color: var(--bs-body-color)
-  }
-
   .dropdown-item {
     --bs-dropdown-color: var(--bs-body-color);
     --pngx-bg-darker: var(--pngx-bg-alt);