enhance(frontend): 検索範囲等が指定されている時は照会/ハッシュタグページを開かないように

This commit is contained in:
Sayamame-beans 2024-05-25 11:11:12 +09:00
parent a1513dd0a7
commit f84eecea96
2 changed files with 37 additions and 32 deletions

View File

@ -74,6 +74,7 @@ async function search() {
if (query == null || query === '') return; if (query == null || query === '') return;
if (!user.value && !isLocalOnly.value) {
if (query.startsWith('https://')) { if (query.startsWith('https://')) {
const promise = misskeyApi('ap/show', { const promise = misskeyApi('ap/show', {
uri: query, uri: query,
@ -96,6 +97,7 @@ async function search() {
router.push(`/tags/${encodeURIComponent(query.substring(1))}`); router.push(`/tags/${encodeURIComponent(query.substring(1))}`);
return; return;
} }
}
notePagination.value = { notePagination.value = {
endpoint: 'notes/search', endpoint: 'notes/search',

View File

@ -48,6 +48,8 @@ async function search() {
if (query == null || query === '') return; if (query == null || query === '') return;
if (searchOrigin.value === 'combined') {
if (query.startsWith('https://')) { if (query.startsWith('https://')) {
const promise = misskeyApi('ap/show', { const promise = misskeyApi('ap/show', {
uri: query, uri: query,
@ -70,6 +72,7 @@ async function search() {
router.push(`/user-tags/${encodeURIComponent(query.substring(1))}`); router.push(`/user-tags/${encodeURIComponent(query.substring(1))}`);
return; return;
} }
}
userPagination.value = { userPagination.value = {
endpoint: 'users/search', endpoint: 'users/search',