diff --git a/locales/index.d.ts b/locales/index.d.ts
index b5af5909a3..5af999b16b 100644
--- a/locales/index.d.ts
+++ b/locales/index.d.ts
@@ -5190,6 +5190,14 @@ export interface Locale extends ILocale {
* 名前に禁止されている文字列が含まれています。この名前を使用したい場合は、サーバー管理者にお問い合わせください。
*/
"yourNameContainsProhibitedWordsDescription": string;
+ /**
+ * 文字数
+ */
+ "textCount": string;
+ /**
+ * リセット
+ */
+ "reset": string;
"_abuseUserReport": {
/**
* 転送
diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index c448d4d50a..d4b2d8dcc8 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -1293,6 +1293,8 @@ prohibitedWordsForNameOfUser: "禁止ワード(ユーザーの名前)"
prohibitedWordsForNameOfUserDescription: "このリストに含まれる文字列がユーザーの名前に含まれる場合、ユーザーの名前の変更を拒否します。モデレーター権限を持つユーザーはこの制限の影響を受けません。"
yourNameContainsProhibitedWords: "変更しようとした名前に禁止された文字列が含まれています"
yourNameContainsProhibitedWordsDescription: "名前に禁止されている文字列が含まれています。この名前を使用したい場合は、サーバー管理者にお問い合わせください。"
+textCount: "文字数"
+reset: "リセット"
_abuseUserReport:
forward: "転送"
diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue
index 76a6e4212a..29c306ea35 100644
--- a/packages/frontend/src/components/MkPostForm.vue
+++ b/packages/frontend/src/components/MkPostForm.vue
@@ -20,7 +20,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
-
+
-
-
-
-
-
+
@@ -174,6 +170,7 @@ const textareaEl = shallowRef
(null);
const cwInputEl = shallowRef(null);
const hashtagsInputEl = shallowRef(null);
const visibilityButton = shallowRef();
+const otherSettingsButton = shallowRef();
const posting = ref(false);
const posted = ref(false);
@@ -527,20 +524,32 @@ async function toggleLocalOnly() {
}
}
-async function toggleReactionAcceptance() {
- const select = await os.select({
- title: i18n.ts.reactionAcceptance,
- items: [
- { value: null, text: i18n.ts.all },
- { value: 'likeOnlyForRemote' as const, text: i18n.ts.likeOnlyForRemote },
- { value: 'nonSensitiveOnly' as const, text: i18n.ts.nonSensitiveOnly },
- { value: 'nonSensitiveOnlyForLocalLikeOnlyForRemote' as const, text: i18n.ts.nonSensitiveOnlyForLocalLikeOnlyForRemote },
- { value: 'likeOnly' as const, text: i18n.ts.likeOnly },
- ],
- default: reactionAcceptance.value,
+function showOtherSettings() {
+ const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkPostFormOtherMenu.vue')), {
+ currentReactionAcceptance: reactionAcceptance.value,
+ textLength: textLength.value,
+ src: otherSettingsButton.value,
+ }, {
+ changeReactionAcceptance: (value: Misskey.entities.Note['reactionAcceptance']) => {
+ reactionAcceptance.value = value;
+ },
+ reset: () => {
+ reset();
+ },
+ closed: () => dispose(),
});
- if (select.canceled) return;
- reactionAcceptance.value = select.result;
+}
+
+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) {
diff --git a/packages/frontend/src/components/MkPostFormOtherMenu.vue b/packages/frontend/src/components/MkPostFormOtherMenu.vue
new file mode 100644
index 0000000000..7d0406d562
--- /dev/null
+++ b/packages/frontend/src/components/MkPostFormOtherMenu.vue
@@ -0,0 +1,321 @@
+
+
+
+
+
+
+
{{ i18n.ts.textCount }}
+
+
+
{{ number(textLength) }} / {{ number(maxTextLength) }}
+
+
+
+
+
+
+ {{ i18n.ts.reactionAcceptance }}
+
+
+
+
+
+
+ {{ i18n.ts.reset }}
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/frontend/src/filters/number.ts b/packages/frontend/src/filters/number.ts
index 10fb64deb4..479afd58d4 100644
--- a/packages/frontend/src/filters/number.ts
+++ b/packages/frontend/src/filters/number.ts
@@ -5,4 +5,4 @@
import { numberFormat } from '@@/js/intl-const.js';
-export default n => n == null ? 'N/A' : numberFormat.format(n);
+export default (n?: number) => n == null ? 'N/A' : numberFormat.format(n);