import AboutModal from "./AboutModal.vue"; import type { Meta, StoryFn } from "@storybook/vue3"; const releaseNotes = `

v0.303.1

Changelog

Other Changes ☀️

Bug Fixes 🐞

v0.303.0

Changelog

Breaking Changes 🚨

New Features 💫

Bug Fixes 🐞

`; export default { title: "AboutModal", component: AboutModal, argTypes: { installed: { control: "text" }, availableVersion: { control: "text" }, releaseNotes: { control: "text" }, hasUpdater: { control: "boolean" }, uploadMessage: { control: "text" }, uploadProgress: { control: "number" }, }, } as Meta; const Template: StoryFn = (args) => ({ components: { AboutModal }, setup() { return { args }; }, template: '', mounted() { const el = document.getElementById("aboutModal"); if (el) { import("bootstrap/js/dist/modal").then(({ default: Modal }) => { Modal.getOrCreateInstance(el).show(); }); } }, }); export const Stable = Template.bind({}); Stable.args = { installed: "0.303.1", availableVersion: "0.303.1", }; export const StableUpdateAvailable = Template.bind({}); StableUpdateAvailable.args = { installed: "0.303.0", availableVersion: "0.303.1", releaseNotes, }; export const StableUpdateWithUpdater = Template.bind({}); StableUpdateWithUpdater.args = { installed: "0.303.0", availableVersion: "0.303.1", releaseNotes, hasUpdater: true, }; export const Nightly = Template.bind({}); Nightly.args = { installed: "0.304.0-dev.1712345678", commit: "5ce7be4", }; export const DevBuild = Template.bind({}); DevBuild.args = { installed: "0.0.0", };