diff --git a/package.json b/package.json
index a6c48b3..92624d0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "rs-bundler",
- "version": "0.11.0",
+ "version": "0.11.1",
"description": "RageStudio Bundler Utility GUI",
"main": "./out/main/index.js",
"author": "RageStudio",
diff --git a/src/main/index.js b/src/main/index.js
index a7800e1..fb97f27 100644
--- a/src/main/index.js
+++ b/src/main/index.js
@@ -264,18 +264,21 @@ class ElectronApp {
if (!isDev) {
autoUpdater.on("update-available", (ev, info) => {
console.log(info)
+ sendToRender("app:checking_update_downloading", info)
})
autoUpdater.on("error", (ev, err) => {
console.error(err)
+ sendToRender("app:checking_update_error")
})
autoUpdater.on("update-downloaded", (ev, info) => {
console.log(info)
-
sendToRender("app:update_available", info)
})
+ sendToRender("app:checking_update")
+
await autoUpdater.checkForUpdates()
}
}
diff --git a/src/renderer/src/App.jsx b/src/renderer/src/App.jsx
index ac5cce6..0d77dab 100644
--- a/src/renderer/src/App.jsx
+++ b/src/renderer/src/App.jsx
@@ -52,7 +52,9 @@ class App extends React.Component {
loading: true,
pkg: null,
initializing: false,
+
updateAvailable: false,
+ updateText: null,
authorizedServices: {
drive: false,
@@ -110,7 +112,22 @@ class App extends React.Component {
})
message.success("Google Drive API unauthorized")
- }
+ },
+ "app:checking_update_downloading": (event, data) => {
+ this.setState({
+ updateText: "Downloading update..."
+ })
+ },
+ "app:checking_update": (event, data) => {
+ this.setState({
+ updateText: "Checking for updates..."
+ })
+ },
+ "app:checking_update_error": (event, data) => {
+ this.setState({
+ updateText: null
+ })
+ },
}
onUpdateAvailable = () => {
diff --git a/src/renderer/src/layout/components/Header/index.jsx b/src/renderer/src/layout/components/Header/index.jsx
index fb5cf50..b680261 100644
--- a/src/renderer/src/layout/components/Header/index.jsx
+++ b/src/renderer/src/layout/components/Header/index.jsx
@@ -24,6 +24,16 @@ const Header = (props) => {
/>
}
+ {
+ ctx.updateText && }
+ disabled
+ >
+ {ctx.updateText}
+
+ }
+
{
ctx.updateAvailable &&