Skip to content

Commit

Permalink
v0.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Cattn committed Sep 20, 2024
1 parent 878cc06 commit 48da39d
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 10 deletions.
23 changes: 21 additions & 2 deletions src/internal/Status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,32 @@ const Status: Plugin = {
Version:{" "}
<span className="text-orange-500 font-semibold">{bunker.version} (dev)</span>
</p>
<p>
<button
onClick={() => setChangelogOpen(true)}
className="text-green-500 underline font-semibold"
>
Changelog
</button>
</p>

<Dialog open={changelogOpen} onOpenChange={setChangelogOpen}>
<DialogContent>
<DialogHeader>
<DialogTitle>Changelog</DialogTitle>
<DialogTitle>v0.2.4</DialogTitle>
<DialogDescription>
Bunker got a brand new update. You're going to love it.
What's new?
<br />
- Added changelog
<br />
- Added settings
<br />
- Added the ability to store plugins internally (unblockable)
<br />
- Added fullscreen to GBA + Viewer
<br />
- Added SDK! This is still a WIP, but soon you will see many more features which take advantage of it behind the scenes!
<br />
</DialogDescription>
</DialogHeader>
</DialogContent>
Expand Down
45 changes: 38 additions & 7 deletions src/internal/Updater.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,44 @@ const Updater: Plugin = {
},
})
} else if (latestVersion !== undefined) {
setUpdateText(`Version ${latestVersion} is now available`)
toast("New update available [" + latestVersion + "]", {
action: {
label: "Install Now",
onClick: () => updateBunker(),
},
})
if (installedVersion) {
if (semver.gt(latestVersion, installedVersion)) {
if (semver.diff(latestVersion, installedVersion) == "major") {
toast("New update available [" + latestVersion + "]", {
action: {
label: "Install Now",
onClick: () => updateBunker(),
},
})
setUpdateText(`Version ${latestVersion} is now available`)
return;
} else if (semver.diff(latestVersion, installedVersion) == "minor") {
toast("New update available [" + latestVersion + "]", {
action: {
label: "Install Now",
onClick: () => updateBunker(),
},
})
setUpdateText(`Version ${latestVersion} is now available`)
return;
} else {
toast("New update available [" + latestVersion + "]", {
action: {
label: "Install Now",
onClick: () => updateBunker(),
},
})
setUpdateText(`Version ${latestVersion} is now available`)
return;
}
} else if (semver.eq(installedVersion, latestVersion)) {
toast("No update available")
return;
} else {
toast("No update available")
return;
}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/bunker.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SDK } from "./sdk"
let version = "v0.2.3"
let version = "v0.2.4"
let pluginLocation = "internal"
let Settings = new SDK("bunker.settings")

Expand Down

0 comments on commit 48da39d

Please sign in to comment.