feat(app): make app update notification not close when opening the changelog (#5978)

Make app update notification not close when opening the changelog
This commit is contained in:
Arthur
2026-05-03 19:27:48 +02:00
committed by GitHub
parent f857d19aee
commit eb9c3477ff
3 changed files with 6 additions and 1 deletions

View File

@@ -920,6 +920,7 @@ async function checkUpdates() {
{
label: formatMessage(updatePopupMessages.changelog),
action: () => openUrl('https://modrinth.com/news/changelog?filter=app'),
keepOpen: true,
},
],
})
@@ -1002,6 +1003,7 @@ async function downloadUpdate(versionToDownload) {
{
label: formatMessage(updatePopupMessages.changelog),
action: () => openUrl('https://modrinth.com/news/changelog?filter=app'),
keepOpen: true,
},
],
})

View File

@@ -130,7 +130,9 @@ const dismiss = (id: string | number) => popupNotificationManager.removeNotifica
function handleButtonClick(id: string | number, btn: PopupNotificationButton) {
btn.action()
popupNotificationManager.removeNotification(id)
if (!btn.keepOpen) {
popupNotificationManager.removeNotification(id)
}
}
function progressColorForType(type: PopupNotification['type']) {

View File

@@ -4,6 +4,7 @@ export interface PopupNotificationButton {
label: string
action: () => void
color?: 'brand' | 'red' | 'orange' | 'green' | 'blue' | 'standard'
keepOpen?: boolean
}
export interface PopupNotificationProgressItem {