From 430290c0843ef4d20c382f433c866a0b6f0e6f60 Mon Sep 17 00:00:00 2001
From: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
Date: Fri, 2 Feb 2024 16:49:09 +0900
Subject: fix(frontend): selectUserのパラメータを調整 (#13142)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* fix(frontend): selectUserのパラメータを調整

* ついでに軽微なスタイルの修正
---
 .../frontend/src/components/MkUserSelectDialog.vue    | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

(limited to 'packages/frontend/src/components/MkUserSelectDialog.vue')

diff --git a/packages/frontend/src/components/MkUserSelectDialog.vue b/packages/frontend/src/components/MkUserSelectDialog.vue
index 7bef0a6e73..740b122fac 100644
--- a/packages/frontend/src/components/MkUserSelectDialog.vue
+++ b/packages/frontend/src/components/MkUserSelectDialog.vue
@@ -78,10 +78,13 @@ const emit = defineEmits<{
 	(ev: 'closed'): void;
 }>();
 
-const props = defineProps<{
+const props = withDefaults(defineProps<{
 	includeSelf?: boolean;
 	localOnly?: boolean;
-}>();
+}>(), {
+	includeSelf: false,
+	localOnly: false,
+});
 
 const username = ref('');
 const host = ref('');
@@ -102,10 +105,10 @@ function search() {
 		detail: false,
 	}).then(_users => {
 		users.value = _users.filter((u) => {
-			if (props.includeSelf === false) {
-				return u.id !== $i?.id;
-			} else {
+			if (props.includeSelf) {
 				return true;
+			} else {
+				return u.id !== $i?.id;
 			}
 		});
 	});
@@ -146,10 +149,10 @@ onMounted(() => {
 			}
 		});
 		_users = _users.filter((u) => {
-			if (props.includeSelf === false) {
-				return u.id !== $i?.id;
-			} else {
+			if (props.includeSelf) {
 				return true;
+			} else {
+				return u.id !== $i?.id;
 			}
 		});
 		recentUsers.value = _users;
-- 
cgit v1.2.3-freya

