From 9acd9603d63d07163c89fe59c0331ab39537c790 Mon Sep 17 00:00:00 2001 From: 4cello Date: Mon, 1 Apr 2024 08:55:54 +0200 Subject: [PATCH] Removed accordions --- src/components/TheSelectPrinterDialog.vue | 84 +++++++++++-------- .../settings/SettingsRemotePrintersTab.vue | 30 +++---- src/locales/en.json | 1 - 3 files changed, 61 insertions(+), 54 deletions(-) diff --git a/src/components/TheSelectPrinterDialog.vue b/src/components/TheSelectPrinterDialog.vue index 460687424..a27cd0ab9 100644 --- a/src/components/TheSelectPrinterDialog.vue +++ b/src/components/TheSelectPrinterDialog.vue @@ -83,24 +83,26 @@ dense> - - - - - - - + + + + + + {{ $t('SelectPrinterDialog.AddPrinter') }} @@ -137,27 +139,32 @@ hide-details="auto"> - - - - - - - + + + + + {{ mdiDelete }} + {{ $t('SelectPrinterDialog.UpdatePrinter') }} @@ -257,6 +264,8 @@ import { mdiCloseThick, mdiConnection, mdiDelete, + mdiCog, + mdiCogOff, mdiPencil, mdiSync, } from '@mdi/js' @@ -270,7 +279,7 @@ export default class TheSelectPrinterDialog extends Mixins(BaseMixin) { bool: false, hostname: '', port: 7125, - path: '', + path: '/', } private editPrinterValid = false private dialogEditPrinter = { @@ -278,8 +287,9 @@ export default class TheSelectPrinterDialog extends Mixins(BaseMixin) { id: '', hostname: '', port: 0, - path: '', + path: '/', } + private showOptionalSettings = false /** * Icons @@ -291,6 +301,8 @@ export default class TheSelectPrinterDialog extends Mixins(BaseMixin) { mdiPencil = mdiPencil mdiCheckboxMarkedCircle = mdiCheckboxMarkedCircle mdiCancel = mdiCancel + mdiShowOptional = mdiCog + mdiHideOptional = mdiCogOff get printers() { return this.$store.getters['gui/remoteprinters/getRemoteprinters'] ?? [] @@ -389,14 +401,14 @@ export default class TheSelectPrinterDialog extends Mixins(BaseMixin) { this.dialogAddPrinter.hostname = '' this.dialogAddPrinter.bool = false - this.dialogAddPrinter.path = '' + this.dialogAddPrinter.path = '/' } editPrinter(printer: GuiRemoteprintersStatePrinter) { this.dialogEditPrinter.hostname = printer.hostname this.dialogEditPrinter.port = printer.port this.dialogEditPrinter.id = printer.id ?? '' - this.dialogEditPrinter.path = printer.path ?? '' + this.dialogEditPrinter.path = printer.path ?? '/' this.dialogEditPrinter.bool = true } diff --git a/src/components/settings/SettingsRemotePrintersTab.vue b/src/components/settings/SettingsRemotePrintersTab.vue index ac7f8e466..d7b65f6bf 100644 --- a/src/components/settings/SettingsRemotePrintersTab.vue +++ b/src/components/settings/SettingsRemotePrintersTab.vue @@ -66,19 +66,15 @@ dense outlined> - - - - - + + + + {{ $t('Settings.Cancel') }} @@ -123,7 +119,7 @@ export default class SettingsRemotePrintersTab extends Mixins(BaseMixin) { bool: false, hostname: '', port: 7125, - path: '', + path: '/', id: null, namespace: null, } @@ -147,7 +143,7 @@ export default class SettingsRemotePrintersTab extends Mixins(BaseMixin) { createPrinter() { this.form.hostname = '' this.form.port = 7125 - this.form.path = '' + this.form.path = '/' this.form.id = null this.form.namespace = null this.form.bool = true @@ -172,7 +168,7 @@ export default class SettingsRemotePrintersTab extends Mixins(BaseMixin) { this.form.id = printer.id ?? null this.form.hostname = printer.hostname this.form.port = printer.port - this.form.path = printer.path ?? null + this.form.path = printer.path ?? '/' this.form.bool = true } @@ -188,7 +184,7 @@ export default class SettingsRemotePrintersTab extends Mixins(BaseMixin) { this.form.id = null this.form.hostname = '' this.form.port = 7125 - this.form.path = '' + this.form.path = '/' this.form.bool = false } diff --git a/src/locales/en.json b/src/locales/en.json index 5fdc58ae5..07497c626 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1062,7 +1062,6 @@ }, "RemotePrintersTab": { "AddPrinter": "Add Printer", - "AdvancedSettings": "Advanced Settings", "EditPrinter": "Edit Printer", "Hostname": "Hostname", "Path": "Path",