From b84ef44faac74dd7ed498c9f8bccfe9a2871fd50 Mon Sep 17 00:00:00 2001 From: Oleg Vavilov Date: Fri, 15 Aug 2025 14:02:07 +0300 Subject: [PATCH 1/2] https://github.com/dstackai/dstack-cloud/issues/296 --- frontend/public/index.html | 14 +++ frontend/public/logo-notext.svg | 116 +++++++++++++++++++++++ frontend/src/layouts/AppLayout/index.tsx | 14 ++- frontend/src/locale/en.json | 3 +- 4 files changed, 145 insertions(+), 2 deletions(-) create mode 100644 frontend/public/logo-notext.svg diff --git a/frontend/public/index.html b/frontend/public/index.html index 66a4ca12c8..177d14c6d8 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -22,5 +22,19 @@
+ + diff --git a/frontend/public/logo-notext.svg b/frontend/public/logo-notext.svg new file mode 100644 index 0000000000..f5cd233feb --- /dev/null +++ b/frontend/public/logo-notext.svg @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/layouts/AppLayout/index.tsx b/frontend/src/layouts/AppLayout/index.tsx index 2f81950665..410c2fc31e 100644 --- a/frontend/src/layouts/AppLayout/index.tsx +++ b/frontend/src/layouts/AppLayout/index.tsx @@ -137,6 +137,11 @@ const AppLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => { const ThemeIcon = THEME_ICON_MAP[systemMode]; + const askAi = () => { + window.document.body.focus(); + window?.Kapa?.open(); + }; + return ( @@ -150,7 +155,7 @@ const AppLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => { utilities={[ process.env.UI_VERSION === 'sky' && { type: 'button', - iconName: 'gen-ai', + iconName: 'suggestions', title: t('common.tutorial_other'), onClick: toggleTutorialPanel, }, @@ -172,6 +177,13 @@ const AppLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => { iconSvg: , onClick: onChangeSystemModeToggle, }, + process.env.UI_VERSION === 'sky' && { + type: 'button', + iconName: 'gen-ai', + text: t('common.ask_ai'), + title: t('common.ask_ai'), + onClick: askAi, + }, { 'data-class': 'user-menu', type: 'menu-dropdown', diff --git a/frontend/src/locale/en.json b/frontend/src/locale/en.json index fd6e9ec928..15b7c9cc5d 100644 --- a/frontend/src/locale/en.json +++ b/frontend/src/locale/en.json @@ -48,7 +48,8 @@ "danger_zone": "Danger Zone", "control_plane": "Control plane", "refresh": "Refresh", - "quickstart": "Quickstart" + "quickstart": "Quickstart", + "ask_ai": "Ask AI" }, "auth": { From ee39a70c265e2904ccbed00a5c73af8cc877fde3 Mon Sep 17 00:00:00 2001 From: Oleg Vavilov Date: Fri, 15 Aug 2025 18:00:22 +0300 Subject: [PATCH 2/2] Move tour button --- frontend/src/layouts/AppLayout/index.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/layouts/AppLayout/index.tsx b/frontend/src/layouts/AppLayout/index.tsx index 410c2fc31e..c0bfbed01c 100644 --- a/frontend/src/layouts/AppLayout/index.tsx +++ b/frontend/src/layouts/AppLayout/index.tsx @@ -153,12 +153,6 @@ const AppLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => { logo: { src: logo, alt: 'Dstack logo' }, }} utilities={[ - process.env.UI_VERSION === 'sky' && { - type: 'button', - iconName: 'suggestions', - title: t('common.tutorial_other'), - onClick: toggleTutorialPanel, - }, { type: 'button', text: t('common.docs'), @@ -184,6 +178,12 @@ const AppLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => { title: t('common.ask_ai'), onClick: askAi, }, + process.env.UI_VERSION === 'sky' && { + type: 'button', + iconName: 'suggestions', + title: t('common.tutorial_other'), + onClick: toggleTutorialPanel, + }, { 'data-class': 'user-menu', type: 'menu-dropdown',