feat(mobile): replace search with create in app tab (#8934)

- Remove search on AppTab, replaced with `create doc`
- Always show AppTab for editor page
- Extract `NavigationBack` from `PageHeader`
This commit is contained in:
CatsJuice
2024-12-02 02:55:04 +00:00
parent 5e92d6cfe9
commit 6a71b28a61
10 changed files with 156 additions and 63 deletions

View File

@@ -229,7 +229,15 @@ export class Editor extends Entity {
const title = docTitle?.querySelector<
HTMLElement & { inlineEditor: InlineEditor | null }
>('rich-text');
title?.inlineEditor?.focusEnd();
// Only focus on the title when it's empty on mobile edition.
if (BUILD_CONFIG.isMobileEdition) {
const titleText = this.doc.title$.value;
if (!titleText?.length) {
title?.inlineEditor?.focusEnd();
}
} else {
title?.inlineEditor?.focusEnd();
}
} else {
const selection = editorContainer.host?.std.selection;