From 8c425b44ed133668bfdbd669ad39f962ee9eabd8 Mon Sep 17 00:00:00 2001 From: HRS Date: Mon, 16 Mar 2026 18:39:40 +0100 Subject: [PATCH 01/12] Fix quotes and add debounced text field --- cypress/integration/example.spec.ts | 8 +- cypress/support/index.ts | 2 +- eslint.config.ts | 7 +- package.json | 4 +- src/App.vue | 39 +++++----- src/components/DeviceInfo.vue | 14 ++-- src/components/ServerStatusOverlay.vue | 8 +- src/components/__tests__/HelloWorld.spec.ts | 14 ++-- src/components/automation/CreateForm.vue | 24 +++--- src/components/automation/LogViewer.vue | 6 +- src/components/automation/MonacoEditor.vue | 20 ++--- src/components/chart/StreamLineChart.vue | 14 ++-- src/components/device/DebouncedSlider.vue | 2 +- src/components/device/DebouncedTextField.vue | 76 +++++++++++++++++++ src/components/device/DeviceCard.vue | 18 ++--- src/components/device/DeviceControl.vue | 70 ++++++++--------- .../device/control/DeviceEstim2bControl.vue | 14 ++-- .../device/control/DeviceZc95Control.vue | 14 ++-- .../device/control/GenericDeviceControl.vue | 32 ++++---- .../slvctrlplus/DeviceAirValveControl.vue | 10 +-- .../slvctrlplus/DeviceDisplayControl.vue | 30 ++++---- .../slvctrlplus/DeviceDistanceControl.vue | 18 ++--- .../slvctrlplus/DeviceEt312Control.vue | 56 +++++++------- .../slvctrlplus/DeviceNogasmControl.vue | 26 +++---- .../slvctrlplus/DeviceStrikerMk2Control.vue | 14 ++-- .../virtual/DeviceVirtualDisplayControl.vue | 16 ++-- .../virtual/DeviceVirtualPiperTtsControl.vue | 18 ++--- .../DeviceVirtualRandomGeneratorControl.vue | 6 +- .../virtual/DeviceVirtualTtsControl.vue | 24 +++--- src/components/icons/DeviceIcon.vue | 24 +++--- src/helper/ChartHelper.ts | 12 +-- src/helper/DeviceCommunicator.ts | 17 +---- src/helper/TimeoutHelper.ts | 20 ----- src/layouts/LayoutWithMenu.vue | 40 +++++----- src/main.ts | 24 +++--- src/model/MapRule.ts | 6 +- src/model/devices/Device.ts | 4 + src/model/devices/estim2b/DeviceEstim2b.ts | 4 +- src/model/devices/slvctrl/DeviceAirValve.ts | 4 +- src/model/devices/slvctrl/DeviceDisplay.ts | 4 +- src/model/devices/slvctrl/DeviceDistance.ts | 4 +- src/model/devices/slvctrl/DeviceEt312.ts | 4 +- src/model/devices/slvctrl/DeviceNogasm.ts | 6 +- src/model/devices/slvctrl/DeviceStrikerMk2.ts | 4 +- .../devices/virtual/VirtualDeviceDisplay.ts | 4 +- .../devices/virtual/VirtualDevicePiperTts.ts | 4 +- src/model/devices/virtual/VirtualDeviceTts.ts | 4 +- .../devices/virtual/VirtualRandomGenerator.ts | 4 +- src/model/devices/zc95/DeviceZc95.ts | 6 +- src/plugins/vueSocketIOClient.ts | 10 +-- src/plugins/vuetify.ts | 62 +++++++-------- src/plugins/webfontloader.ts | 4 +- src/router/index.ts | 48 ++++++------ src/shims-vue.d.ts | 8 +- src/shims-vuetify.d.ts | 6 +- src/stores/app.ts | 14 ++-- src/stores/automation.ts | 26 +++---- src/stores/backend.ts | 10 +-- src/stores/devices.ts | 17 +++-- src/stores/health.ts | 40 +++++----- src/stores/settings.ts | 16 ++-- src/utils/apiFetch.ts | 2 +- src/utils/utils.ts | 18 ++++- src/views/AutomationView.vue | 42 +++++----- src/views/BackendUrl.vue | 12 +-- src/views/DevicesView.vue | 10 +-- src/views/MissionControlSingleView.vue | 18 ++--- src/views/MissionControlView.vue | 10 +-- src/views/SettingsView.vue | 22 +++--- src/views/SystemHealthView.vue | 28 +++---- src/vueSocketIOClient.d.ts | 4 +- vite.config.ts | 10 +-- vue.config.js | 2 +- 73 files changed, 661 insertions(+), 581 deletions(-) create mode 100644 src/components/device/DebouncedTextField.vue delete mode 100644 src/helper/TimeoutHelper.ts diff --git a/cypress/integration/example.spec.ts b/cypress/integration/example.spec.ts index 3130c00..6e1bb87 100644 --- a/cypress/integration/example.spec.ts +++ b/cypress/integration/example.spec.ts @@ -1,8 +1,8 @@ // https://docs.cypress.io/api/introduction/api.html -describe("My First Test", () => { - it("visits the app root url", () => { - cy.visit("/"); - cy.contains("h1", "You did it!"); +describe('My First Test', () => { + it('visits the app root url', () => { + cy.visit('/'); + cy.contains('h1', 'You did it!'); }); }); diff --git a/cypress/support/index.ts b/cypress/support/index.ts index d076cec..37a498f 100644 --- a/cypress/support/index.ts +++ b/cypress/support/index.ts @@ -14,7 +14,7 @@ // *********************************************************** // Import commands.js using ES2015 syntax: -import "./commands"; +import './commands'; // Alternatively you can use CommonJS syntax: // require('./commands') diff --git a/eslint.config.ts b/eslint.config.ts index 5381806..db457bb 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -2,7 +2,6 @@ import { globalIgnores } from 'eslint/config' import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript' import * as pluginVue from 'eslint-plugin-vue' import * as pluginVitest from '@vitest/eslint-plugin' -import skipFormatting from '@vue/eslint-config-prettier/skip-formatting' // To allow more languages other than `ts` in `.vue` files, uncomment the following lines: // import { configureVueProject } from '@vue/eslint-config-typescript' @@ -24,5 +23,9 @@ export default defineConfigWithVueTs( ...pluginVitest.default.configs.recommended, files: ['src/**/__tests__/*'], }, - skipFormatting, + { + rules: { + 'quotes': ['warn', 'single', { 'allowTemplateLiterals': true }], + }, + }, ) diff --git a/package.json b/package.json index cd5e468..5dd91da 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "build": "vue-tsc --noEmit -p tsconfig.app.json --composite false && vite build", "test:unit": "vitest --environment jsdom", "test:e2e": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress open'", - "lint": "eslint . --fix", + "lint": "eslint .", "dev": "vite", "preview": "vite preview --port 5050", "test:e2e:ci": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress run'" @@ -46,7 +46,6 @@ "@vitejs/plugin-vue-jsx": "^5.0.0", "@vitest/eslint-plugin": "^1.2.7", "@vue/compiler-sfc": "^3.5.17", - "@vue/eslint-config-prettier": "^10.2.0", "@vue/eslint-config-typescript": "^14.5.1", "@vue/test-utils": "^2.4.6", "@vue/tsconfig": "^0.7.0", @@ -57,7 +56,6 @@ "jiti": "^2.4.2", "jsdom": "^26.1.0", "npm-run-all2": "^8.0.4", - "prettier": "^3.5.3", "sass": "^1.89.2", "start-server-and-test": "^2.0.12", "typescript": "^5.8.3", diff --git a/src/App.vue b/src/App.vue index c1addf2..111610c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,15 +1,15 @@ diff --git a/src/components/ServerStatusOverlay.vue b/src/components/ServerStatusOverlay.vue index c77202b..cbdbdc0 100644 --- a/src/components/ServerStatusOverlay.vue +++ b/src/components/ServerStatusOverlay.vue @@ -1,8 +1,8 @@ diff --git a/src/components/automation/LogViewer.vue b/src/components/automation/LogViewer.vue index 01a570b..44378ca 100644 --- a/src/components/automation/LogViewer.vue +++ b/src/components/automation/LogViewer.vue @@ -1,6 +1,6 @@