From 009ea5763bf329d340c90cd144098ba6ba9c6171 Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Tue, 31 Mar 2020 19:34:22 -0400 Subject: [PATCH] Bugfix for item menu duplication on re-login, translations for new menu items, filtered list Signed-off-by: 1000TurquoisePogs --- .../launchbar-menu/launchbar-menu.component.html | 6 +++--- .../mvd-window-manager/launchbar/launchbar.module.ts | 2 ++ .../launchbar/launchbar/launchbar.component.ts | 8 +++++++- virtual-desktop/src/assets/i18n/messages.fr.xlf | 2 +- virtual-desktop/src/assets/i18n/messages.ja.json | 2 ++ virtual-desktop/src/assets/i18n/messages.ja.xlf | 2 +- virtual-desktop/src/assets/i18n/messages.ru.xlf | 2 +- virtual-desktop/src/assets/i18n/messages.xlf | 2 +- virtual-desktop/src/assets/i18n/messages.zh.xlf | 2 +- 9 files changed, 19 insertions(+), 9 deletions(-) diff --git a/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar-menu/launchbar-menu.component.html b/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar-menu/launchbar-menu.component.html index 87cb6e42f..4c98a4d95 100644 --- a/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar-menu/launchbar-menu.component.html +++ b/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar-menu/launchbar-menu.component.html @@ -16,18 +16,18 @@
- Refresh applications + {{translation.translate("Refresh applications")}}
-
+

{{item.label}}

