Fix search.ts
This commit is contained in:
@ -3,19 +3,14 @@ import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
import { router } from '@/router';
|
||||
|
||||
export async function search(q?: string | null | undefined) {
|
||||
if (q == null) {
|
||||
const { canceled, result: query } = await os.dialog({
|
||||
title: i18n.locale.search,
|
||||
input: true
|
||||
});
|
||||
export async function search() {
|
||||
const { canceled, result: query } = await os.dialog({
|
||||
title: i18n.locale.search,
|
||||
input: true
|
||||
});
|
||||
if (canceled || query == null || query === '') return;
|
||||
|
||||
if (canceled || query == null || query === '') return;
|
||||
|
||||
q = query;
|
||||
}
|
||||
|
||||
q = q.trim();
|
||||
const q = query.trim();
|
||||
|
||||
if (q.startsWith('@') && !q.includes(' ')) {
|
||||
router.push(`/${q}`);
|
||||
@ -39,7 +34,8 @@ export async function search(q?: string | null | undefined) {
|
||||
date.setHours(23, 59, 59, 999);
|
||||
}
|
||||
|
||||
v.$root.$emit('warp', date);
|
||||
// TODO
|
||||
//v.$root.$emit('warp', date);
|
||||
os.dialog({
|
||||
icon: faHistory,
|
||||
iconOnly: true, autoClose: true
|
||||
|
Reference in New Issue
Block a user