Add Check-For-Updates in menu and some notifications (#4437)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-11-30 10:30:42 -05:00
1 parent 7ce4a87ac8
commit f0274d08a4
5 files changed
+53 -19

No files matched your search

+7 -1
View File
@@ -21,7 +21,7 @@
import React from "react";
import { ipcRenderer, IpcRendererEvent } from "electron";
import { areArgsUpdateAvailableFromMain, UpdateAvailableChannel, onCorrect, UpdateAvailableFromMain, BackchannelArg, ClusterListNamespaceForbiddenChannel, isListNamespaceForbiddenArgs, ListNamespaceForbiddenArgs, HotbarTooManyItems } from "../../common/ipc";
import { areArgsUpdateAvailableFromMain, UpdateAvailableChannel, onCorrect, UpdateAvailableFromMain, BackchannelArg, ClusterListNamespaceForbiddenChannel, isListNamespaceForbiddenArgs, ListNamespaceForbiddenArgs, HotbarTooManyItems, ipcRendererOn, AutoUpdateChecking, AutoUpdateNoUpdateAvailable } from "../../common/ipc";
import { Notifications, notificationsStore } from "../components/notifications";
import { Button } from "../components/button";
import { isMac } from "../../common/vars";
@@ -153,4 +153,10 @@ export function registerIpcListeners() {
listener: HotbarTooManyItemsHandler,
verifier: (args: unknown[]): args is [] => args.length === 0,
});
ipcRendererOn(AutoUpdateChecking, () => {
Notifications.shortInfo("Checking for updates");
});
ipcRendererOn(AutoUpdateNoUpdateAvailable, () => {
Notifications.shortInfo("No update is currently available");
});
}