Skip to content

Commit

Permalink
Highlight update text
Browse files Browse the repository at this point in the history
  • Loading branch information
Cattn committed Sep 16, 2024
1 parent 91af8cd commit 82fdbe1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/internal/Updater.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const Updater: Plugin = {
tile() {
const [latestVersion, setLatestVersion] = useState<string>();
const [installedVersion, setInstalledVersion] = useState<string>();
const [updateText, setUpdateText] = useState<string>();

useEffect(() => {
setInstalledVersion(bunker.version);
Expand Down Expand Up @@ -49,6 +50,7 @@ const Updater: Plugin = {
},
});
} else if (latestVersion !== undefined) {
setUpdateText("New Update Available: " + latestVersion);
toast("New Bunker update available [" + latestVersion + "]", {
action: {
label: "Install Now",
Expand Down Expand Up @@ -110,6 +112,7 @@ const Updater: Plugin = {
<>
<p>Latest Bunker version: {latestVersion}</p>
<p>Installed Bunker version: {bunker.version}</p>
<p style={{ color: "red" }}>{updateText}</p>
</>
);
},
Expand Down

0 comments on commit 82fdbe1

Please sign in to comment.