mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add displaying @k8slens/* versions in about when not latest (#7257)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
6df01ba468
commit
6ca4af8284
6 files changed
+43
-13
No files matched your search
@@ -5,7 +5,11 @@
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import electronDialogInjectable from "./electron-dialog.injectable";
|
||||
|
||||
export type ShowMessagePopup = (title: string, message: string, detail: string) => void;
|
||||
export interface ShowMessagePopupOptions {
|
||||
textWidth?: number;
|
||||
}
|
||||
|
||||
export type ShowMessagePopup = (title: string, message: string, detail: string, options?: ShowMessagePopupOptions) => void;
|
||||
|
||||
const showMessagePopupInjectable = getInjectable({
|
||||
id: "show-message-popup",
|
||||
@@ -13,13 +17,14 @@ const showMessagePopupInjectable = getInjectable({
|
||||
instantiate: (di): ShowMessagePopup => {
|
||||
const dialog = di.inject(electronDialogInjectable);
|
||||
|
||||
return async (title, message, detail) => {
|
||||
return async (title, message, detail, options = {}) => {
|
||||
await dialog.showMessageBox({
|
||||
title,
|
||||
message,
|
||||
detail,
|
||||
type: "info",
|
||||
buttons: ["Close"],
|
||||
...options,
|
||||
});
|
||||
};
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user