feat(mobile): search page ui (#8012)

feat(mobile): search page ui

fix(core): quick search tags performance issue
This commit is contained in:
CatsJuice
2024-08-29 09:05:23 +00:00
parent 5e8683c9be
commit f1bb1fc9b8
26 changed files with 731 additions and 50 deletions
@@ -0,0 +1,7 @@
import type { Framework } from '@toeverything/infra';
import { configureMobileSearchModule } from './search';
export function configureMobileModules(framework: Framework) {
configureMobileSearchModule(framework);
}
@@ -0,0 +1,9 @@
import { type Framework, WorkspaceScope } from '@toeverything/infra';
import { MobileSearchService } from './service/search';
export { MobileSearchService };
export function configureMobileSearchModule(framework: Framework) {
framework.scope(WorkspaceScope).service(MobileSearchService);
}
@@ -0,0 +1,18 @@
import {
CollectionsQuickSearchSession,
DocsQuickSearchSession,
RecentDocsQuickSearchSession,
TagsQuickSearchSession,
} from '@affine/core/modules/quicksearch';
import { Service } from '@toeverything/infra';
export class MobileSearchService extends Service {
readonly recentDocs = this.framework.createEntity(
RecentDocsQuickSearchSession
);
readonly collections = this.framework.createEntity(
CollectionsQuickSearchSession
);
readonly docs = this.framework.createEntity(DocsQuickSearchSession);
readonly tags = this.framework.createEntity(TagsQuickSearchSession);
}