From 91364ea3057add5a00a304623c76dda5a09f3932 Mon Sep 17 00:00:00 2001 From: Neko Ayaka Date: Wed, 2 Jul 2025 03:41:31 +0800 Subject: [PATCH] feat(stage-tamagotchi): settings - modules - hearing panel --- .../src-tauri/src/app/windows/settings.rs | 2 +- .../src/pages/settings/modules/hearing.vue | 518 +++++++++++++++++- .../src/pages/settings/modules/index.vue | 2 +- .../components/Gadgets/LevelMeter.story.vue | 30 +- .../src/components/Gadgets/LevelMeter.vue | 6 +- .../Gadgets/ThresholdMeter.story.vue | 26 +- 6 files changed, 549 insertions(+), 35 deletions(-) diff --git a/apps/stage-tamagotchi/src-tauri/src/app/windows/settings.rs b/apps/stage-tamagotchi/src-tauri/src/app/windows/settings.rs index df47e9e86..5881c7282 100644 --- a/apps/stage-tamagotchi/src-tauri/src/app/windows/settings.rs +++ b/apps/stage-tamagotchi/src-tauri/src/app/windows/settings.rs @@ -14,7 +14,7 @@ pub fn new_settings_window( WebviewUrl::App(Path::new("#/settings").to_path_buf()), ) .title("Settings") - .inner_size(450.0, 800.0) + .inner_size(550.0, 900.0) .shadow(true) .transparent(false) .accept_first_mouse(true); diff --git a/apps/stage-tamagotchi/src/pages/settings/modules/hearing.vue b/apps/stage-tamagotchi/src/pages/settings/modules/hearing.vue index 31cf6611a..001901596 100644 --- a/apps/stage-tamagotchi/src/pages/settings/modules/hearing.vue +++ b/apps/stage-tamagotchi/src/pages/settings/modules/hearing.vue @@ -1,6 +1,520 @@ + + diff --git a/apps/stage-tamagotchi/src/pages/settings/modules/index.vue b/apps/stage-tamagotchi/src/pages/settings/modules/index.vue index 8fd1bb8cc..9c4098c7b 100644 --- a/apps/stage-tamagotchi/src/pages/settings/modules/index.vue +++ b/apps/stage-tamagotchi/src/pages/settings/modules/index.vue @@ -43,7 +43,7 @@ const modulesList = computed(() => [ name: t('settings.pages.modules.hearing.title'), description: t('settings.pages.modules.hearing.description'), icon: 'i-solar:microphone-3-bold-duotone', - to: '', + to: '/settings/modules/hearing', configured: false, }, { diff --git a/packages/stage-ui/src/components/Gadgets/LevelMeter.story.vue b/packages/stage-ui/src/components/Gadgets/LevelMeter.story.vue index 76843e7d7..d5d0ec49a 100644 --- a/packages/stage-ui/src/components/Gadgets/LevelMeter.story.vue +++ b/packages/stage-ui/src/components/Gadgets/LevelMeter.story.vue @@ -72,10 +72,10 @@ const performanceThresholds = [ id="basic-examples" title="Basic Examples" > -
+
-
+

Audio Level (Real-time)

@@ -87,7 +87,7 @@ const performanceThresholds = [
-
+

Battery Level

@@ -100,7 +100,7 @@ const performanceThresholds = [
-
+

CPU Usage (Animated)

@@ -119,10 +119,10 @@ const performanceThresholds = [ id="custom-styling" title="Custom Styling" > -
+
-
+

Temperature Monitor

@@ -139,7 +139,7 @@ const performanceThresholds = [
-
+

Audio Level (dB)

@@ -162,10 +162,10 @@ const performanceThresholds = [ id="configuration-options" title="Configuration Options" > -
+
-
+

Compact Mode

@@ -180,7 +180,7 @@ const performanceThresholds = [
-
+

High Resolution

@@ -196,7 +196,7 @@ const performanceThresholds = [
-
+

Low Resolution

@@ -218,8 +218,8 @@ const performanceThresholds = [ id="dashboard-example" title="Dashboard Example" > -
-
+
+

System Monitor Dashboard

@@ -271,8 +271,8 @@ const performanceThresholds = [ id="interactive-demo" title="Interactive Demo" > -
-
+
+

Adjustable Level

diff --git a/packages/stage-ui/src/components/Gadgets/LevelMeter.vue b/packages/stage-ui/src/components/Gadgets/LevelMeter.vue index 3c5e33dff..503cd929a 100644 --- a/packages/stage-ui/src/components/Gadgets/LevelMeter.vue +++ b/packages/stage-ui/src/components/Gadgets/LevelMeter.vue @@ -41,7 +41,7 @@ const levelBars = computed(() => { })) }) -function getBarColor(index: number, barLevel: number): string { +function getBarColor(_index: number, barLevel: number): string { const thresholds = [...props.colorThresholds].sort((a, b) => a.value - b.value) for (const threshold of thresholds) { @@ -65,7 +65,7 @@ function getBarColor(index: number, barLevel: number): string {
`${value.toFixed(3)}`
-
+

Detection Confidence

@@ -72,7 +72,7 @@ const formatScore = (value: number) => `${value.toFixed(3)}`
-
+

Quality Threshold

@@ -87,7 +87,7 @@ const formatScore = (value: number) => `${value.toFixed(3)}`
-
+

Real-time Monitoring

@@ -112,7 +112,7 @@ const formatScore = (value: number) => `${value.toFixed(3)}`
-
+

ML Model Confidence

@@ -130,7 +130,7 @@ const formatScore = (value: number) => `${value.toFixed(3)}`
-
+

Anomaly Detection

@@ -157,7 +157,7 @@ const formatScore = (value: number) => `${value.toFixed(3)}`
-
+

Response Time

@@ -175,7 +175,7 @@ const formatScore = (value: number) => `${value.toFixed(3)}`
-
+

Success Rate

@@ -191,7 +191,7 @@ const formatScore = (value: number) => `${value.toFixed(3)}`
-
+

Load Factor

@@ -217,7 +217,7 @@ const formatScore = (value: number) => `${value.toFixed(3)}`
-
+

Minimal Display

@@ -234,7 +234,7 @@ const formatScore = (value: number) => `${value.toFixed(3)}`
-
+

High Precision

@@ -252,7 +252,7 @@ const formatScore = (value: number) => `${value.toFixed(3)}`
-
+

Custom Range

@@ -278,7 +278,7 @@ const formatScore = (value: number) => `${value.toFixed(3)}` title="Interactive Demo" >
-
+

Adjustable Parameters

@@ -333,7 +333,7 @@ const formatScore = (value: number) => `${value.toFixed(3)}` title="Dashboard Example" >
-
+

System Health Dashboard