alert when searching notes from widget, and search is disabled
This commit is contained in:
@@ -24,6 +24,7 @@ import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import * as os from '@/os.js';
|
||||
import { useRouter } from '@/router/supplier.js';
|
||||
import { GetFormResultType } from '@/scripts/form.js';
|
||||
import { notesSearchAvailable } from '@/scripts/check-permissions.js';
|
||||
|
||||
const name = 'search';
|
||||
|
||||
@@ -128,6 +129,14 @@ async function search() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!notesSearchAvailable) {
|
||||
os.alert({
|
||||
type: 'warning',
|
||||
text: i18n.ts.notesSearchNotAvailable,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
notePagination.value = {
|
||||
endpoint: 'notes/search',
|
||||
limit: 10,
|
||||
|
||||
Reference in New Issue
Block a user