mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
feat(android): integrate web api & native AI chat button (#10239)
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
export interface AffineThemePlugin {
|
||||
onThemeChanged(options: { darkMode: boolean }): Promise<void>;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import { registerPlugin } from '@capacitor/core';
|
||||
|
||||
import type { AffineThemePlugin } from './definitions';
|
||||
|
||||
const AffineTheme = registerPlugin<AffineThemePlugin>('AffineTheme');
|
||||
|
||||
export * from './definitions';
|
||||
export { AffineTheme };
|
||||
@@ -0,0 +1,4 @@
|
||||
export interface AIButtonPlugin {
|
||||
present(): Promise<void>;
|
||||
dismiss(): Promise<void>;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import { registerPlugin } from '@capacitor/core';
|
||||
|
||||
import type { AIButtonPlugin } from './definitions';
|
||||
|
||||
const AIButton = registerPlugin<AIButtonPlugin>('AIButton');
|
||||
|
||||
export * from './definitions';
|
||||
export { AIButton };
|
||||
Reference in New Issue
Block a user