diff --git a/src/server_manager/messages/en.json b/src/server_manager/messages/en.json index b9189ee08..ce1352f9d 100644 --- a/src/server_manager/messages/en.json +++ b/src/server_manager/messages/en.json @@ -143,6 +143,7 @@ "gcp-type-network-tag": "Type 'outline' in the 'Network tags' field.", "gcp-type-outline-server": "Type 'outline-server' in the 'Name' field.", "key": "Key {keyId}", + "manager-resources": "Manager Resources", "manual-server-assign-firewall": "Assign firewall rule", "manual-server-assign-group": "Assign Security Group", "manual-server-create-firewall": "Create a firewall rule", diff --git a/src/server_manager/messages/master_messages.json b/src/server_manager/messages/master_messages.json index 1af5f81bd..e36880c6b 100644 --- a/src/server_manager/messages/master_messages.json +++ b/src/server_manager/messages/master_messages.json @@ -714,6 +714,10 @@ } } }, + "manager_resources": { + "message": "Manager Resources", + "description": "This string appears within the manager sidebar as a link to the manager documentation." + }, "manual_server_assign_firewall": { "message": "Assign firewall rule", "description": "This string appears in the server setup view as a sub-header of a section that provides instructions to configure the server's firewall." diff --git a/src/server_manager/web_app/ui_components/app-root.ts b/src/server_manager/web_app/ui_components/app-root.ts index 5b1934682..031fc3528 100644 --- a/src/server_manager/web_app/ui_components/app-root.ts +++ b/src/server_manager/web_app/ui_components/app-root.ts @@ -274,6 +274,12 @@ export class AppRoot extends polymerElementWithLocalize { #links-footer { margin-top: 36px; } + #appDrawer .manager-resources-link { + color: var(--primary-green); + display: flex; + align-items: center; + gap: 0.25rem; + } .legal-links { margin: 0 -6px; } @@ -391,6 +397,13 @@ export class AppRoot extends polymerElementWithLocalize { + + [[localize('manager-resources')]] + + [[localize('nav-data-collection')]] [[localize('nav-feedback')]] [[localize('nav-help')]] @@ -697,10 +710,7 @@ export class AppRoot extends polymerElementWithLocalize { observer: '_currentPageChanged', }, shouldShowSideBar: {type: Boolean}, - sideBarMarginClass: { - type: String, - computed: '_computeSideBarMarginClass(shouldShowSideBar)', - }, + showManagerResourcesLink: {type: Boolean}, }; } @@ -714,6 +724,7 @@ export class AppRoot extends polymerElementWithLocalize { outlineVersion = ''; currentPage = 'intro'; shouldShowSideBar = false; + showManagerResourcesLink = false; constructor() { super(); @@ -769,6 +780,21 @@ export class AppRoot extends polymerElementWithLocalize { (this.$.appDrawer as AppDrawerElement).align = alignDir; (this.$.sideBar as AppDrawerElement).align = alignDir; this.language = language; + + this.showManagerResourcesLink = this.hasTranslation('manager-resources'); + } + + hasTranslation(key: string) { + let message; + + try { + message = this.localize(key); + } catch (e) { + // failed to find translation + message = ''; + } + + return message !== key && message !== ''; } showIntro() {