From e8ed23d984697214856be664ec7b17d8a22f9758 Mon Sep 17 00:00:00 2001 From: David Zwart Date: Mon, 24 Apr 2023 23:50:57 +0200 Subject: [PATCH] ffeat: printer placement, lot of UI improvements and experimental pages hidden, fix: printer batch import --- package.json | 2 +- src/backend/app.service.ts | 7 + .../Generic/Actions/PrinterCreateAction.vue | 33 +++ .../Generic/Actions/PrinterDeleteAction.vue | 4 +- .../Generic/Actions/PrinterSettingsAction.vue | 2 +- .../Generic/Dialogs/BatchJsonCreateDialog.vue | 16 +- .../Generic/Dialogs/CreatePrinterDialog.vue | 2 +- .../Generic/Dialogs/dialog.constants.ts | 1 + src/components/PrinterGrid/HomeToolbar.vue | 13 + src/components/PrinterGrid/PrinterGrid.vue | 32 +++ .../PrinterGrid/PrinterGridTile.vue | 230 ++++++++++-------- src/components/PrinterList/PrinterDetails.vue | 3 - src/constants/drag.constants.ts | 17 ++ src/constants/experimental.constants.ts | 3 + src/directives/printer-place.directive.ts | 84 +++++++ src/main.ts | 2 + src/store/grid.store.ts | 10 + src/views/AboutView.vue | 99 +++++++- src/views/PrinterGridView.vue | 2 +- src/views/PrintersView.vue | 53 ++-- 20 files changed, 471 insertions(+), 144 deletions(-) create mode 100644 src/backend/app.service.ts create mode 100644 src/components/Generic/Actions/PrinterCreateAction.vue create mode 100644 src/constants/drag.constants.ts create mode 100644 src/directives/printer-place.directive.ts create mode 100644 src/store/grid.store.ts diff --git a/package.json b/package.json index eee8c5e0..05c46bfb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fdm-monster/client", - "version": "1.0.0-rc7", + "version": "1.0.0", "private": false, "author": "David Zwart", "license": "AGPL-3.0-or-later", diff --git a/src/backend/app.service.ts b/src/backend/app.service.ts new file mode 100644 index 00000000..190ce3b3 --- /dev/null +++ b/src/backend/app.service.ts @@ -0,0 +1,7 @@ +import { BaseService } from "./base.service"; + +export class AppService extends BaseService { + static async updateClientDist() { + return await this.postApi("api/server/update-client-bundle-github"); + } +} diff --git a/src/components/Generic/Actions/PrinterCreateAction.vue b/src/components/Generic/Actions/PrinterCreateAction.vue new file mode 100644 index 00000000..39e3842b --- /dev/null +++ b/src/components/Generic/Actions/PrinterCreateAction.vue @@ -0,0 +1,33 @@ + + + diff --git a/src/components/Generic/Actions/PrinterDeleteAction.vue b/src/components/Generic/Actions/PrinterDeleteAction.vue index ddc39d7c..02637e5f 100644 --- a/src/components/Generic/Actions/PrinterDeleteAction.vue +++ b/src/components/Generic/Actions/PrinterDeleteAction.vue @@ -1,7 +1,6 @@ @@ -30,6 +29,7 @@ export default defineComponent({ }, methods: { async deletePrinter() { + if (!confirm("Are you sure to delete this printer?")) return; await this.printersStore.deletePrinter(this.printerId); }, }, diff --git a/src/components/Generic/Actions/PrinterSettingsAction.vue b/src/components/Generic/Actions/PrinterSettingsAction.vue index e7a2fe6b..696bd2d9 100644 --- a/src/components/Generic/Actions/PrinterSettingsAction.vue +++ b/src/components/Generic/Actions/PrinterSettingsAction.vue @@ -9,7 +9,7 @@ import { defineComponent, PropType } from "vue"; import { Printer } from "@/models/printers/printer.model"; export default defineComponent({ - name: "PrinterUrlAction", + name: "PrinterSettingsAction", props: { printer: Object as PropType, }, diff --git a/src/components/Generic/Dialogs/BatchJsonCreateDialog.vue b/src/components/Generic/Dialogs/BatchJsonCreateDialog.vue index 1a03c58f..a76e30ea 100644 --- a/src/components/Generic/Dialogs/BatchJsonCreateDialog.vue +++ b/src/components/Generic/Dialogs/BatchJsonCreateDialog.vue @@ -1,7 +1,7 @@ @@ -20,6 +31,7 @@ diff --git a/src/views/PrinterGridView.vue b/src/views/PrinterGridView.vue index 398acf5c..e8d6aa3b 100644 --- a/src/views/PrinterGridView.vue +++ b/src/views/PrinterGridView.vue @@ -6,7 +6,7 @@ - No printers selected + No selected printers -