From abde4866e82cebb88384123bb973e4ba43aeb9af Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Sat, 14 Dec 2024 19:31:24 +0900 Subject: [PATCH] =?UTF-8?q?enhance:=20=E6=97=A2=E5=AD=98=E3=81=AE=E3=83=95?= =?UTF-8?q?=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=B3=E3=83=B3=E3=83=86=E3=83=8A?= =?UTF-8?q?=E3=81=AE=E3=80=8C=E3=82=82=E3=81=A3=E3=81=A8=E8=A6=8B=E3=82=8B?= =?UTF-8?q?=E3=80=8D=E3=82=92=E3=82=AF=E3=83=AA=E3=83=83=E3=82=AF=E3=81=97?= =?UTF-8?q?=E3=81=9F=E3=82=89=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=BF?= =?UTF-8?q?=E3=83=96=E3=81=AB=E9=A3=9B=E3=81=B9=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend/src/components/MkContainer.vue | 10 +++++++++- packages/frontend/src/components/MkMedias.vue | 17 ++++++++++++++--- packages/frontend/src/pages/user/files.vue | 8 +------- packages/frontend/src/pages/user/home.vue | 8 ++++++-- .../frontend/src/pages/user/index.files.vue | 16 +++++++++++++--- packages/frontend/src/pages/user/index.vue | 4 ++-- 6 files changed, 45 insertions(+), 18 deletions(-) diff --git a/packages/frontend/src/components/MkContainer.vue b/packages/frontend/src/components/MkContainer.vue index f513795c56..6a278250fa 100644 --- a/packages/frontend/src/components/MkContainer.vue +++ b/packages/frontend/src/components/MkContainer.vue @@ -30,7 +30,7 @@ SPDX-License-Identifier: AGPL-3.0-only >
-
@@ -48,6 +48,7 @@ const props = withDefaults(defineProps<{ thin?: boolean; naked?: boolean; foldable?: boolean; + onUnfold?: () => boolean; // return false to prevent unfolding scrollable?: boolean; expanded?: boolean; maxHeight?: number | null; @@ -101,6 +102,13 @@ const omitObserver = new ResizeObserver((entries, observer) => { calcOmit(); }); +function showMore() { + if (props.onUnfold && !props.onUnfold()) return; + + ignoreOmit.value = true; + omitted.value = false; +} + onMounted(() => { watch(showBody, v => { if (!rootEl.value) return; diff --git a/packages/frontend/src/components/MkMedias.vue b/packages/frontend/src/components/MkMedias.vue index db6cf1f01e..dfea44892e 100644 --- a/packages/frontend/src/components/MkMedias.vue +++ b/packages/frontend/src/components/MkMedias.vue @@ -5,13 +5,13 @@ SPDX-License-Identifier: AGPL-3.0-only