From 1e405c34468067d5be1186268d190ad3c0739efa Mon Sep 17 00:00:00 2001 From: Dark_Phoenix_ <92178883+0DarkPhoenix@users.noreply.github.com> Date: Fri, 13 Jun 2025 08:23:10 +0200 Subject: [PATCH] Improve fortune wheel performance (#91) Improved performance on the fortune wheel page by replacing the laggy vue3 fortune wheel with a local implementation Uninstalled vue3-fortune-wheel package Created a clearer option list while still keeping it compact Now allowing a spin duration of 0s , while limiting the maximum to 10s Created a function which generates unique colors instead of using a preset palette --------- Co-authored-by: ShareVB --- package.json | 1 - pnpm-lock.yaml | 13 - src/tools/fortune-wheel/fortune-wheel.vue | 704 ++++++++++++++++++++-- 3 files changed, 638 insertions(+), 80 deletions(-) diff --git a/package.json b/package.json index 092d3470..755491cb 100644 --- a/package.json +++ b/package.json @@ -286,7 +286,6 @@ "vue-shadow-dom": "^4.2.0", "vue-tsc": "^1.8.1", "vue3-flip-countdown": "^0.1.6", - "vue3-fortune-wheel": "^2.0.5", "vuedraggable": "^4.1.0", "vuex": "^4.1.0", "w-websocket-client": "^1.0.29", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5159b78a..9c7186b9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -755,9 +755,6 @@ dependencies: vue3-flip-countdown: specifier: ^0.1.6 version: 0.1.6 - vue3-fortune-wheel: - specifier: ^2.0.5 - version: 2.0.5(vue@3.3.4) vuedraggable: specifier: ^4.1.0 version: 4.1.0(vue@3.3.4) @@ -18546,16 +18543,6 @@ packages: vue: 3.3.4 dev: false - /vue3-fortune-wheel@2.0.5(vue@3.3.4): - resolution: {integrity: sha512-fMCmyT8sE79+O6fs2IWWrQMa1UjU+cuzu92C6EDCNaXaHaJKLReQxkAKLDiHyUC/GFpcsbpuBFbketWE3cKL0A==} - engines: {node: '>=20.14.0', pnpm: '>=9.5.0'} - peerDependencies: - vue: ^3.4.0 - dependencies: - d3: 7.9.0 - vue: 3.3.4 - dev: false - /vue@3.3.4: resolution: {integrity: sha512-VTyEYn3yvIeY1Py0WaYGZsXnz3y5UnGi62GjVEqvEGPl6nxbOrCXbVOTQWBEJUqAyTUk2uJ5JLVnYJ6ZzGbrSw==} dependencies: diff --git a/src/tools/fortune-wheel/fortune-wheel.vue b/src/tools/fortune-wheel/fortune-wheel.vue index 70a6d910..acf255c5 100644 --- a/src/tools/fortune-wheel/fortune-wheel.vue +++ b/src/tools/fortune-wheel/fortune-wheel.vue @@ -1,85 +1,657 @@ + +