diff --git a/packages/frontend/src/components/MkFileCaptionEditWindow.vue b/packages/frontend/src/components/MkFileCaptionEditWindow.vue
index 39551e6b3c..8754c72b7b 100644
--- a/packages/frontend/src/components/MkFileCaptionEditWindow.vue
+++ b/packages/frontend/src/components/MkFileCaptionEditWindow.vue
@@ -17,7 +17,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.describeFile }}
-
+
{{ i18n.ts.caption }}
@@ -46,6 +46,15 @@ const dialog = shallowRef
>();
const caption = ref(props.default);
+function onKeydown(ev: KeyboardEvent) {
+ if (ev.key === 'Enter' && (ev.ctrlKey || ev.metaKey)) ok();
+
+ if (ev.key === 'Escape') {
+ emit('closed');
+ dialog.value?.close();
+ }
+}
+
async function ok() {
emit('done', caption.value);
dialog.value?.close();
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: '',
+ };
+ },
+ args: {
+ flash: {
+ ...flash(),
+ visibility: 'public',
+ },
+ },
+ parameters: {
+ layout: 'fullscreen',
+ },
+ decorators: [
+ () => ({
+ template: '',
+ }),
+ ],
+} satisfies StoryObj;
+export const Private = {
+ ...Public,
+ args: {
+ flash: {
+ ...flash(),
+ visibility: 'private',
+ },
+ },
+} satisfies StoryObj;
diff --git a/packages/frontend/src/components/MkFlashPreview.vue b/packages/frontend/src/components/MkFlashPreview.vue
index 6783804cc5..8a2a438624 100644
--- a/packages/frontend/src/components/MkFlashPreview.vue
+++ b/packages/frontend/src/components/MkFlashPreview.vue
@@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-->
-
+
{{ flash.title }}
@@ -22,11 +22,11 @@ SPDX-License-Identifier: AGPL-3.0-only
@@ -91,6 +91,12 @@ const props = defineProps<{
}
}
+ &:global(.gray) {
+ --c: var(--bg);
+ background-image: linear-gradient(45deg, var(--c) 16.67%, transparent 16.67%, transparent 50%, var(--c) 50%, var(--c) 66.67%, transparent 66.67%, transparent 100%);
+ background-size: 16px 16px;
+ }
+
@media (max-width: 700px) {
}
diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue
index b33a0ba694..e2f0a4e492 100644
--- a/packages/frontend/src/components/MkNote.vue
+++ b/packages/frontend/src/components/MkNote.vue
@@ -234,6 +234,7 @@ import { host } from '@/config.js';
import { isEnabledUrlPreview } from '@/instance.js';
import { type Keymap } from '@/scripts/hotkey.js';
import { focusPrev, focusNext } from '@/scripts/focus.js';
+import { getAppearNote } from '@/scripts/get-appear-note.js';
const props = withDefaults(defineProps<{
note: Misskey.entities.Note;
@@ -285,14 +286,7 @@ if (noteViewInterruptors.length > 0) {
});
}
-const isRenote = (
- note.value.renote != null &&
- note.value.reply == null &&
- note.value.text == null &&
- note.value.cw == null &&
- note.value.fileIds && note.value.fileIds.length === 0 &&
- note.value.poll == null
-);
+const isRenote = Misskey.note.isPureRenote(note.value);
const rootEl = shallowRef();
const menuButton = shallowRef();
@@ -303,7 +297,7 @@ const reactButton = shallowRef();
const quoteButton = shallowRef();
const clipButton = shallowRef();
const likeButton = shallowRef();
-const appearNote = computed(() => isRenote ? note.value.renote as Misskey.entities.Note : note.value);
+const appearNote = computed(() => getAppearNote(note.value));
const galleryEl = shallowRef>();
const isMyRenote = $i && ($i.id === note.value.userId);
const showContent = ref(defaultStore.state.uncollapseCW);
diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue
index 33fc6e06d6..64559ef265 100644
--- a/packages/frontend/src/components/MkNoteDetailed.vue
+++ b/packages/frontend/src/components/MkNoteDetailed.vue
@@ -266,6 +266,7 @@ import MkReactionIcon from '@/components/MkReactionIcon.vue';
import MkButton from '@/components/MkButton.vue';
import { boostMenuItems, type Visibility } from '@/scripts/boost-quote.js';
import { isEnabledUrlPreview } from '@/instance.js';
+import { getAppearNote } from '@/scripts/get-appear-note.js';
import { type Keymap } from '@/scripts/hotkey.js';
const props = withDefaults(defineProps<{
@@ -299,14 +300,7 @@ if (noteViewInterruptors.length > 0) {
});
}
-const isRenote = (
- note.value.renote != null &&
- note.value.reply == null &&
- note.value.text == null &&
- note.value.cw == null &&
- note.value.fileIds && note.value.fileIds.length === 0 &&
- note.value.poll == null
-);
+const isRenote = Misskey.note.isPureRenote(note.value);
const rootEl = shallowRef();
const menuButton = shallowRef();
@@ -317,7 +311,7 @@ const reactButton = shallowRef();
const quoteButton = shallowRef();
const clipButton = shallowRef();
const likeButton = shallowRef();
-const appearNote = computed(() => isRenote ? note.value.renote as Misskey.entities.Note : note.value);
+const appearNote = computed(() => getAppearNote(note.value));
const galleryEl = shallowRef>();
const isMyRenote = $i && ($i.id === note.value.userId);
const showContent = ref(defaultStore.state.uncollapseCW);
diff --git a/packages/frontend/src/components/MkPreview.vue b/packages/frontend/src/components/MkPreview.vue
index d950d66c6e..649dee2fdb 100644
--- a/packages/frontend/src/components/MkPreview.vue
+++ b/packages/frontend/src/components/MkPreview.vue
@@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
Text
diff --git a/packages/frontend/src/components/MkRolePreview.vue b/packages/frontend/src/components/MkRolePreview.vue
index c1b922198f..ce17ae08e0 100644
--- a/packages/frontend/src/components/MkRolePreview.vue
+++ b/packages/frontend/src/components/MkRolePreview.vue
@@ -4,25 +4,32 @@ SPDX-License-Identifier: AGPL-3.0-only
-->
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ role.name }}
+
+ {{ role.usersCount }} users
+ ? users
-
-
-
-
-
-
-
{{ role.name }}
-
- {{ role.usersCount }} users
- ({{ i18n.ts._role.conditional }})
-
+
+
{{ role.description }}
- {{ role.description }}
@@ -42,34 +49,44 @@ const props = withDefaults(defineProps<{