From 1bd85099ec53ab2b4342b560af53c4b78fc2f0ef Mon Sep 17 00:00:00 2001 From: Benjamin Lu Date: Mon, 30 Jun 2025 14:19:39 -0400 Subject: [PATCH] Add temporary widget testing panel --- .../dialog/content/SettingDialogContent.vue | 1 + .../content/setting/WidgetTestPanel.vue | 403 ++++++++++++++++++ src/composables/setting/useSettingUI.ts | 14 + src/locales/en/main.json | 4 + 4 files changed, 422 insertions(+) create mode 100644 src/components/dialog/content/setting/WidgetTestPanel.vue diff --git a/src/components/dialog/content/SettingDialogContent.vue b/src/components/dialog/content/SettingDialogContent.vue index fc22316cd..889d8157e 100644 --- a/src/components/dialog/content/SettingDialogContent.vue +++ b/src/components/dialog/content/SettingDialogContent.vue @@ -88,6 +88,7 @@ const { defaultPanel } = defineProps<{ | 'server-config' | 'user' | 'credits' + | 'widget-test' }>() const { diff --git a/src/components/dialog/content/setting/WidgetTestPanel.vue b/src/components/dialog/content/setting/WidgetTestPanel.vue new file mode 100644 index 000000000..32a8f4524 --- /dev/null +++ b/src/components/dialog/content/setting/WidgetTestPanel.vue @@ -0,0 +1,403 @@ + + + + + diff --git a/src/composables/setting/useSettingUI.ts b/src/composables/setting/useSettingUI.ts index 1fd2bf307..35b612f35 100644 --- a/src/composables/setting/useSettingUI.ts +++ b/src/composables/setting/useSettingUI.ts @@ -28,6 +28,7 @@ export function useSettingUI( | 'server-config' | 'user' | 'credits' + | 'widget-test' ) { const { t } = useI18n() const { isLoggedIn } = useCurrentUser() @@ -127,6 +128,17 @@ export function useSettingUI( ) } + const widgetTestPanel: SettingPanelItem = { + node: { + key: 'widget-test', + label: 'Widget Test', + children: [] + }, + component: defineAsyncComponent( + () => import('@/components/dialog/content/setting/WidgetTestPanel.vue') + ) + } + const panels = computed(() => [ aboutPanel, @@ -134,6 +146,7 @@ export function useSettingUI( userPanel, keybindingPanel, extensionPanel, + widgetTestPanel, ...(isElectron() ? [serverConfigPanel] : []) ].filter((panel) => panel.component) ) @@ -182,6 +195,7 @@ export function useSettingUI( children: [ keybindingPanel.node, extensionPanel.node, + widgetTestPanel.node, aboutPanel.node, ...(isElectron() ? [serverConfigPanel.node] : []) ].map(translateCategory) diff --git a/src/locales/en/main.json b/src/locales/en/main.json index 10192509c..e309e8cf3 100644 --- a/src/locales/en/main.json +++ b/src/locales/en/main.json @@ -72,6 +72,9 @@ "searchFailedMessage": "We couldn't find any settings matching your search. Try adjusting your search terms.", "noTasksFound": "No Tasks Found", "noTasksFoundMessage": "There are no tasks in the queue.", + "widgetTesting": "Widget Testing", + "readonlyMode": "Readonly Mode", + "noCallbacksTriggered": "No callbacks triggered yet...", "newFolder": "New Folder", "enableAll": "Enable All", "disableAll": "Disable All", @@ -916,6 +919,7 @@ "Light": "Light", "User": "User", "Credits": "Credits", + "Widget Test": "Widget Test", "API Nodes": "API Nodes" }, "serverConfigItems": {