mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-05 23:15:08 +08:00
using new banners
This commit is contained in:
parent
429f5de96e
commit
6c93ed9c5a
2 changed files with 12 additions and 10 deletions
|
|
@ -23,15 +23,11 @@ export async function show(version) {
|
|||
}
|
||||
if (memory === version) return;
|
||||
caches.delete("sw-cache");
|
||||
Notifications.add(
|
||||
`Version ${version} has been released. Click to view the changelog.`,
|
||||
Notifications.addBanner(
|
||||
`Version ${version} has been released. Click the version number in the bottom right to view the changelog.`,
|
||||
1,
|
||||
5,
|
||||
"Announcement",
|
||||
"code-branch",
|
||||
() => {
|
||||
VersionPopup.show();
|
||||
}
|
||||
false
|
||||
);
|
||||
setMemory(version);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,8 +29,14 @@ export async function show() {
|
|||
let localmemory = getMemory();
|
||||
latest.forEach((psa) => {
|
||||
if (localmemory.includes(psa._id)) return;
|
||||
Notifications.add(psa.message, -1, 0, "Announcement", "bullhorn", () => {
|
||||
setMemory(psa._id);
|
||||
});
|
||||
Notifications.addBanner(
|
||||
psa.message,
|
||||
psa.level,
|
||||
"bullhorn",
|
||||
psa.sticky,
|
||||
() => {
|
||||
setMemory(psa._id);
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue