summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-02-11 13:01:56 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-02-11 13:01:56 +0900
commit3004fe573df7c6eeccc53ea7ca5666bdd2d7e8ff (patch)
treef1ec1b7f062aae486f4b4c34b0074c2f5eb09ac4
parentenhance(client): ロールをより簡単に付与できるように (diff)
downloadsharkey-3004fe573df7c6eeccc53ea7ca5666bdd2d7e8ff.tar.gz
sharkey-3004fe573df7c6eeccc53ea7ca5666bdd2d7e8ff.tar.bz2
sharkey-3004fe573df7c6eeccc53ea7ca5666bdd2d7e8ff.zip
enhance(client): URLが4つ以上添付されている場合折りたたむように
-rw-r--r--packages/frontend/src/components/MkNote.vue5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue
index 2a00a95386..d830e0e47e 100644
--- a/packages/frontend/src/components/MkNote.vue
+++ b/packages/frontend/src/components/MkNote.vue
@@ -186,17 +186,18 @@ const reactButton = shallowRef<HTMLElement>();
let appearNote = $computed(() => isRenote ? note.renote as misskey.entities.Note : note);
const isMyRenote = $i && ($i.id === note.userId);
const showContent = ref(false);
+const urls = appearNote.text ? extractUrlFromMfm(mfm.parse(appearNote.text)) : null;
const isLong = (appearNote.cw == null && appearNote.text != null && (
(appearNote.text.split('\n').length > 9) ||
(appearNote.text.length > 500) ||
- (appearNote.files.length >= 5)
+ (appearNote.files.length >= 5) ||
+ (urls && urls.length >= 4)
));
const collapsed = ref(appearNote.cw == null && isLong);
const isDeleted = ref(false);
const muted = ref(checkWordMute(appearNote, $i, defaultStore.state.mutedWords));
const translation = ref(null);
const translating = ref(false);
-const urls = appearNote.text ? extractUrlFromMfm(mfm.parse(appearNote.text)) : null;
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.user.instance);
const canRenote = computed(() => ['public', 'home'].includes(appearNote.visibility) || appearNote.userId === $i.id);
let renoteCollapsed = $ref(isRenote && (($i && ($i.id === note.userId)) || shownNoteIds.has(appearNote.id)));