* feat: card alignment + fix modals * feat: change admon title in restore alert modal * fix: lint * feat: backups queue api into api-client * feat: impl backup queue api endpoints into frontend * feat: ack fix * feat: bulk actions * feat: bulk delete impl * fix: lint * fix: align error states * fix: transition group * feat: ready for qa * fix: lint * feat: qa * feat: stacked admonitions component * fix: issues with stacking * feat: hook up admonition stacking + fix app csp for staging kyros nodes * fix: logs.vue * qa: close stack on admonitions click * fix: all problems with stacked admonitions * qa: admonition cleanup and copy overhaul draft * fix: qa issues padding * fix: padding bug * feat: qa * fix: intercom in app csp bug * fix: positioning intercom * feat: loading overlay on top of console + admon consistency changes * feat: scroll indicator fade in backup delete modal + admon timestamp fix * feat: move action bar behind modal * fix: lint + i18n * fix: server ping spam on filter (cache but clear on unmount) * fix: 1 admon fade in flicker issue * chore: temp staging undo * qa: changes * fix: lint * chore: revert staging to use staging * fix: scoping
119 lines
2.6 KiB
TypeScript
119 lines
2.6 KiB
TypeScript
import type { Meta, StoryObj } from '@storybook/vue3-vite'
|
|
|
|
import InstallingBanner from '../../components/servers/InstallingBanner.vue'
|
|
|
|
const meta = {
|
|
title: 'Servers/InstallingBanner',
|
|
component: InstallingBanner,
|
|
} satisfies Meta<typeof InstallingBanner>
|
|
|
|
export default meta
|
|
type Story = StoryObj<typeof meta>
|
|
|
|
export const Default: Story = {
|
|
name: 'Default (no progress)',
|
|
}
|
|
|
|
export const WithProgress: Story = {
|
|
args: {
|
|
progress: {
|
|
phase: 'InstallingLoader',
|
|
percent: 45,
|
|
},
|
|
},
|
|
}
|
|
|
|
export const IndeterminateLoaderInstall: Story = {
|
|
args: {
|
|
progress: {
|
|
phase: 'InstallingLoader',
|
|
percent: 0,
|
|
},
|
|
},
|
|
}
|
|
|
|
export const InstallingModpack: Story = {
|
|
args: {
|
|
progress: {
|
|
phase: 'InstallingPack',
|
|
percent: 72,
|
|
},
|
|
},
|
|
}
|
|
|
|
export const InstallingAddons: Story = {
|
|
args: {
|
|
progress: {
|
|
phase: 'Addons',
|
|
percent: 90,
|
|
},
|
|
},
|
|
}
|
|
|
|
export const ErrorInvalidVersion: Story = {
|
|
name: 'Error: Invalid Version',
|
|
args: {
|
|
contentError: {
|
|
step: 'modloader',
|
|
description: 'the specified version may be incorrect',
|
|
},
|
|
},
|
|
}
|
|
|
|
export const ErrorUnsupportedVersion: Story = {
|
|
name: 'Error: Unsupported Version',
|
|
args: {
|
|
contentError: {
|
|
step: 'modloader',
|
|
description: 'this version is not yet supported',
|
|
},
|
|
},
|
|
}
|
|
|
|
export const ErrorInternal: Story = {
|
|
name: 'Error: Internal',
|
|
args: {
|
|
contentError: {
|
|
step: 'modloader',
|
|
description: 'internal error',
|
|
},
|
|
},
|
|
}
|
|
|
|
export const ErrorModpackInstall: Story = {
|
|
name: 'Error: Modpack Install Failed',
|
|
args: {
|
|
contentError: {
|
|
step: 'modpack',
|
|
description: 'Failed to install modpack',
|
|
},
|
|
},
|
|
}
|
|
|
|
export const ErrorModpackNoFile: Story = {
|
|
name: 'Error: Modpack No Primary File',
|
|
args: {
|
|
contentError: {
|
|
step: 'modpack',
|
|
description: 'Modpack version has no primary file',
|
|
},
|
|
},
|
|
}
|
|
|
|
export const AllStates: Story = {
|
|
render: () => ({
|
|
components: { InstallingBanner },
|
|
template: /*html*/ `
|
|
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
|
<InstallingBanner />
|
|
<InstallingBanner :progress="{ phase: 'InstallingLoader', percent: 0 }" />
|
|
<InstallingBanner :progress="{ phase: 'InstallingLoader', percent: 45 }" />
|
|
<InstallingBanner :content-error="{ step: 'modloader', description: 'the specified version may be incorrect' }" />
|
|
<InstallingBanner :content-error="{ step: 'modloader', description: 'this version is not yet supported' }" />
|
|
<InstallingBanner :content-error="{ step: 'modloader', description: 'internal error' }" />
|
|
<InstallingBanner :content-error="{ step: 'modpack', description: 'Failed to install modpack' }" />
|
|
</div>
|
|
`,
|
|
}),
|
|
}
|