From 228b44101b8b83204bbf08fe11dacc935bf1a182 Mon Sep 17 00:00:00 2001 From: Julian Krauser Date: Sun, 13 Jul 2025 10:17:02 +0200 Subject: [PATCH 1/6] 1.7.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 54f23a8..0fd547b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ff-admin", - "version": "1.7.0", + "version": "1.7.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ff-admin", - "version": "1.7.0", + "version": "1.7.1", "license": "AGPL-3.0-only", "dependencies": { "@fullcalendar/core": "^6.1.18", diff --git a/package.json b/package.json index 7d23ae8..3d75356 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ff-admin", - "version": "1.7.0", + "version": "1.7.1", "description": "Feuerwehr/Verein Mitgliederverwaltung UI", "type": "module", "scripts": { From a2101db747502d8747c6a6e5a8e5a7d38748a254 Mon Sep 17 00:00:00 2001 From: Julian Krauser Date: Thu, 17 Jul 2025 12:56:33 +0200 Subject: [PATCH 2/6] add QuillEditor Component --- package-lock.json | 105 ++++++++++++++++++++++--------- package.json | 1 + src/components/QuillEditor.vue | 110 +++++++++++++++++++++++++++++++++ 3 files changed, 187 insertions(+), 29 deletions(-) create mode 100644 src/components/QuillEditor.vue diff --git a/package-lock.json b/package-lock.json index 54f23a8..3c53095 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,6 +38,7 @@ "pwacompat": "^2.0.17", "qrcode": "^1.5.4", "qs": "^6.14.0", + "quill": "^2.0.3", "socket.io-client": "^4.8.1", "unplugin-vue-markdown": "^29.1.0", "uuid": "^11.1.0", @@ -4652,6 +4653,52 @@ "vue": "^3.2.41" } }, + "node_modules/@vueup/vue-quill/node_modules/eventemitter3": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.3.tgz", + "integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg==", + "license": "MIT" + }, + "node_modules/@vueup/vue-quill/node_modules/fast-diff": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.1.2.tgz", + "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==", + "license": "Apache-2.0" + }, + "node_modules/@vueup/vue-quill/node_modules/parchment": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/parchment/-/parchment-1.1.4.tgz", + "integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg==", + "license": "BSD-3-Clause" + }, + "node_modules/@vueup/vue-quill/node_modules/quill": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/quill/-/quill-1.3.7.tgz", + "integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==", + "license": "BSD-3-Clause", + "dependencies": { + "clone": "^2.1.1", + "deep-equal": "^1.0.1", + "eventemitter3": "^2.0.3", + "extend": "^3.0.2", + "parchment": "^1.1.4", + "quill-delta": "^3.6.2" + } + }, + "node_modules/@vueup/vue-quill/node_modules/quill/node_modules/quill-delta": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/quill-delta/-/quill-delta-3.6.3.tgz", + "integrity": "sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==", + "license": "MIT", + "dependencies": { + "deep-equal": "^1.0.1", + "extend": "^3.0.2", + "fast-diff": "1.1.2" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/acorn": { "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", @@ -6219,9 +6266,9 @@ "license": "MIT" }, "node_modules/eventemitter3": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.3.tgz", - "integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", "license": "MIT" }, "node_modules/execa": { @@ -6280,7 +6327,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true, "license": "Apache-2.0" }, "node_modules/fast-glob": { @@ -8129,6 +8175,12 @@ "dev": true, "license": "MIT" }, + "node_modules/lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", + "license": "MIT" + }, "node_modules/lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", @@ -8710,9 +8762,9 @@ } }, "node_modules/parchment": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/parchment/-/parchment-1.1.4.tgz", - "integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/parchment/-/parchment-3.0.0.tgz", + "integrity": "sha512-HUrJFQ/StvgmXRcQ1ftY6VEZUq3jA2t9ncFN4F84J/vN0/FPpQF+8FKXb3l6fLces6q0uOHj6NJn+2xvZnxO6A==", "license": "BSD-3-Clause" }, "node_modules/parent-module": { @@ -9111,17 +9163,18 @@ "license": "MIT" }, "node_modules/quill": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/quill/-/quill-1.3.7.tgz", - "integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/quill/-/quill-2.0.3.tgz", + "integrity": "sha512-xEYQBqfYx/sfb33VJiKnSJp8ehloavImQ2A6564GAbqG55PGw1dAWUn1MUbQB62t0azawUS2CZZhWCjO8gRvTw==", "license": "BSD-3-Clause", "dependencies": { - "clone": "^2.1.1", - "deep-equal": "^1.0.1", - "eventemitter3": "^2.0.3", - "extend": "^3.0.2", - "parchment": "^1.1.4", - "quill-delta": "^3.6.2" + "eventemitter3": "^5.0.1", + "lodash-es": "^4.17.21", + "parchment": "^3.0.0", + "quill-delta": "^5.1.0" + }, + "engines": { + "npm": ">=8.2.3" } }, "node_modules/quill-delta": { @@ -9141,24 +9194,18 @@ "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", "license": "Apache-2.0" }, - "node_modules/quill/node_modules/fast-diff": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.1.2.tgz", - "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==", - "license": "Apache-2.0" - }, "node_modules/quill/node_modules/quill-delta": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/quill-delta/-/quill-delta-3.6.3.tgz", - "integrity": "sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/quill-delta/-/quill-delta-5.1.0.tgz", + "integrity": "sha512-X74oCeRI4/p0ucjb5Ma8adTXd9Scumz367kkMK5V/IatcX6A0vlgLgKbzXWy5nZmCGeNJm2oQX0d2Eqj+ZIlCA==", "license": "MIT", "dependencies": { - "deep-equal": "^1.0.1", - "extend": "^3.0.2", - "fast-diff": "1.1.2" + "fast-diff": "^1.3.0", + "lodash.clonedeep": "^4.5.0", + "lodash.isequal": "^4.5.0" }, "engines": { - "node": ">=0.10" + "node": ">= 12.0.0" } }, "node_modules/randombytes": { diff --git a/package.json b/package.json index 7d23ae8..4aea9cc 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "pwacompat": "^2.0.17", "qrcode": "^1.5.4", "qs": "^6.14.0", + "quill": "^2.0.3", "socket.io-client": "^4.8.1", "unplugin-vue-markdown": "^29.1.0", "uuid": "^11.1.0", diff --git a/src/components/QuillEditor.vue b/src/components/QuillEditor.vue new file mode 100644 index 0000000..55c39b2 --- /dev/null +++ b/src/components/QuillEditor.vue @@ -0,0 +1,110 @@ + + + + + From 08c3698dd8490508586302f878fb5ad0405dc18d Mon Sep 17 00:00:00 2001 From: Julian Krauser Date: Thu, 17 Jul 2025 13:57:50 +0200 Subject: [PATCH 3/6] update Editor usage --- src/components/QuillEditor.vue | 34 ++++++++++++++----- .../admin/club/newsletter/NewsletterData.vue | 3 +- .../admin/club/newsletter/NewsletterDates.vue | 3 +- .../club/newsletter/NewsletterOverview.vue | 6 ++-- .../admin/club/protocol/ProtocolAgenda.vue | 3 +- .../admin/club/protocol/ProtocolDecisions.vue | 3 +- .../admin/club/protocol/ProtocolOverview.vue | 3 +- .../admin/club/protocol/ProtocolVoting.vue | 3 +- 8 files changed, 34 insertions(+), 24 deletions(-) diff --git a/src/components/QuillEditor.vue b/src/components/QuillEditor.vue index 55c39b2..8264879 100644 --- a/src/components/QuillEditor.vue +++ b/src/components/QuillEditor.vue @@ -4,7 +4,7 @@ diff --git a/src/views/admin/club/newsletter/NewsletterDates.vue b/src/views/admin/club/newsletter/NewsletterDates.vue index 66a9baf..b47c903 100644 --- a/src/views/admin/club/newsletter/NewsletterDates.vue +++ b/src/views/admin/club/newsletter/NewsletterDates.vue @@ -107,8 +107,7 @@ import { defineComponent } from "vue"; import { mapActions, mapState, mapWritableState } from "pinia"; import Spinner from "@/components/Spinner.vue"; -import { QuillEditor } from "@vueup/vue-quill"; -import "@vueup/vue-quill/dist/vue-quill.snow.css"; +import QuillEditor from "@/components/QuillEditor.vue"; import { toolbarOptions } from "@/helpers/quillConfig"; import { useNewsletterDatesStore } from "@/stores/admin/club/newsletter/newsletterDates"; import { useAbilityStore } from "@/stores/ability"; diff --git a/src/views/admin/club/newsletter/NewsletterOverview.vue b/src/views/admin/club/newsletter/NewsletterOverview.vue index 5283ac0..1f4e1f9 100644 --- a/src/views/admin/club/newsletter/NewsletterOverview.vue +++ b/src/views/admin/club/newsletter/NewsletterOverview.vue @@ -18,13 +18,12 @@ @@ -42,8 +41,7 @@ import { defineComponent } from "vue"; import { mapActions, mapState, mapWritableState } from "pinia"; import Spinner from "@/components/Spinner.vue"; import { useNewsletterStore } from "@/stores/admin/club/newsletter/newsletter"; -import { QuillEditor } from "@vueup/vue-quill"; -import "@vueup/vue-quill/dist/vue-quill.snow.css"; +import QuillEditor from "@/components/QuillEditor.vue"; import { toolbarOptions } from "@/helpers/quillConfig"; import { useAbilityStore } from "@/stores/ability"; diff --git a/src/views/admin/club/protocol/ProtocolAgenda.vue b/src/views/admin/club/protocol/ProtocolAgenda.vue index 8e17344..300facc 100644 --- a/src/views/admin/club/protocol/ProtocolAgenda.vue +++ b/src/views/admin/club/protocol/ProtocolAgenda.vue @@ -78,8 +78,7 @@ import { defineComponent } from "vue"; import { mapActions, mapState, mapWritableState } from "pinia"; import Spinner from "@/components/Spinner.vue"; -import { QuillEditor } from "@vueup/vue-quill"; -import "@vueup/vue-quill/dist/vue-quill.snow.css"; +import QuillEditor from "@/components/QuillEditor.vue"; import { toolbarOptions } from "@/helpers/quillConfig"; import { useProtocolAgendaStore } from "@/stores/admin/club/protocol/protocolAgenda"; import { useAbilityStore } from "@/stores/ability"; diff --git a/src/views/admin/club/protocol/ProtocolDecisions.vue b/src/views/admin/club/protocol/ProtocolDecisions.vue index e63570e..2d3dd3a 100644 --- a/src/views/admin/club/protocol/ProtocolDecisions.vue +++ b/src/views/admin/club/protocol/ProtocolDecisions.vue @@ -78,8 +78,7 @@ import { defineComponent } from "vue"; import { mapActions, mapState, mapWritableState } from "pinia"; import Spinner from "@/components/Spinner.vue"; -import { QuillEditor } from "@vueup/vue-quill"; -import "@vueup/vue-quill/dist/vue-quill.snow.css"; +import QuillEditor from "@/components/QuillEditor.vue"; import { toolbarOptions } from "@/helpers/quillConfig"; import { useProtocolDecisionStore } from "@/stores/admin/club/protocol/protocolDecision"; import { useAbilityStore } from "@/stores/ability"; diff --git a/src/views/admin/club/protocol/ProtocolOverview.vue b/src/views/admin/club/protocol/ProtocolOverview.vue index d5f984a..7c696f7 100644 --- a/src/views/admin/club/protocol/ProtocolOverview.vue +++ b/src/views/admin/club/protocol/ProtocolOverview.vue @@ -64,8 +64,7 @@ import { defineComponent } from "vue"; import { mapActions, mapState, mapWritableState } from "pinia"; import Spinner from "@/components/Spinner.vue"; import { useProtocolStore } from "@/stores/admin/club/protocol/protocol"; -import { QuillEditor } from "@vueup/vue-quill"; -import "@vueup/vue-quill/dist/vue-quill.snow.css"; +import QuillEditor from "@/components/QuillEditor.vue"; import { toolbarOptions } from "@/helpers/quillConfig"; import { useAbilityStore } from "@/stores/ability"; diff --git a/src/views/admin/club/protocol/ProtocolVoting.vue b/src/views/admin/club/protocol/ProtocolVoting.vue index 6d26871..0692486 100644 --- a/src/views/admin/club/protocol/ProtocolVoting.vue +++ b/src/views/admin/club/protocol/ProtocolVoting.vue @@ -95,8 +95,7 @@ import { defineComponent } from "vue"; import { mapActions, mapState, mapWritableState } from "pinia"; import Spinner from "@/components/Spinner.vue"; -import { QuillEditor } from "@vueup/vue-quill"; -import "@vueup/vue-quill/dist/vue-quill.snow.css"; +import QuillEditor from "@/components/QuillEditor.vue"; import { toolbarOptions } from "@/helpers/quillConfig"; import { useProtocolVotingStore } from "@/stores/admin/club/protocol/protocolVoting"; import { useAbilityStore } from "@/stores/ability"; From e6dfde058d2e239ca05666ac93a68e27bd63ff41 Mon Sep 17 00:00:00 2001 From: Julian Krauser Date: Fri, 18 Jul 2025 15:18:09 +0200 Subject: [PATCH 4/6] rewirte in composition api to prevent this ref errors --- src/components/QuillEditor.vue | 217 ++++++++++++++++----------------- 1 file changed, 108 insertions(+), 109 deletions(-) diff --git a/src/components/QuillEditor.vue b/src/components/QuillEditor.vue index 8264879..6787edf 100644 --- a/src/components/QuillEditor.vue +++ b/src/components/QuillEditor.vue @@ -3,126 +3,125 @@ - From 4265ed679197a64c3f89379549d35f5d2bc49e5d Mon Sep 17 00:00:00 2001 From: Julian Krauser Date: Fri, 18 Jul 2025 15:52:54 +0200 Subject: [PATCH 5/6] enhance unmount and format --- src/components/QuillEditor.vue | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/src/components/QuillEditor.vue b/src/components/QuillEditor.vue index 6787edf..ae00810 100644 --- a/src/components/QuillEditor.vue +++ b/src/components/QuillEditor.vue @@ -1,5 +1,7 @@ + + From 53fd89dd9ebca766f2467f76951b58a6ffc3ec8b Mon Sep 17 00:00:00 2001 From: Julian Krauser Date: Fri, 18 Jul 2025 16:16:07 +0200 Subject: [PATCH 6/6] fix: return text with normal whitespace --- src/components/QuillEditor.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/QuillEditor.vue b/src/components/QuillEditor.vue index ae00810..1cd192d 100644 --- a/src/components/QuillEditor.vue +++ b/src/components/QuillEditor.vue @@ -113,9 +113,9 @@ function getContent(): string | Delta { if (props.contentType === "delta") { return (instance.value?.getContents() ?? {}) as Delta; } else if (props.contentType === "html") { - return instance.value?.getSemanticHTML() ?? ""; + return instance.value?.getSemanticHTML().replace(/ /g, " ") ?? ""; } else { - return instance.value?.getText() ?? ""; + return instance.value?.getText().replace(/ /g, " ") ?? ""; } } function setContent(content: Delta | string) {