fix(frontend): selectUserのパラメータを調整 (#13142)
* fix(frontend): selectUserのパラメータを調整 * ついでに軽微なスタイルの修正
This commit is contained in:
parent
c38f5ee528
commit
430290c084
9 changed files with 20 additions and 18 deletions
|
|
@ -431,7 +431,7 @@ function applySelect() {
|
|||
|
||||
function chooseUser() {
|
||||
props.close();
|
||||
os.selectUser().then(user => {
|
||||
os.selectUser({ includeSelf: true }).then(user => {
|
||||
complete('user', user);
|
||||
props.textarea.focus();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -396,6 +396,7 @@ onDeactivated(() => {
|
|||
|
||||
.hidden {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #000;
|
||||
border: none;
|
||||
outline: none;
|
||||
|
|
|
|||
|
|
@ -860,7 +860,7 @@ function cancel() {
|
|||
}
|
||||
|
||||
function insertMention() {
|
||||
os.selectUser().then(user => {
|
||||
os.selectUser({ localOnly: localOnly.value, includeSelf: true }).then(user => {
|
||||
insertTextAtCursor(textareaEl.value, '@' + Misskey.acct.toString(user) + ' ');
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue