feat: add unknown .mrpack install warning modal (#5942)

* Update modpack button copy

* Change outlined button style for standard buttons

* add unknown pack warning modal

* implementation

* Redo download toasts

* prepr

* improve hit area of window controls

* implement "don't show again"

* prepr

* duplicate modal ref declarations

* increase spacing of progress items

* address truman review
This commit is contained in:
Prospector
2026-04-29 09:53:10 -07:00
committed by GitHub
parent a80cc7e47b
commit dfb6814095
24 changed files with 1208 additions and 587 deletions

View File

@@ -107,6 +107,57 @@ export const Default: StoryObj = {
})
}
const showWaitingProgress = () => {
popupManager.addPopupNotification({
title: 'Installing modpack...',
text: 'example-pack-1.0.0.mrpack',
type: 'info',
autoCloseMs: null,
waiting: true,
})
}
const showDeterminateProgress = () => {
popupManager.addPopupNotification({
title: 'Downloading update',
text: 'Downloading files...',
type: 'success',
autoCloseMs: null,
progress: 0.62,
})
}
const showGroupedDownloads = () => {
popupManager.addPopupNotification({
title: 'Downloads',
type: 'download',
autoCloseMs: null,
progressItems: [
{
id: 'java-21',
title: 'Downloading Java 21',
text: '42% Downloading runtime',
progress: 0.42,
waiting: false,
},
{
id: 'pack-nebula',
title: 'Nebula Pack',
text: '8% Resolving files',
progress: 0.08,
waiting: false,
},
{
id: 'assets',
title: 'Assets',
text: 'Preparing...',
progress: 0,
waiting: true,
},
],
})
}
const clearAll = () => {
popupManager.clearAllNotifications()
}
@@ -118,6 +169,9 @@ export const Default: StoryObj = {
showInfo,
showNoButtons,
showPermanent,
showWaitingProgress,
showDeterminateProgress,
showGroupedDownloads,
clearAll,
}
},
@@ -142,6 +196,15 @@ export const Default: StoryObj = {
<ButtonStyled>
<button @click="showPermanent">Permanent</button>
</ButtonStyled>
<ButtonStyled>
<button @click="showWaitingProgress">Waiting Progress</button>
</ButtonStyled>
<ButtonStyled>
<button @click="showDeterminateProgress">Determinate Progress</button>
</ButtonStyled>
<ButtonStyled>
<button @click="showGroupedDownloads">Grouped Downloads</button>
</ButtonStyled>
<ButtonStyled>
<button @click="clearAll">Clear All</button>
</ButtonStyled>