Add displaying @k8slens/* versions in about when not latest (#7257)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2023-03-02 08:03:42 -05:00
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,
});
};
},