From 26895aadc9b25e49c3fcc5d6e33d022373126733 Mon Sep 17 00:00:00 2001 From: wizardchen Date: Wed, 3 Jun 2026 15:33:23 +0800 Subject: [PATCH] feat(user-guide): update NewUserGuide and UserMenu for improved onboarding experience - Refactored the NewUserGuide component to utilize a new event for opening the guide, enhancing event handling. - Updated UserMenu to include a button for reopening the guide, improving accessibility for users. - Enhanced localization strings to provide clearer instructions on accessing the guide from the user menu. - Introduced a new command in the Global Command Palette to open the product tour, streamlining user onboarding. - Added styles for new guide-related elements to improve visual consistency and user interaction. --- .../GlobalCommandPalette/commands.ts | 11 +++++ frontend/src/components/NewUserGuide.vue | 8 ++- frontend/src/components/UserMenu.vue | 49 ++++++++++++++++--- frontend/src/config/contextualGuides.ts | 5 ++ frontend/src/i18n/locales/en-US.ts | 5 +- frontend/src/i18n/locales/ko-KR.ts | 5 +- frontend/src/i18n/locales/ru-RU.ts | 5 +- frontend/src/i18n/locales/zh-CN.ts | 5 +- frontend/src/views/platform/index.vue | 2 +- 9 files changed, 74 insertions(+), 21 deletions(-) diff --git a/frontend/src/components/GlobalCommandPalette/commands.ts b/frontend/src/components/GlobalCommandPalette/commands.ts index 365f9127..4db0f49b 100644 --- a/frontend/src/components/GlobalCommandPalette/commands.ts +++ b/frontend/src/components/GlobalCommandPalette/commands.ts @@ -1,5 +1,6 @@ import type { Router } from 'vue-router' import type { Composer } from 'vue-i18n' +import { openNewUserGuide } from '@/config/contextualGuides' /** * A single command that can be searched and invoked from the palette. @@ -82,6 +83,16 @@ export function buildCommands(ctx: CommandContext): CmdkCommand[] { router.push('/platform/settings') }, }, + { + id: 'open-product-tour', + label: t('commandPalette.quick.productTour'), + icon: 'help-circle', + keywords: ['guide', 'tour', 'onboarding', 'help', '引导', '新手', '教程'], + run: () => { + close() + openNewUserGuide() + }, + }, ] } diff --git a/frontend/src/components/NewUserGuide.vue b/frontend/src/components/NewUserGuide.vue index 48d930bb..d7370672 100644 --- a/frontend/src/components/NewUserGuide.vue +++ b/frontend/src/components/NewUserGuide.vue @@ -6,12 +6,10 @@ diff --git a/frontend/src/components/UserMenu.vue b/frontend/src/components/UserMenu.vue index 258e8d1b..5d129581 100644 --- a/frontend/src/components/UserMenu.vue +++ b/frontend/src/components/UserMenu.vue @@ -38,7 +38,15 @@ {{ userInitial }} @@ -144,10 +152,6 @@ -