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:
parent
17e0451e66
commit
384d39cd6c
@ -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),
|
||||
|
||||
|
||||
@ -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),
|
||||
|
||||
@ -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),
|
||||
|
||||
@ -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),
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -47,7 +47,7 @@ const toItemInjectablesFor = (extension: LensMainExtension, installationCounter:
|
||||
|
||||
separator: registration.type === "separator",
|
||||
|
||||
label: registration.label,
|
||||
label: computed(() => registration.label),
|
||||
tooltip: registration.toolTip,
|
||||
|
||||
click: () => {
|
||||
|
||||
@ -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,
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user