summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkPostForm.vue
diff options
context:
space:
mode:
authorかっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>2024-10-31 13:46:42 +0900
committerGitHub <noreply@github.com>2024-10-31 13:46:42 +0900
commit17d9aca5a7ec6149a8dbf0c1607c81ab188e7015 (patch)
tree78752526e76f518be29ebe5bdbd0176cd2087796 /packages/frontend/src/components/MkPostForm.vue
parentfix(frontend): 一部のノート表示で設定にかかわらずセンシ... (diff)
downloadmisskey-17d9aca5a7ec6149a8dbf0c1607c81ab188e7015.tar.gz
misskey-17d9aca5a7ec6149a8dbf0c1607c81ab188e7015.tar.bz2
misskey-17d9aca5a7ec6149a8dbf0c1607c81ab188e7015.zip
refactor(frontend): asとanyをすぐなおせる範囲で除去 (#14848)
* refactor(frontend): できるだけanyを除去 * refactor * lint * fix * remove unused * Update packages/frontend/src/components/MkReactionsViewer.details.vue * Update packages/frontend/src/components/MkUsersTooltip.vue --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/frontend/src/components/MkPostForm.vue')
-rw-r--r--packages/frontend/src/components/MkPostForm.vue20
1 files changed, 4 insertions, 16 deletions
diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue
index b6b80082d3..f2fe048449 100644
--- a/packages/frontend/src/components/MkPostForm.vue
+++ b/packages/frontend/src/components/MkPostForm.vue
@@ -129,25 +129,13 @@ import { miLocalStorage } from '@/local-storage.js';
import { claimAchievement } from '@/scripts/achievements.js';
import { emojiPicker } from '@/scripts/emoji-picker.js';
import { mfmFunctionPicker } from '@/scripts/mfm-function-picker.js';
+import type { PostFormProps } from '@/types/post-form.js';
const $i = signinRequired();
const modal = inject('modal');
-const props = withDefaults(defineProps<{
- reply?: Misskey.entities.Note;
- renote?: Misskey.entities.Note;
- channel?: Misskey.entities.Channel; // TODO
- mention?: Misskey.entities.User;
- specified?: Misskey.entities.UserDetailed;
- initialText?: string;
- initialCw?: string;
- initialVisibility?: (typeof Misskey.noteVisibilities)[number];
- initialFiles?: Misskey.entities.DriveFile[];
- initialLocalOnly?: boolean;
- initialVisibleUsers?: Misskey.entities.UserDetailed[];
- initialNote?: Misskey.entities.Note;
- instant?: boolean;
+const props = withDefaults(defineProps<PostFormProps & {
fixed?: boolean;
autofocus?: boolean;
freezeAfterPosted?: boolean;
@@ -955,8 +943,8 @@ function showActions(ev: MouseEvent) {
action.handler({
text: text.value,
cw: cw.value,
- }, (key, value: any) => {
- if (typeof key !== 'string') return;
+ }, (key, value) => {
+ if (typeof key !== 'string' || typeof value !== 'string') return;
if (key === 'text') { text.value = value; }
if (key === 'cw') { useCw.value = value !== null; cw.value = value; }
});