Merge branch 'develop' into system-accounts
This commit is contained in:
commit
6affe4e9a7
14
CHANGELOG.md
14
CHANGELOG.md
|
@ -1,3 +1,15 @@
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
### General
|
||||||
|
-
|
||||||
|
|
||||||
|
### Client
|
||||||
|
-
|
||||||
|
|
||||||
|
### Server
|
||||||
|
-
|
||||||
|
|
||||||
|
|
||||||
## 2025.2.1
|
## 2025.2.1
|
||||||
|
|
||||||
### General
|
### General
|
||||||
|
@ -15,6 +27,8 @@
|
||||||
- Enhance: リアクションする際に確認ダイアログを表示できるように
|
- Enhance: リアクションする際に確認ダイアログを表示できるように
|
||||||
- Enhance: コントロールパネルのユーザ検索で入力された情報をページ遷移で損なわないように `#15437`
|
- Enhance: コントロールパネルのユーザ検索で入力された情報をページ遷移で損なわないように `#15437`
|
||||||
- Enhance: CWの注釈で入力済みの文字数を表示
|
- Enhance: CWの注釈で入力済みの文字数を表示
|
||||||
|
- Enhance: ノート検索ページのデザイン調整
|
||||||
|
(Cherry-picked from https://github.com/taiyme/misskey/pull/273)
|
||||||
- Fix: ノートページで、クリップ一覧が表示されないことがある問題を修正
|
- Fix: ノートページで、クリップ一覧が表示されないことがある問題を修正
|
||||||
- Fix: コンディショナルロールを手動で割り当てできる導線を削除 `#13529`
|
- Fix: コンディショナルロールを手動で割り当てできる導線を削除 `#13529`
|
||||||
- Fix: 埋め込みプレイヤーから外部ページに移動できない問題を修正
|
- Fix: 埋め込みプレイヤーから外部ページに移動できない問題を修正
|
||||||
|
|
|
@ -1584,3 +1584,7 @@ _offlineScreen:
|
||||||
_remoteLookupErrors:
|
_remoteLookupErrors:
|
||||||
_noSuchObject:
|
_noSuchObject:
|
||||||
title: "غير موجود"
|
title: "غير موجود"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "الكل"
|
||||||
|
searchScopeLocal: "المحلي"
|
||||||
|
searchScopeUser: "مستخدم محدد"
|
||||||
|
|
|
@ -1348,3 +1348,6 @@ _reversi:
|
||||||
_remoteLookupErrors:
|
_remoteLookupErrors:
|
||||||
_noSuchObject:
|
_noSuchObject:
|
||||||
title: "পাওয়া যায়নি"
|
title: "পাওয়া যায়নি"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "সবগুলো"
|
||||||
|
searchScopeLocal: "স্থানীয়"
|
||||||
|
|
|
@ -2854,3 +2854,11 @@ _bootErrors:
|
||||||
otherOption1: "Esborrar la configuració i la memòria cau del client"
|
otherOption1: "Esborrar la configuració i la memòria cau del client"
|
||||||
otherOption2: "Iniciar client senzill"
|
otherOption2: "Iniciar client senzill"
|
||||||
otherOption3: "Iniciar l'eina de reparació "
|
otherOption3: "Iniciar l'eina de reparació "
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "Tot"
|
||||||
|
searchScopeLocal: "Local"
|
||||||
|
searchScopeServer: "Instància "
|
||||||
|
searchScopeUser: "Especificar usuari"
|
||||||
|
pleaseEnterServerHost: "Introdueix l'adreça de la instància "
|
||||||
|
pleaseSelectUser: "Selecciona un usuari"
|
||||||
|
serverHostPlaceholder: "Ex: misskey.example.com"
|
||||||
|
|
|
@ -2024,3 +2024,7 @@ _reversi:
|
||||||
_remoteLookupErrors:
|
_remoteLookupErrors:
|
||||||
_noSuchObject:
|
_noSuchObject:
|
||||||
title: "Nenalezeno"
|
title: "Nenalezeno"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "Vše"
|
||||||
|
searchScopeLocal: "Místní"
|
||||||
|
searchScopeUser: "Upřesnit uživatele"
|
||||||
|
|
|
@ -2614,3 +2614,7 @@ _remoteLookupErrors:
|
||||||
_noSuchObject:
|
_noSuchObject:
|
||||||
title: "Nicht gefunden"
|
title: "Nicht gefunden"
|
||||||
description: "Die angeforderte Ressource konnte nicht gefunden werden, bitte überprüfe die URI erneut."
|
description: "Die angeforderte Ressource konnte nicht gefunden werden, bitte überprüfe die URI erneut."
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "Alle"
|
||||||
|
searchScopeLocal: "Lokal"
|
||||||
|
searchScopeUser: "Spezifischer Benutzer"
|
||||||
|
|
|
@ -397,3 +397,5 @@ _moderationLogTypes:
|
||||||
suspend: "Αποβολή"
|
suspend: "Αποβολή"
|
||||||
_reversi:
|
_reversi:
|
||||||
total: "Σύνολο"
|
total: "Σύνολο"
|
||||||
|
_search:
|
||||||
|
searchScopeLocal: "Τοπικό"
|
||||||
|
|
|
@ -2854,3 +2854,7 @@ _bootErrors:
|
||||||
otherOption1: "Delete client settings and cache"
|
otherOption1: "Delete client settings and cache"
|
||||||
otherOption2: "Start the simple client"
|
otherOption2: "Start the simple client"
|
||||||
otherOption3: "Launch the repair tool"
|
otherOption3: "Launch the repair tool"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "All"
|
||||||
|
searchScopeLocal: "Local"
|
||||||
|
searchScopeUser: "Specific user"
|
||||||
|
|
|
@ -2589,3 +2589,7 @@ _followRequest:
|
||||||
_remoteLookupErrors:
|
_remoteLookupErrors:
|
||||||
_noSuchObject:
|
_noSuchObject:
|
||||||
title: "No se encuentra"
|
title: "No se encuentra"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "Todo"
|
||||||
|
searchScopeLocal: "Local"
|
||||||
|
searchScopeUser: "Especificar usuario"
|
||||||
|
|
|
@ -2364,3 +2364,7 @@ _embedCodeGen:
|
||||||
_remoteLookupErrors:
|
_remoteLookupErrors:
|
||||||
_noSuchObject:
|
_noSuchObject:
|
||||||
title: "Non trouvé"
|
title: "Non trouvé"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "Tous"
|
||||||
|
searchScopeLocal: "Local"
|
||||||
|
searchScopeUser: "Spécifier l'utilisateur·rice"
|
||||||
|
|
|
@ -2610,3 +2610,7 @@ _mediaControls:
|
||||||
_remoteLookupErrors:
|
_remoteLookupErrors:
|
||||||
_noSuchObject:
|
_noSuchObject:
|
||||||
title: "Tidak dapat ditemukan"
|
title: "Tidak dapat ditemukan"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "Semua"
|
||||||
|
searchScopeLocal: "Lokal"
|
||||||
|
searchScopeUser: "Pengguna spesifik"
|
||||||
|
|
|
@ -11004,6 +11004,36 @@ export interface Locale extends ILocale {
|
||||||
*/
|
*/
|
||||||
"otherOption3": string;
|
"otherOption3": string;
|
||||||
};
|
};
|
||||||
|
"_search": {
|
||||||
|
/**
|
||||||
|
* 全て
|
||||||
|
*/
|
||||||
|
"searchScopeAll": string;
|
||||||
|
/**
|
||||||
|
* ローカル
|
||||||
|
*/
|
||||||
|
"searchScopeLocal": string;
|
||||||
|
/**
|
||||||
|
* サーバー指定
|
||||||
|
*/
|
||||||
|
"searchScopeServer": string;
|
||||||
|
/**
|
||||||
|
* ユーザー指定
|
||||||
|
*/
|
||||||
|
"searchScopeUser": string;
|
||||||
|
/**
|
||||||
|
* サーバーのホストを入力してください
|
||||||
|
*/
|
||||||
|
"pleaseEnterServerHost": string;
|
||||||
|
/**
|
||||||
|
* ユーザーを選択してください
|
||||||
|
*/
|
||||||
|
"pleaseSelectUser": string;
|
||||||
|
/**
|
||||||
|
* 例: misskey.example.com
|
||||||
|
*/
|
||||||
|
"serverHostPlaceholder": string;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
declare const locales: {
|
declare const locales: {
|
||||||
[lang: string]: Locale;
|
[lang: string]: Locale;
|
||||||
|
|
|
@ -2854,3 +2854,7 @@ _bootErrors:
|
||||||
otherOption1: "Nelle impostazioni, cancellare le impostazioni del client e svuotare la cache"
|
otherOption1: "Nelle impostazioni, cancellare le impostazioni del client e svuotare la cache"
|
||||||
otherOption2: "Avviare il client predefinito"
|
otherOption2: "Avviare il client predefinito"
|
||||||
otherOption3: "Avviare lo strumento di riparazione"
|
otherOption3: "Avviare lo strumento di riparazione"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "Tutte"
|
||||||
|
searchScopeLocal: "Locale"
|
||||||
|
searchScopeUser: "Profilo specifico"
|
||||||
|
|
|
@ -2943,3 +2943,12 @@ _bootErrors:
|
||||||
otherOption1: "クライアント設定とキャッシュを削除"
|
otherOption1: "クライアント設定とキャッシュを削除"
|
||||||
otherOption2: "簡易クライアントを起動"
|
otherOption2: "簡易クライアントを起動"
|
||||||
otherOption3: "修復ツールを起動"
|
otherOption3: "修復ツールを起動"
|
||||||
|
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "全て"
|
||||||
|
searchScopeLocal: "ローカル"
|
||||||
|
searchScopeServer: "サーバー指定"
|
||||||
|
searchScopeUser: "ユーザー指定"
|
||||||
|
pleaseEnterServerHost: "サーバーのホストを入力してください"
|
||||||
|
pleaseSelectUser: "ユーザーを選択してください"
|
||||||
|
serverHostPlaceholder: "例: misskey.example.com"
|
||||||
|
|
|
@ -2854,3 +2854,7 @@ _bootErrors:
|
||||||
otherOption1: "クライアント設定とキャッシュをほかす"
|
otherOption1: "クライアント設定とキャッシュをほかす"
|
||||||
otherOption2: "簡易クライアントを起動"
|
otherOption2: "簡易クライアントを起動"
|
||||||
otherOption3: "修復ツールを起動"
|
otherOption3: "修復ツールを起動"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "みんな"
|
||||||
|
searchScopeLocal: "ローカル"
|
||||||
|
searchScopeUser: "ユーザー指定"
|
||||||
|
|
|
@ -843,3 +843,6 @@ _reversi:
|
||||||
_remoteLookupErrors:
|
_remoteLookupErrors:
|
||||||
_noSuchObject:
|
_noSuchObject:
|
||||||
title: "몬 찾앗십니다"
|
title: "몬 찾앗십니다"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "말캉"
|
||||||
|
searchScopeUser: "사용자 지정"
|
||||||
|
|
|
@ -2841,3 +2841,7 @@ _captcha:
|
||||||
_bootErrors:
|
_bootErrors:
|
||||||
title: "로딩이 실패함"
|
title: "로딩이 실패함"
|
||||||
solution4: "(Tor Browser) dom.webaudio.enabled를 true로 설정하세요"
|
solution4: "(Tor Browser) dom.webaudio.enabled를 true로 설정하세요"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "전체"
|
||||||
|
searchScopeLocal: "로컬"
|
||||||
|
searchScopeUser: "사용자 지정"
|
||||||
|
|
|
@ -477,3 +477,5 @@ _moderationLogTypes:
|
||||||
_remoteLookupErrors:
|
_remoteLookupErrors:
|
||||||
_noSuchObject:
|
_noSuchObject:
|
||||||
title: "ບໍ່ພົບ"
|
title: "ບໍ່ພົບ"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "ທັງໝົດ"
|
||||||
|
|
|
@ -540,3 +540,5 @@ _reversi:
|
||||||
_remoteLookupErrors:
|
_remoteLookupErrors:
|
||||||
_noSuchObject:
|
_noSuchObject:
|
||||||
title: "Niet gevonden"
|
title: "Niet gevonden"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "Alle"
|
||||||
|
|
|
@ -730,3 +730,5 @@ _moderationLogTypes:
|
||||||
_remoteLookupErrors:
|
_remoteLookupErrors:
|
||||||
_noSuchObject:
|
_noSuchObject:
|
||||||
title: "Ikke funnet"
|
title: "Ikke funnet"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "Alle"
|
||||||
|
|
|
@ -1583,3 +1583,6 @@ _reversi:
|
||||||
_remoteLookupErrors:
|
_remoteLookupErrors:
|
||||||
_noSuchObject:
|
_noSuchObject:
|
||||||
title: "Nie znaleziono"
|
title: "Nie znaleziono"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "Wszystkie"
|
||||||
|
searchScopeLocal: "Lokalne"
|
||||||
|
|
|
@ -2757,3 +2757,7 @@ _remoteLookupErrors:
|
||||||
_noSuchObject:
|
_noSuchObject:
|
||||||
title: "Não encontrado"
|
title: "Não encontrado"
|
||||||
description: "O recurso solicitado não foi encontrado, confira o endereço."
|
description: "O recurso solicitado não foi encontrado, confira o endereço."
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "Todos"
|
||||||
|
searchScopeLocal: "Local"
|
||||||
|
searchScopeUser: "Usuário específico"
|
||||||
|
|
|
@ -736,3 +736,5 @@ _reversi:
|
||||||
_remoteLookupErrors:
|
_remoteLookupErrors:
|
||||||
_noSuchObject:
|
_noSuchObject:
|
||||||
title: "Nu a fost găsit"
|
title: "Nu a fost găsit"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "Tot"
|
||||||
|
|
|
@ -2147,3 +2147,7 @@ _reversi:
|
||||||
_remoteLookupErrors:
|
_remoteLookupErrors:
|
||||||
_noSuchObject:
|
_noSuchObject:
|
||||||
title: "Не найдено"
|
title: "Не найдено"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "Все"
|
||||||
|
searchScopeLocal: "Местная"
|
||||||
|
searchScopeUser: "Указанный пользователь"
|
||||||
|
|
|
@ -1449,3 +1449,6 @@ _reversi:
|
||||||
_remoteLookupErrors:
|
_remoteLookupErrors:
|
||||||
_noSuchObject:
|
_noSuchObject:
|
||||||
title: "Nenájdené"
|
title: "Nenájdené"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "Všetko"
|
||||||
|
searchScopeLocal: "Lokálne"
|
||||||
|
|
|
@ -707,3 +707,5 @@ _reversi:
|
||||||
white: "Vit"
|
white: "Vit"
|
||||||
_selfXssPrevention:
|
_selfXssPrevention:
|
||||||
warning: "VARNING"
|
warning: "VARNING"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "Allt"
|
||||||
|
|
|
@ -2709,3 +2709,7 @@ _embedCodeGen:
|
||||||
_remoteLookupErrors:
|
_remoteLookupErrors:
|
||||||
_noSuchObject:
|
_noSuchObject:
|
||||||
title: "ไม่พบหน้าที่ต้องการ"
|
title: "ไม่พบหน้าที่ต้องการ"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "ทั้งหมด"
|
||||||
|
searchScopeLocal: "ท้องถิ่น"
|
||||||
|
searchScopeUser: "ผู้ใช้เฉพาะ"
|
||||||
|
|
|
@ -460,3 +460,5 @@ _deck:
|
||||||
_moderationLogTypes:
|
_moderationLogTypes:
|
||||||
suspend: "askıya al"
|
suspend: "askıya al"
|
||||||
resetPassword: "Şifre sıfırlama"
|
resetPassword: "Şifre sıfırlama"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "Tümü"
|
||||||
|
|
|
@ -1624,3 +1624,6 @@ _reversi:
|
||||||
_remoteLookupErrors:
|
_remoteLookupErrors:
|
||||||
_noSuchObject:
|
_noSuchObject:
|
||||||
title: "Не знайдено"
|
title: "Не знайдено"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "Всі"
|
||||||
|
searchScopeLocal: "Локальна"
|
||||||
|
|
|
@ -1094,3 +1094,6 @@ _reversi:
|
||||||
_remoteLookupErrors:
|
_remoteLookupErrors:
|
||||||
_noSuchObject:
|
_noSuchObject:
|
||||||
title: "Topilmadi"
|
title: "Topilmadi"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "Barcha"
|
||||||
|
searchScopeLocal: "Mahalliy"
|
||||||
|
|
|
@ -1930,3 +1930,7 @@ _reversi:
|
||||||
_remoteLookupErrors:
|
_remoteLookupErrors:
|
||||||
_noSuchObject:
|
_noSuchObject:
|
||||||
title: "Không tìm thấy"
|
title: "Không tìm thấy"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "Tất cả"
|
||||||
|
searchScopeLocal: "Máy chủ này"
|
||||||
|
searchScopeUser: "Người dùng chỉ định"
|
||||||
|
|
|
@ -2854,3 +2854,7 @@ _bootErrors:
|
||||||
otherOption1: "清除客户端设定与缓存"
|
otherOption1: "清除客户端设定与缓存"
|
||||||
otherOption2: "使用简易客户端"
|
otherOption2: "使用简易客户端"
|
||||||
otherOption3: "启动修复工具"
|
otherOption3: "启动修复工具"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "全部"
|
||||||
|
searchScopeLocal: "本地"
|
||||||
|
searchScopeUser: "用户指定"
|
||||||
|
|
|
@ -2854,3 +2854,7 @@ _bootErrors:
|
||||||
otherOption1: "刪除用戶端設定和快取"
|
otherOption1: "刪除用戶端設定和快取"
|
||||||
otherOption2: "啟動簡易用戶端"
|
otherOption2: "啟動簡易用戶端"
|
||||||
otherOption3: "啟動修復工具"
|
otherOption3: "啟動修復工具"
|
||||||
|
_search:
|
||||||
|
searchScopeAll: "全部"
|
||||||
|
searchScopeLocal: "本地"
|
||||||
|
searchScopeUser: "指定使用者"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"version": "2025.2.1-beta.2",
|
"version": "2025.2.1",
|
||||||
"codename": "nasubi",
|
"codename": "nasubi",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -6,69 +6,127 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<template>
|
<template>
|
||||||
<div class="_gaps">
|
<div class="_gaps">
|
||||||
<div class="_gaps">
|
<div class="_gaps">
|
||||||
<MkInput v-model="searchQuery" :large="true" :autofocus="true" type="search" @enter.prevent="search">
|
<MkInput
|
||||||
|
v-model="searchQuery"
|
||||||
|
large
|
||||||
|
autofocus
|
||||||
|
type="search"
|
||||||
|
@enter.prevent="search"
|
||||||
|
>
|
||||||
<template #prefix><i class="ti ti-search"></i></template>
|
<template #prefix><i class="ti ti-search"></i></template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<MkFoldableSection :expanded="true">
|
<MkFoldableSection expanded>
|
||||||
<template #header>{{ i18n.ts.options }}</template>
|
<template #header>{{ i18n.ts.options }}</template>
|
||||||
|
|
||||||
<div class="_gaps_m">
|
<div class="_gaps_m">
|
||||||
<template v-if="instance.federation !== 'none'">
|
<MkRadios v-model="searchScope">
|
||||||
<MkRadios v-model="hostSelect">
|
<option v-if="instance.federation !== 'none' && noteSearchableScope === 'global'" value="all">{{ i18n.ts._search.searchScopeAll }}</option>
|
||||||
<template #label>{{ i18n.ts.host }}</template>
|
<option value="local">{{ instance.federation === 'none' ? i18n.ts._search.searchScopeAll : i18n.ts._search.searchScopeLocal }}</option>
|
||||||
<option value="all" default>{{ i18n.ts.all }}</option>
|
<option v-if="instance.federation !== 'none' && noteSearchableScope === 'global'" value="server">{{ i18n.ts._search.searchScopeServer }}</option>
|
||||||
<option value="local">{{ i18n.ts.local }}</option>
|
<option value="user">{{ i18n.ts._search.searchScopeUser }}</option>
|
||||||
<option v-if="noteSearchableScope === 'global'" value="specified">{{ i18n.ts.specifyHost }}</option>
|
|
||||||
</MkRadios>
|
</MkRadios>
|
||||||
<MkInput v-if="noteSearchableScope === 'global'" v-model="hostInput" :disabled="hostSelect !== 'specified'" :large="true" type="search">
|
|
||||||
|
<div v-if="instance.federation !== 'none' && searchScope === 'server'" :class="$style.subOptionRoot">
|
||||||
|
<MkInput
|
||||||
|
v-model="hostInput"
|
||||||
|
:placeholder="i18n.ts._search.serverHostPlaceholder"
|
||||||
|
@enter.prevent="search"
|
||||||
|
>
|
||||||
|
<template #label>{{ i18n.ts._search.pleaseEnterServerHost }}</template>
|
||||||
<template #prefix><i class="ti ti-server"></i></template>
|
<template #prefix><i class="ti ti-server"></i></template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
</template>
|
</div>
|
||||||
|
|
||||||
<MkFolder :defaultOpen="true">
|
|
||||||
<template #label>{{ i18n.ts.specifyUser }}</template>
|
|
||||||
<template v-if="user" #suffix>@{{ user.username }}{{ user.host ? `@${user.host}` : "" }}</template>
|
|
||||||
|
|
||||||
|
<div v-if="searchScope === 'user'" :class="$style.subOptionRoot">
|
||||||
|
<div :class="$style.userSelectLabel">{{ i18n.ts._search.pleaseSelectUser }}</div>
|
||||||
<div class="_gaps">
|
<div class="_gaps">
|
||||||
<div :class="$style.userItem">
|
<div v-if="user == null" :class="$style.userSelectButtons">
|
||||||
<MkUserCardMini v-if="user" :class="$style.userCard" :user="user" :withChart="false"/>
|
<div v-if="$i != null">
|
||||||
<MkButton v-if="user == null && $i != null" transparent :class="$style.addMeButton" @click="selectSelf"><div :class="$style.addUserButtonInner"><span><i class="ti ti-plus"></i><i class="ti ti-user"></i></span><span>{{ i18n.ts.selectSelf }}</span></div></MkButton>
|
<MkButton
|
||||||
<MkButton v-if="user == null" transparent :class="$style.addUserButton" @click="selectUser"><div :class="$style.addUserButtonInner"><i class="ti ti-plus"></i><span>{{ i18n.ts.selectUser }}</span></div></MkButton>
|
transparent
|
||||||
<button class="_button" :class="$style.remove" :disabled="user == null" @click="removeUser"><i class="ti ti-x"></i></button>
|
:class="$style.userSelectButton"
|
||||||
|
@click="selectSelf"
|
||||||
|
>
|
||||||
|
<div :class="$style.userSelectButtonInner">
|
||||||
|
<span><i class="ti ti-plus"></i><i class="ti ti-user"></i></span>
|
||||||
|
<span>{{ i18n.ts.selectSelf }}</span>
|
||||||
|
</div>
|
||||||
|
</MkButton>
|
||||||
|
</div>
|
||||||
|
<div :style="$i == null ? 'grid-column: span 2;' : undefined">
|
||||||
|
<MkButton
|
||||||
|
transparent
|
||||||
|
:class="$style.userSelectButton"
|
||||||
|
@click="selectUser"
|
||||||
|
>
|
||||||
|
<div :class="$style.userSelectButtonInner">
|
||||||
|
<span><i class="ti ti-plus"></i></span>
|
||||||
|
<span>{{ i18n.ts.selectUser }}</span>
|
||||||
|
</div>
|
||||||
|
</MkButton>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else :class="$style.userSelectedButtons">
|
||||||
|
<div style="overflow: hidden;">
|
||||||
|
<MkUserCardMini
|
||||||
|
:user="user"
|
||||||
|
:withChart="false"
|
||||||
|
:class="$style.userSelectedCard"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<button
|
||||||
|
class="_button"
|
||||||
|
:class="$style.userSelectedRemoveButton"
|
||||||
|
@click="removeUser"
|
||||||
|
>
|
||||||
|
<i class="ti ti-x"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</MkFolder>
|
|
||||||
</div>
|
</div>
|
||||||
</MkFoldableSection>
|
</MkFoldableSection>
|
||||||
<div>
|
<div>
|
||||||
<MkButton large primary gradate rounded style="margin: 0 auto;" @click="search">{{ i18n.ts.search }}</MkButton>
|
<MkButton
|
||||||
|
large
|
||||||
|
primary
|
||||||
|
gradate
|
||||||
|
rounded
|
||||||
|
:disabled="searchParams == null"
|
||||||
|
style="margin: 0 auto;"
|
||||||
|
@click="search"
|
||||||
|
>
|
||||||
|
{{ i18n.ts.search }}
|
||||||
|
</MkButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<MkFoldableSection v-if="notePagination">
|
<MkFoldableSection v-if="notePagination">
|
||||||
<template #header>{{ i18n.ts.searchResult }}</template>
|
<template #header>{{ i18n.ts.searchResult }}</template>
|
||||||
<MkNotes :key="key" :pagination="notePagination"/>
|
<MkNotes :key="`searchNotes:${key}`" :pagination="notePagination"/>
|
||||||
</MkFoldableSection>
|
</MkFoldableSection>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref, toRef, watch } from 'vue';
|
import { computed, ref, shallowRef, toRef } from 'vue';
|
||||||
import type { UserDetailed } from 'misskey-js/entities.js';
|
import type * as Misskey from 'misskey-js';
|
||||||
import type { Paging } from '@/components/MkPagination.vue';
|
import type { Paging } from '@/components/MkPagination.vue';
|
||||||
import MkNotes from '@/components/MkNotes.vue';
|
import { $i } from '@/account.js';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import { host as localHost } from '@@/js/config.js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
|
import { instance } from '@/instance.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||||
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
|
||||||
import MkFolder from '@/components/MkFolder.vue';
|
|
||||||
import { useRouter } from '@/router/supplier.js';
|
import { useRouter } from '@/router/supplier.js';
|
||||||
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
|
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
||||||
|
import MkInput from '@/components/MkInput.vue';
|
||||||
|
import MkNotes from '@/components/MkNotes.vue';
|
||||||
import MkRadios from '@/components/MkRadios.vue';
|
import MkRadios from '@/components/MkRadios.vue';
|
||||||
import { $i } from '@/account.js';
|
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
||||||
import { instance } from '@/instance.js';
|
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
query?: string;
|
query?: string;
|
||||||
|
@ -83,76 +141,127 @@ const props = withDefaults(defineProps<{
|
||||||
});
|
});
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const key = ref(0);
|
const key = ref(0);
|
||||||
|
const notePagination = ref<Paging<'notes/search'>>();
|
||||||
|
|
||||||
const searchQuery = ref(toRef(props, 'query').value);
|
const searchQuery = ref(toRef(props, 'query').value);
|
||||||
const notePagination = ref<Paging>();
|
|
||||||
const user = ref<UserDetailed | null>(null);
|
|
||||||
const hostInput = ref(toRef(props, 'host').value);
|
const hostInput = ref(toRef(props, 'host').value);
|
||||||
|
|
||||||
|
const user = shallowRef<Misskey.entities.UserDetailed | null>(null);
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||||
const noteSearchableScope = instance.noteSearchableScope ?? 'local';
|
const noteSearchableScope = instance.noteSearchableScope ?? 'local';
|
||||||
|
|
||||||
const hostSelect = ref<'all' | 'local' | 'specified'>('all');
|
//#region set user
|
||||||
|
let fetchedUser: Misskey.entities.UserDetailed | null = null;
|
||||||
|
|
||||||
const setHostSelectWithInput = (after: string | undefined | null, before: string | undefined | null) => {
|
if (props.userId) {
|
||||||
if (before === after) return;
|
fetchedUser = await misskeyApi('users/show', {
|
||||||
if (after === '') hostSelect.value = 'all';
|
userId: props.userId,
|
||||||
else hostSelect.value = 'specified';
|
}).catch(() => null);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (props.username && fetchedUser == null) {
|
||||||
|
fetchedUser = await misskeyApi('users/show', {
|
||||||
|
username: props.username,
|
||||||
|
...(props.host ? { host: props.host } : {}),
|
||||||
|
}).catch(() => null);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fetchedUser != null) {
|
||||||
|
if (!(noteSearchableScope === 'local' && fetchedUser.host != null)) {
|
||||||
|
user.value = fetchedUser;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
const searchScope = ref<'all' | 'local' | 'server' | 'user'>((() => {
|
||||||
|
if (user.value != null) return 'user';
|
||||||
|
if (noteSearchableScope === 'local') return 'local';
|
||||||
|
if (hostInput.value) return 'server';
|
||||||
|
return 'all';
|
||||||
|
})());
|
||||||
|
|
||||||
|
type SearchParams = {
|
||||||
|
readonly query: string;
|
||||||
|
readonly host?: string;
|
||||||
|
readonly userId?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
setHostSelectWithInput(hostInput.value, undefined);
|
const fixHostIfLocal = (target: string | null | undefined) => {
|
||||||
|
if (!target || target === localHost) return '.';
|
||||||
|
return target;
|
||||||
|
};
|
||||||
|
|
||||||
watch(hostInput, setHostSelectWithInput);
|
const searchParams = computed<SearchParams | null>(() => {
|
||||||
|
const trimmedQuery = searchQuery.value.trim();
|
||||||
|
if (!trimmedQuery) return null;
|
||||||
|
|
||||||
const searchHost = computed(() => {
|
if (searchScope.value === 'user') {
|
||||||
if (hostSelect.value === 'local' || instance.federation === 'none') return '.';
|
if (user.value == null) return null;
|
||||||
if (hostSelect.value === 'specified') return hostInput.value;
|
return {
|
||||||
return null;
|
query: trimmedQuery,
|
||||||
|
host: fixHostIfLocal(user.value.host),
|
||||||
|
userId: user.value.id,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (instance.federation !== 'none' && searchScope.value === 'server') {
|
||||||
|
let trimmedHost = hostInput.value?.trim();
|
||||||
|
if (!trimmedHost) return null;
|
||||||
|
if (trimmedHost.startsWith('https://') || trimmedHost.startsWith('http://')) {
|
||||||
|
try {
|
||||||
|
trimmedHost = new URL(trimmedHost).host;
|
||||||
|
} catch (err) { /* empty */ }
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
query: trimmedQuery,
|
||||||
|
host: fixHostIfLocal(trimmedHost),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (instance.federation === 'none' || searchScope.value === 'local') {
|
||||||
|
return {
|
||||||
|
query: trimmedQuery,
|
||||||
|
host: '.',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
query: trimmedQuery,
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
if (props.userId != null) {
|
function selectUser() {
|
||||||
misskeyApi('users/show', { userId: props.userId }).then(_user => {
|
os.selectUser({
|
||||||
user.value = _user;
|
includeSelf: true,
|
||||||
});
|
localOnly: instance.noteSearchableScope === 'local',
|
||||||
} else if (props.username != null) {
|
|
||||||
misskeyApi('users/show', {
|
|
||||||
username: props.username,
|
|
||||||
...(props.host != null && props.host !== '') ? { host: props.host } : {},
|
|
||||||
}).then(_user => {
|
}).then(_user => {
|
||||||
user.value = _user;
|
user.value = _user;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectUser() {
|
|
||||||
os.selectUser({ includeSelf: true, localOnly: instance.noteSearchableScope === 'local' }).then(_user => {
|
|
||||||
user.value = _user;
|
|
||||||
hostInput.value = _user.host ?? '';
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectSelf() {
|
function selectSelf() {
|
||||||
user.value = $i as UserDetailed | null;
|
user.value = $i;
|
||||||
hostInput.value = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeUser() {
|
function removeUser() {
|
||||||
user.value = null;
|
user.value = null;
|
||||||
hostInput.value = '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function search() {
|
async function search() {
|
||||||
const query = searchQuery.value.toString().trim();
|
if (searchParams.value == null) return;
|
||||||
|
|
||||||
if (query == null || query === '') return;
|
|
||||||
|
|
||||||
//#region AP lookup
|
//#region AP lookup
|
||||||
if (query.startsWith('https://') && !query.includes(' ')) {
|
if (searchParams.value.query.startsWith('https://') && !searchParams.value.query.includes(' ')) {
|
||||||
const confirm = await os.confirm({
|
const confirm = await os.confirm({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
text: i18n.ts.lookupConfirm,
|
text: i18n.ts.lookupConfirm,
|
||||||
});
|
});
|
||||||
if (!confirm.canceled) {
|
if (!confirm.canceled) {
|
||||||
const promise = misskeyApi('ap/show', {
|
const promise = misskeyApi('ap/show', {
|
||||||
uri: query,
|
uri: searchParams.value.query,
|
||||||
});
|
});
|
||||||
|
|
||||||
os.promiseDialog(promise, null, null, i18n.ts.fetchingAsApObject);
|
os.promiseDialog(promise, null, null, i18n.ts.fetchingAsApObject);
|
||||||
|
@ -161,6 +270,7 @@ async function search() {
|
||||||
|
|
||||||
if (res.type === 'User') {
|
if (res.type === 'User') {
|
||||||
router.push(`/@${res.object.username}@${res.object.host}`);
|
router.push(`/@${res.object.username}@${res.object.host}`);
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||||
} else if (res.type === 'Note') {
|
} else if (res.type === 'Note') {
|
||||||
router.push(`/notes/${res.object.id}`);
|
router.push(`/notes/${res.object.id}`);
|
||||||
}
|
}
|
||||||
|
@ -170,25 +280,25 @@ async function search() {
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
if (query.length > 1 && !query.includes(' ')) {
|
if (searchParams.value.query.length > 1 && !searchParams.value.query.includes(' ')) {
|
||||||
if (query.startsWith('@')) {
|
if (searchParams.value.query.startsWith('@')) {
|
||||||
const confirm = await os.confirm({
|
const confirm = await os.confirm({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
text: i18n.ts.lookupConfirm,
|
text: i18n.ts.lookupConfirm,
|
||||||
});
|
});
|
||||||
if (!confirm.canceled) {
|
if (!confirm.canceled) {
|
||||||
router.push(`/${query}`);
|
router.push(`/${searchParams.value.query}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query.startsWith('#')) {
|
if (searchParams.value.query.startsWith('#')) {
|
||||||
const confirm = await os.confirm({
|
const confirm = await os.confirm({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
text: i18n.ts.openTagPageConfirm,
|
text: i18n.ts.openTagPageConfirm,
|
||||||
});
|
});
|
||||||
if (!confirm.canceled) {
|
if (!confirm.canceled) {
|
||||||
router.push(`/tags/${encodeURIComponent(query.substring(1))}`);
|
router.push(`/tags/${encodeURIComponent(searchParams.value.query.substring(1))}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -198,9 +308,7 @@ async function search() {
|
||||||
endpoint: 'notes/search',
|
endpoint: 'notes/search',
|
||||||
limit: 10,
|
limit: 10,
|
||||||
params: {
|
params: {
|
||||||
query: searchQuery.value,
|
...searchParams.value,
|
||||||
userId: user.value ? user.value.id : null,
|
|
||||||
...(searchHost.value ? { host: searchHost.value } : {}),
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -208,41 +316,48 @@ async function search() {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" module>
|
<style lang="scss" module>
|
||||||
.userItem {
|
.subOptionRoot {
|
||||||
display: flex;
|
background: var(--MI_THEME-panel);
|
||||||
justify-content: center;
|
border-radius: var(--MI-radius);
|
||||||
|
padding: var(--MI-margin);
|
||||||
}
|
}
|
||||||
.addMeButton {
|
|
||||||
border: 2px dashed var(--MI_THEME-fgTransparent);
|
.userSelectLabel {
|
||||||
|
font-size: 0.85em;
|
||||||
|
padding: 0 0 8px;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.userSelectButtons {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: auto 1fr;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.userSelectButton {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
margin-right: 16px;
|
|
||||||
}
|
|
||||||
.addUserButton {
|
|
||||||
border: 2px dashed var(--MI_THEME-fgTransparent);
|
border: 2px dashed var(--MI_THEME-fgTransparent);
|
||||||
padding: 12px;
|
|
||||||
flex-grow: 1;
|
|
||||||
}
|
}
|
||||||
.addUserButtonInner {
|
|
||||||
|
.userSelectButtonInner {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
min-height: 38px;
|
min-height: 38px;
|
||||||
}
|
}
|
||||||
.userCard {
|
|
||||||
flex-grow: 1;
|
.userSelectedButtons {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr auto;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
.remove {
|
|
||||||
|
.userSelectedRemoveButton {
|
||||||
width: 32px;
|
width: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
align-self: center;
|
|
||||||
|
|
||||||
& > i:before {
|
|
||||||
color: #ff2a2a;
|
color: #ff2a2a;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:disabled {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -19,7 +19,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<MkFoldableSection v-if="userPagination">
|
<MkFoldableSection v-if="userPagination">
|
||||||
<template #header>{{ i18n.ts.searchResult }}</template>
|
<template #header>{{ i18n.ts.searchResult }}</template>
|
||||||
<MkUserList :key="key" :pagination="userPagination"/>
|
<MkUserList :key="`searchUsers:${key}`" :pagination="userPagination"/>
|
||||||
</MkFoldableSection>
|
</MkFoldableSection>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -49,14 +49,16 @@ const props = withDefaults(defineProps<{
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const key = ref('');
|
const key = ref(0);
|
||||||
|
const userPagination = ref<Paging<'users/search'>>();
|
||||||
|
|
||||||
const searchQuery = ref(toRef(props, 'query').value);
|
const searchQuery = ref(toRef(props, 'query').value);
|
||||||
const searchOrigin = ref(toRef(props, 'origin').value);
|
const searchOrigin = ref(toRef(props, 'origin').value);
|
||||||
const userPagination = ref<Paging>();
|
|
||||||
|
|
||||||
async function search() {
|
async function search() {
|
||||||
const query = searchQuery.value.toString().trim();
|
const query = searchQuery.value.toString().trim();
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||||
if (query == null || query === '') return;
|
if (query == null || query === '') return;
|
||||||
|
|
||||||
//#region AP lookup
|
//#region AP lookup
|
||||||
|
@ -76,6 +78,7 @@ async function search() {
|
||||||
|
|
||||||
if (res.type === 'User') {
|
if (res.type === 'User') {
|
||||||
router.push(`/@${res.object.username}@${res.object.host}`);
|
router.push(`/@${res.object.username}@${res.object.host}`);
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||||
} else if (res.type === 'Note') {
|
} else if (res.type === 'Note') {
|
||||||
router.push(`/notes/${res.object.id}`);
|
router.push(`/notes/${res.object.id}`);
|
||||||
}
|
}
|
||||||
|
@ -118,6 +121,6 @@ async function search() {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
key.value = query;
|
key.value++;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
/*
|
|
||||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
*/
|
|
||||||
|
|
||||||
import * as Misskey from 'misskey-js';
|
|
||||||
import { host as localHost } from '@@/js/config.js';
|
|
||||||
|
|
||||||
export async function genSearchQuery(v: any, q: string) {
|
|
||||||
let host: string;
|
|
||||||
let userId: string;
|
|
||||||
if (q.split(' ').some(x => x.startsWith('@'))) {
|
|
||||||
for (const at of q.split(' ').filter(x => x.startsWith('@')).map(x => x.substring(1))) {
|
|
||||||
if (at.includes('.')) {
|
|
||||||
if (at === localHost || at === '.') {
|
|
||||||
host = null;
|
|
||||||
} else {
|
|
||||||
host = at;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
const user = await v.api('users/show', Misskey.acct.parse(at)).catch(x => null);
|
|
||||||
if (user) {
|
|
||||||
userId = user.id;
|
|
||||||
} else {
|
|
||||||
// todo: show error
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
query: q.split(' ').filter(x => !x.startsWith('/') && !x.startsWith('@')).join(' '),
|
|
||||||
host: host,
|
|
||||||
userId: userId,
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"name": "misskey-js",
|
"name": "misskey-js",
|
||||||
"version": "2025.2.1-beta.2",
|
"version": "2025.2.1",
|
||||||
"description": "Misskey SDK for JavaScript",
|
"description": "Misskey SDK for JavaScript",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "./built/index.js",
|
"main": "./built/index.js",
|
||||||
|
|
Loading…
Reference in New Issue