diff --git a/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar.module.ts b/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar.module.ts index 57dbf5132..14828c338 100644 --- a/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar.module.ts +++ b/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar.module.ts @@ -22,6 +22,7 @@ import { LaunchbarWidgetComponent } from './launchbar-widget/launchbar-widget.co import { LaunchbarInstanceViewComponent } from './launchbar-instance-view/launchbar-instance-view.component'; import { MatSnackBarModule } from '@angular/material'; import { SnackbarComponent } from './shared/snackbar/snackbar.component' +import { SortArray } from './shared/sort-array' import {MAT_SNACK_BAR_DATA} from '@angular/material'; @@ -39,6 +40,7 @@ import {MAT_SNACK_BAR_DATA} from '@angular/material'; LaunchbarWidgetComponent, LaunchbarInstanceViewComponent, SnackbarComponent, + SortArray ], entryComponents: [SnackbarComponent], exports: [ diff --git a/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar/launchbar.component.ts b/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar/launchbar.component.ts index c28aa8ebe..ef2882975 100644 --- a/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar/launchbar.component.ts +++ b/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar/launchbar.component.ts @@ -27,7 +27,7 @@ import { generateInstanceActions } from '../shared/context-utils'; styleUrls: ['./launchbar.component.css', '../shared/shared.css'], providers: [PluginsDataService] }) -export class LaunchbarComponent { +export class LaunchbarComponent implements MVDHosting.LogoutActionInterface { allItems: LaunchbarItem[]; runItems: LaunchbarItem[]; isActive: boolean; @@ -54,6 +54,7 @@ export class LaunchbarComponent { // Workaround for AoT problem with namespaces (see angular/angular#15613) this.applicationManager = this.injector.get(MVDHosting.Tokens.ApplicationManagerToken); this.authenticationManager = this.injector.get(MVDHosting.Tokens.AuthenticationManagerToken); + this.authenticationManager.registerPreLogoutAction(this); this.pluginManager = this.injector.get(MVDHosting.Tokens.PluginManagerToken); this.allItems = []; this.runItems = []; @@ -78,6 +79,11 @@ export class LaunchbarComponent { this.pluginManager.loadApplicationPluginDefinitions(true); } + onLogout(): boolean { + this.allItems = []; + return true; + } + ngDoCheck(): void { if (this.authenticationManager.getUsername() != null) { this.loggedIn = true; diff --git a/virtual-desktop/src/assets/i18n/messages.fr.xlf b/virtual-desktop/src/assets/i18n/messages.fr.xlf index f0486f903..26fe47edd 100644 --- a/virtual-desktop/src/assets/i18n/messages.fr.xlf +++ b/virtual-desktop/src/assets/i18n/messages.fr.xlf @@ -53,7 +53,7 @@ Title of Sign out button signout button - src/app/window-manager/mvd-window-manager/launchbar/launchbar-widget/launchbar-widget.component.ts16 + src/app/window-manager/mvd-window-manager/launchbar/launchbar-widget/launchbar-widget.component.ts14 diff --git a/virtual-desktop/src/assets/i18n/messages.ja.json b/virtual-desktop/src/assets/i18n/messages.ja.json index 2dc7638ae..720974e37 100644 --- a/virtual-desktop/src/assets/i18n/messages.ja.json +++ b/virtual-desktop/src/assets/i18n/messages.ja.json @@ -21,10 +21,12 @@ "Open in New Browser Tab": "新しいブラウザー・タブで開く", "PinToTaskbar": "アプリケーションをピン留めする", "Properties":"プロパティー", + "Refresh applications": "アプリケーションを再ロード", "Restart Later": "後で再起動", "Restart Now": "今すぐ再起動", "Retry": "再試行", "Russian": "ロシア語", + "Search Applications": "検索", "Select": "選択", "Session could not be renewed. Logout will occur unless renewed. Click here to retry.": "セッションを更新できませんでした。更新しないとログアウトされます。再試行するにはここをクリックしてください。", "Session Expired": "セッションの期限が切れました。", diff --git a/virtual-desktop/src/assets/i18n/messages.ja.xlf b/virtual-desktop/src/assets/i18n/messages.ja.xlf index 65e4fac2b..ce9faccc4 100644 --- a/virtual-desktop/src/assets/i18n/messages.ja.xlf +++ b/virtual-desktop/src/assets/i18n/messages.ja.xlf @@ -53,7 +53,7 @@ Title of Sign out button signout button - src/app/window-manager/mvd-window-manager/launchbar/launchbar-widget/launchbar-widget.component.ts16 + src/app/window-manager/mvd-window-manager/launchbar/launchbar-widget/launchbar-widget.component.ts14 diff --git a/virtual-desktop/src/assets/i18n/messages.ru.xlf b/virtual-desktop/src/assets/i18n/messages.ru.xlf index 6595e1470..526c1d974 100644 --- a/virtual-desktop/src/assets/i18n/messages.ru.xlf +++ b/virtual-desktop/src/assets/i18n/messages.ru.xlf @@ -50,7 +50,7 @@ Title of Sign out button signout button - src/app/window-manager/mvd-window-manager/launchbar/launchbar-widget/launchbar-widget.component.ts16 + src/app/window-manager/mvd-window-manager/launchbar/launchbar-widget/launchbar-widget.component.ts14 diff --git a/virtual-desktop/src/assets/i18n/messages.xlf b/virtual-desktop/src/assets/i18n/messages.xlf index 9aba8c95d..f55d7ef1b 100644 --- a/virtual-desktop/src/assets/i18n/messages.xlf +++ b/virtual-desktop/src/assets/i18n/messages.xlf @@ -54,7 +54,7 @@ Log out src/app/window-manager/mvd-window-manager/launchbar/launchbar-widget/launchbar-widget.component.ts - 16 + 14 Title of Sign out button signout button diff --git a/virtual-desktop/src/assets/i18n/messages.zh.xlf b/virtual-desktop/src/assets/i18n/messages.zh.xlf index 8a7969cf4..182bf4644 100644 --- a/virtual-desktop/src/assets/i18n/messages.zh.xlf +++ b/virtual-desktop/src/assets/i18n/messages.zh.xlf @@ -54,7 +54,7 @@ Title of Sign out button signout button - src/app/window-manager/mvd-window-manager/launchbar/launchbar-widget/launchbar-widget.component.ts16 + src/app/window-manager/mvd-window-manager/launchbar/launchbar-widget/launchbar-widget.component.ts14