diff --git a/changelog.md b/changelog.md index 3d291fcf6d..615a072128 100644 --- a/changelog.md +++ b/changelog.md @@ -6,6 +6,10 @@ Tracker: - Basic sprints +Workbench: + +- Help Center + ## 0.6.31 Core: diff --git a/models/setting/src/index.ts b/models/setting/src/index.ts index a61a5fe98d..bf26f8110a 100644 --- a/models/setting/src/index.ts +++ b/models/setting/src/index.ts @@ -200,20 +200,21 @@ export function createModel (builder: Builder): void { }, setting.ids.EnumSetting ) - builder.createDoc( - setting.class.SettingsCategory, - core.space.Model, - { - name: 'support', - label: setting.string.Support, - icon: setting.icon.Support, - component: setting.component.Support, - group: 'main', - secured: false, - order: 5000 - }, - setting.ids.Support - ) + // Currently remove Support item from settings + // builder.createDoc( + // setting.class.SettingsCategory, + // core.space.Model, + // { + // name: 'support', + // label: setting.string.Support, + // icon: setting.icon.Support, + // component: setting.component.Support, + // group: 'main', + // secured: false, + // order: 5000 + // }, + // setting.ids.Support + // ) builder.createDoc( setting.class.SettingsCategory, core.space.Model, diff --git a/packages/theme/styles/common.scss b/packages/theme/styles/common.scss index 2d13628145..1427b28552 100644 --- a/packages/theme/styles/common.scss +++ b/packages/theme/styles/common.scss @@ -217,6 +217,12 @@ flex-shrink: 0; height: 1rem; } +.antiNav-footer { + align-items: flex-end; + display: flex; + flex: 1; + margin: 2rem .75rem; +} /* Basic */ .antiTitle { diff --git a/packages/theme/styles/popups.scss b/packages/theme/styles/popups.scss index 3a7043e5f1..823cbe3137 100644 --- a/packages/theme/styles/popups.scss +++ b/packages/theme/styles/popups.scss @@ -411,7 +411,7 @@ } } -.notifyPopup { +.notifyPopup, .helpAndSupportPopup { overflow: hidden; display: flex; flex-direction: column; @@ -437,6 +437,11 @@ } } +.helpAndSupportPopup { + min-height: 100%; + min-width: 20rem; +} + // Remove highlights table rows and hide dots in popups .popup .tr-body:hover, .popup-tooltip .tr-body:hover { background-color: transparent !important; } .popup-tooltip .tr-body .menuRow { visibility: hidden !important; } diff --git a/packages/ui/src/popups.ts b/packages/ui/src/popups.ts index aa61554be4..55f124d9e2 100644 --- a/packages/ui/src/popups.ts +++ b/packages/ui/src/popups.ts @@ -292,6 +292,11 @@ export function fitPopupElement ( newProps.bottom = '12px' newProps.left = '50%' newProps.transform = 'translateX(-50%)' + } else if (element === 'help-center') { + newProps.top = 'calc(var(--status-bar-height) + 12px)' + newProps.bottom = '12px' + newProps.right = '12px' + show = true } } else { newProps.top = '50%' diff --git a/packages/ui/src/types.ts b/packages/ui/src/types.ts index dfd9c9cbd3..9c1045e466 100644 --- a/packages/ui/src/types.ts +++ b/packages/ui/src/types.ts @@ -135,6 +135,7 @@ export type PopupPosAlignment = | 'full' | 'content' | 'middle' + | 'help-center' export function isPopupPosAlignment (x: any): x is PopupPosAlignment { return ( @@ -145,7 +146,8 @@ export function isPopupPosAlignment (x: any): x is PopupPosAlignment { x === 'account' || x === 'full' || x === 'content' || - x === 'middle') + x === 'middle' || + x === 'help-center') ) } diff --git a/plugins/workbench-assets/lang/en.json b/plugins/workbench-assets/lang/en.json index 74f254b5d0..005a628ff2 100644 --- a/plugins/workbench-assets/lang/en.json +++ b/plugins/workbench-assets/lang/en.json @@ -16,6 +16,14 @@ "Join": "Join", "BrowseSpaces": "Browse spaces", "AccountDisabled": "Account is disabled", - "AccountDisabledDescr": "Please contact the workspace administrator" + "AccountDisabledDescr": "Please contact the workspace administrator", + "HelpAndSupport": "Help & Support", + "HelpCenter": "Help Center", + "KeyboardShortcuts": "Keyboard Shortcuts", + "Documentation": "Documentation", + "ContactUs": "Contact us", + "OpenPlatformGuide": "Open Platform Guide", + "AccessWorkspaceSettings": "Access your workspace settings", + "HowToWorkFaster": "Learn how to work faster" } } \ No newline at end of file diff --git a/plugins/workbench-assets/lang/ru.json b/plugins/workbench-assets/lang/ru.json index b1b46cf1e1..7141fde7f9 100644 --- a/plugins/workbench-assets/lang/ru.json +++ b/plugins/workbench-assets/lang/ru.json @@ -16,6 +16,14 @@ "Join": "Присоедениться", "BrowseSpaces": "Обзор пространств", "AccountDisabled": "Аккаунт отключен", - "AccountDisabledDescr": "Пожалуйста свяжитесь с администратором" + "AccountDisabledDescr": "Пожалуйста свяжитесь с администратором", + "HelpAndSupport": "Помощь", + "HelpCenter": "Центр помощи", + "KeyboardShortcuts": "Сочетания клавиш", + "Documentation": "Документация", + "ContactUs": "Связаться с нами", + "OpenPlatformGuide": "Открыть руководство пользователя", + "AccessWorkspaceSettings": "Открыть настройки рабочего пространства", + "HowToWorkFaster": "Узнайте как работать эффективнее" } } \ No newline at end of file diff --git a/plugins/workbench-resources/src/components/AccountPopup.svelte b/plugins/workbench-resources/src/components/AccountPopup.svelte index f8e4bf7311..a3a13e5adb 100644 --- a/plugins/workbench-resources/src/components/AccountPopup.svelte +++ b/plugins/workbench-resources/src/components/AccountPopup.svelte @@ -31,6 +31,8 @@ locationToUrl } from '@hcengineering/ui' import view from '@hcengineering/view' + import HelpAndSupport from './HelpAndSupport.svelte' + import workbench from '../plugin' let items: SettingsCategory[] = [] @@ -90,6 +92,10 @@ showPopup(login.component.InviteLink, {}) } + function helpAndSupport (): void { + showPopup(HelpAndSupport, {}, 'help-center') + } + function filterItems (items: SettingsCategory[], keys: string[]): SettingsCategory[] { return items.filter( (p) => p._id !== setting.ids.Profile && p._id !== setting.ids.Password && keys.includes(p.group ?? '') @@ -149,6 +155,12 @@ action: async () => inviteWorkspace(), group: 'end' }, + { + icon: setting.icon.Support, + label: workbench.string.HelpAndSupport, + action: async () => helpAndSupport(), + group: 'end' + }, { icon: setting.icon.Signout, label: setting.string.Signout, diff --git a/plugins/workbench-resources/src/components/HelpAndSupport.svelte b/plugins/workbench-resources/src/components/HelpAndSupport.svelte new file mode 100644 index 0000000000..f66d75c750 --- /dev/null +++ b/plugins/workbench-resources/src/components/HelpAndSupport.svelte @@ -0,0 +1,241 @@ + + +