mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
Fix new window from menu bar (#91)
Fixes the New Window menu item so that it shows the new window after it loads and captures any errors that occur. Also adds a keyboard shortcut for new window and uses the native shortcut for close window.
This commit is contained in:
+11
-1
@@ -89,4 +89,14 @@ function makeIconClass(icon: string, fw: boolean): string {
|
||||
return null;
|
||||
}
|
||||
|
||||
export { base64ToArray, base64ToString, isBlank, jsonDeepEqual, makeIconClass, stringToBase64 };
|
||||
/**
|
||||
* A wrapper function for running a promise and catching any errors
|
||||
* @param f The promise to run
|
||||
*/
|
||||
function fireAndForget(f: () => Promise<any>) {
|
||||
f().catch((e) => {
|
||||
console.log("fireAndForget error", e);
|
||||
});
|
||||
}
|
||||
|
||||
export { base64ToArray, base64ToString, fireAndForget, isBlank, jsonDeepEqual, makeIconClass, stringToBase64 };
|
||||
|
||||
Reference in New Issue
Block a user