summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkFlashPreview.stories.impl.ts
diff options
context:
space:
mode:
authorzyoshoka <107108195+zyoshoka@users.noreply.github.com>2024-08-10 09:34:49 +0900
committerGitHub <noreply@github.com>2024-08-10 09:34:49 +0900
commit01a815f8a716f65dbd977d533d638eb69561136a (patch)
treed8e7f2e3eef845e0f366131676e4e87d299a94a0 /packages/frontend/src/components/MkFlashPreview.stories.impl.ts
parentfix: readAllNotifications message not working (#14374) (diff)
downloadmisskey-01a815f8a716f65dbd977d533d638eb69561136a.tar.gz
misskey-01a815f8a716f65dbd977d533d638eb69561136a.tar.bz2
misskey-01a815f8a716f65dbd977d533d638eb69561136a.zip
fix(general): some fixes and improvements of Play visibility (#14384)
* fix(backend): missing `visibility` param in packing flash * fix(frontend): use `visibility` value got from API * enhance(frontend): change preview appearance of private Play * Update CHANGELOG.md
Diffstat (limited to 'packages/frontend/src/components/MkFlashPreview.stories.impl.ts')
-rw-r--r--packages/frontend/src/components/MkFlashPreview.stories.impl.ts53
1 files changed, 53 insertions, 0 deletions
diff --git a/packages/frontend/src/components/MkFlashPreview.stories.impl.ts b/packages/frontend/src/components/MkFlashPreview.stories.impl.ts
new file mode 100644
index 0000000000..fa5288b73d
--- /dev/null
+++ b/packages/frontend/src/components/MkFlashPreview.stories.impl.ts
@@ -0,0 +1,53 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and misskey-project
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+import { StoryObj } from '@storybook/vue3';
+import MkFlashPreview from './MkFlashPreview.vue';
+import { flash } from './../../.storybook/fakes.js';
+export const Public = {
+ render(args) {
+ return {
+ components: {
+ MkFlashPreview,
+ },
+ setup() {
+ return {
+ args,
+ };
+ },
+ computed: {
+ props() {
+ return {
+ ...this.args,
+ };
+ },
+ },
+ template: '<MkFlashPreview v-bind="props" />',
+ };
+ },
+ args: {
+ flash: {
+ ...flash(),
+ visibility: 'public',
+ },
+ },
+ parameters: {
+ layout: 'fullscreen',
+ },
+ decorators: [
+ () => ({
+ template: '<div style="display: flex; align-items: center; justify-content: center; height: 100vh"><div style="max-width: 700px; width: 100%; margin: 3rem"><story/></div></div>',
+ }),
+ ],
+} satisfies StoryObj<typeof MkFlashPreview>;
+export const Private = {
+ ...Public,
+ args: {
+ flash: {
+ ...flash(),
+ visibility: 'private',
+ },
+ },
+} satisfies StoryObj<typeof MkFlashPreview>;