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
-
+
{{ i18n.ts.sensitive }}
{{ i18n.ts.clickToShow }}
-
+
@@ -28,8 +28,9 @@ import * as Misskey from 'misskey-js';
import { defaultStore } from '@/store.js';
import { getProxiedImageUrl, getStaticImageUrl } from '@/scripts/media-proxy.js';
-const props = defineProps<{
+defineProps<{
note: Misskey.entities.Note;
+ square?: boolean;
}>();
const showingFiles = ref([]);
@@ -42,10 +43,20 @@ function thumbnail(image: Misskey.entities.DriveFile): string {
diff --git a/packages/frontend/src/pages/user/home.vue b/packages/frontend/src/pages/user/home.vue
index 2794db2821..a6a49f0ab9 100644
--- a/packages/frontend/src/pages/user/home.vue
+++ b/packages/frontend/src/pages/user/home.vue
@@ -136,7 +136,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.userPagePinTip }}
-
+
@@ -150,7 +150,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
@@ -212,6 +212,10 @@ const props = withDefaults(defineProps<{
disableNotes: false,
});
+const emit = defineEmits<{
+ (ev: 'unfoldFiles'): void;
+}>();
+
const router = useRouter();
const user = ref(props.user);
diff --git a/packages/frontend/src/pages/user/index.files.vue b/packages/frontend/src/pages/user/index.files.vue
index ce4d113cad..91c781ea55 100644
--- a/packages/frontend/src/pages/user/index.files.vue
+++ b/packages/frontend/src/pages/user/index.files.vue
@@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-->
-
+
{{ i18n.ts.files }}
@@ -35,7 +35,7 @@ SPDX-License-Identifier: AGPL-3.0-only