1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Make label of tray item reactive

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2022-05-11 08:08:24 +03:00
parent 17e0451e66
commit 384d39cd6c
No known key found for this signature in database
GPG Key ID: 8C6CFB2FFFE8F68A
8 changed files with 8 additions and 8 deletions

View File

@ -21,7 +21,7 @@ const aboutAppTrayItemInjectable = getInjectable({
id: "about-app",
parentId: null,
orderNumber: 140,
label: `About ${productName}`,
label: computed(() => `About ${productName}`),
enabled: computed(() => true),
visible: computed(() => true),

View File

@ -18,7 +18,7 @@ const openAppTrayItemInjectable = getInjectable({
return {
id: "open-app",
parentId: null,
label: `Open ${productName}`,
label: computed(() => `Open ${productName}`),
orderNumber: 10,
enabled: computed(() => true),
visible: computed(() => true),

View File

@ -16,7 +16,7 @@ const openPreferencesTrayItemInjectable = getInjectable({
return {
id: "open-preferences",
parentId: null,
label: "Preferences",
label: computed(() => "Preferences"),
orderNumber: 20,
enabled: computed(() => true),
visible: computed(() => true),

View File

@ -10,7 +10,7 @@ const quitAppSeparatorTrayItemInjectable = getInjectable({
id: "quit-app-separator-tray-item",
instantiate: () => ({
id: "quit-app-sepator",
id: "quit-app-separator",
parentId: null,
orderNumber: 149,
enabled: computed(() => true),

View File

@ -17,7 +17,7 @@ const quitAppTrayItemInjectable = getInjectable({
id: "quit-app",
parentId: null,
orderNumber: 150,
label: "Quit App",
label: computed(() => "Quit App"),
enabled: computed(() => true),
visible: computed(() => true),
separated: true,

View File

@ -13,7 +13,7 @@ export interface TrayMenuItem {
enabled: IComputedValue<boolean>;
visible: IComputedValue<boolean>;
label?: string;
label?: IComputedValue<string>;
click?: () => Promise<void> | void;
tooltip?: string;
separator?: boolean;

View File

@ -47,7 +47,7 @@ const toItemInjectablesFor = (extension: LensMainExtension, installationCounter:
separator: registration.type === "separator",
label: registration.label,
label: computed(() => registration.label),
tooltip: registration.toolTip,
click: () => {

View File

@ -72,7 +72,7 @@ const toTrayMenuOptions = (trayMenuItems: TrayMenuItem[]) => {
return {
id: trayMenuItem.id,
label: trayMenuItem.label,
label: trayMenuItem.label.get(),
enabled: trayMenuItem.enabled.get(),
toolTip: trayMenuItem.tooltip,