From ce3679798c5b642dd0e47056f70657e46b382b5e Mon Sep 17 00:00:00 2001
From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com>
Date: Sun, 20 Oct 2024 17:46:33 +0900
Subject: [PATCH] =?UTF-8?q?MkMenu=E3=81=AEitem=E3=82=92=E5=88=87=E3=82=8A?=
=?UTF-8?q?=E5=87=BA=E3=81=97=E3=81=A6=E5=85=B1=E9=80=9A=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../frontend/src/components/MkMenu.item.vue | 420 ++++++++++++++++++
packages/frontend/src/components/MkMenu.vue | 394 +---------------
packages/frontend/src/components/MkModal.vue | 3 +-
.../frontend/src/components/MkPostForm.vue | 14 +-
.../src/components/MkPostFormOtherMenu.vue | 191 ++------
packages/frontend/src/style.scss | 4 +
packages/frontend/src/types/menu.ts | 2 +
7 files changed, 483 insertions(+), 545 deletions(-)
create mode 100644 packages/frontend/src/components/MkMenu.item.vue
diff --git a/packages/frontend/src/components/MkMenu.item.vue b/packages/frontend/src/components/MkMenu.item.vue
new file mode 100644
index 0000000000..0d51cbc2f4
--- /dev/null
+++ b/packages/frontend/src/components/MkMenu.item.vue
@@ -0,0 +1,420 @@
+
+
+
+
+
+ {{ item.text }}
+
+
+
+
+
+
+
+
+ {{ item.text }}
+
+
+
+
+
+
+ {{ item.text }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/frontend/src/components/MkMenu.vue b/packages/frontend/src/components/MkMenu.vue
index 13a65e411f..2db3d0b227 100644
--- a/packages/frontend/src/components/MkMenu.vue
+++ b/packages/frontend/src/components/MkMenu.vue
@@ -8,8 +8,6 @@ SPDX-License-Identifier: AGPL-3.0-only
role="menu"
:class="{
[$style.root]: true,
- [$style.center]: align === 'center',
- [$style.big]: big,
[$style.asDrawer]: asDrawer,
}"
@focusin.passive.stop="() => {}"
@@ -27,144 +25,19 @@ SPDX-License-Identifier: AGPL-3.0-only
@keydown.stop="() => {}"
@contextmenu.self.prevent="() => {}"
>
-
-
-
- {{ item.text }}
-
-
-
-
-
-
-
-
- {{ item.text }}
-
-
-
-
-
-
- {{ item.text }}
-
-
-
-
-
-
-
-
-
-
+
{{ i18n.ts.none }}
@@ -176,9 +49,8 @@ SPDX-License-Identifier: AGPL-3.0-only
diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue
index 29c306ea35..ccf3700608 100644
--- a/packages/frontend/src/components/MkPostForm.vue
+++ b/packages/frontend/src/components/MkPostForm.vue
@@ -534,24 +534,12 @@ function showOtherSettings() {
reactionAcceptance.value = value;
},
reset: () => {
- reset();
+ clear();
},
closed: () => dispose(),
});
}
-function reset() {
- text.value = '';
- cw.value = null;
- useCw.value = false;
- visibility.value = defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state.defaultNoteVisibility;
- localOnly.value = defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly;
- files.value = [];
- poll.value = null;
- quoteId.value = null;
- reactionAcceptance.value = defaultStore.state.reactionAcceptance;
-}
-
function pushVisibleUser(user: Misskey.entities.UserDetailed) {
if (!visibleUsers.value.some(u => u.username === user.username && u.host === user.host)) {
visibleUsers.value.push(user);
diff --git a/packages/frontend/src/components/MkPostFormOtherMenu.vue b/packages/frontend/src/components/MkPostFormOtherMenu.vue
index 7d0406d562..f0389c6a3b 100644
--- a/packages/frontend/src/components/MkPostFormOtherMenu.vue
+++ b/packages/frontend/src/components/MkPostFormOtherMenu.vue
@@ -19,40 +19,12 @@ SPDX-License-Identifier: AGPL-3.0-only
-
-
-
+
@@ -61,12 +33,17 @@ SPDX-License-Identifier: AGPL-3.0-only