diff options
| author | かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> | 2025-01-14 20:08:54 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-14 11:08:54 +0000 |
| commit | 5445b023e5cedb7228710637c895c63328e3db74 (patch) | |
| tree | 3650b2dc0f7eb9a2745bb7a74fc735acc34099df /packages/frontend/src/components/MkUserSelectDialog.vue | |
| parent | feat(frontend): Botプロテクションの設定変更時は実際に検証... (diff) | |
| download | sharkey-5445b023e5cedb7228710637c895c63328e3db74.tar.gz sharkey-5445b023e5cedb7228710637c895c63328e3db74.tar.bz2 sharkey-5445b023e5cedb7228710637c895c63328e3db74.zip | |
enhance: 連合モードにあわせてフロントエンドを変化させるように (#15112)
* enhance(backend): metaにfederation modeに関する情報を公開
* enhance(frontend): 登録画面の注意書きを追加
* enhance(frontend): aboutページ・サーバー情報
* enhance(frontend): サーバー統計
* enhance(frontend): みつけるページ
* enhance(frontend): 検索
* enhance(frontend): ユーザー選択
* enhance(frontend): 設定画面
* enhance(frontend): ウィジェット
* enhance(frontend): リモートで開くオプション
* Update Changelog
* enhance(frontend): ステータスバー
* i18n
---------
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/frontend/src/components/MkUserSelectDialog.vue')
| -rw-r--r-- | packages/frontend/src/components/MkUserSelectDialog.vue | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/packages/frontend/src/components/MkUserSelectDialog.vue b/packages/frontend/src/components/MkUserSelectDialog.vue index 764bf74f21..63af652cbc 100644 --- a/packages/frontend/src/components/MkUserSelectDialog.vue +++ b/packages/frontend/src/components/MkUserSelectDialog.vue @@ -16,7 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only <template #header>{{ i18n.ts.selectUser }}</template> <div> <div :class="$style.form"> - <MkInput v-if="localOnly" v-model="username" :autofocus="true" @update:modelValue="search"> + <MkInput v-if="computedLocalOnly" v-model="username" :autofocus="true" @update:modelValue="search"> <template #label>{{ i18n.ts.username }}</template> <template #prefix>@</template> </MkInput> @@ -61,7 +61,7 @@ SPDX-License-Identifier: AGPL-3.0-only </template> <script lang="ts" setup> -import { onMounted, ref, shallowRef } from 'vue'; +import { onMounted, ref, computed, shallowRef } from 'vue'; import * as Misskey from 'misskey-js'; import MkInput from '@/components/MkInput.vue'; import FormSplit from '@/components/form/split.vue'; @@ -70,6 +70,7 @@ import { misskeyApi } from '@/scripts/misskey-api.js'; import { defaultStore } from '@/store.js'; import { i18n } from '@/i18n.js'; import { $i } from '@/account.js'; +import { instance } from '@/instance.js'; import { host as currentHost, hostname } from '@@/js/config.js'; const emit = defineEmits<{ @@ -86,6 +87,8 @@ const props = withDefaults(defineProps<{ localOnly: false, }); +const computedLocalOnly = computed(() => props.localOnly || instance.federation === 'none'); + const username = ref(''); const host = ref(''); const users = ref<Misskey.entities.UserLite[]>([]); @@ -100,7 +103,7 @@ function search() { } misskeyApi('users/search-by-username-and-host', { username: username.value, - host: props.localOnly ? '.' : host.value, + host: computedLocalOnly.value ? '.' : host.value, limit: 10, detail: false, }).then(_users => { @@ -142,7 +145,7 @@ onMounted(() => { }).then(foundUsers => { let _users = foundUsers; _users = _users.filter((u) => { - if (props.localOnly) { + if (computedLocalOnly.value) { return u.host == null; } else { return true; |