mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
feat(mobile): disable swipe back gesture when there is no back in header (#8876)
close AF-1663, AF-1756 - new global `ModalConfigContext` - new logic to judge whether inside modal - render `✕` for PageHeader back if inside modal - only enable `NavigationGesture` when there is `<` in PageHeader
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
export interface NavigationGesturePlugin {
|
||||
isEnabled: () => Promise<boolean>;
|
||||
enable: () => Promise<void>;
|
||||
disable: () => Promise<void>;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { registerPlugin } from '@capacitor/core';
|
||||
|
||||
import type { NavigationGesturePlugin } from './definitions';
|
||||
|
||||
const NavigationGesture =
|
||||
registerPlugin<NavigationGesturePlugin>('NavigationGesture');
|
||||
|
||||
export * from './definitions';
|
||||
export { NavigationGesture };
|
||||
Reference in New Issue
Block a user