mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-01 17:50:50 +08:00
a77d89bb1a
fix bug edgeless can't slider with finger <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added mobile immersive edgeless mode with dynamic chrome auto-hide and tap-gesture controls. * Added a mobile zoom ruler UI for edgeless. * **Bug Fixes** * Improved iOS rendering/zoom by applying low-zoom survival behavior, gesture-aware refresh deferral, and effective-DPR canvas scaling. * Fixed iOS webview zoom/bounce and process-termination reload behavior. * Improved placeholder styling with theme-aware colors. * **Chores** * Updated local ignore rules and iOS app build/version configuration. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: DarkSky <darksky2048@gmail.com>
52 lines
1.1 KiB
TypeScript
52 lines
1.1 KiB
TypeScript
import { readFileSync } from 'node:fs';
|
|
import { resolve } from 'node:path';
|
|
|
|
import type { CapacitorConfig } from '@capacitor/cli';
|
|
import { KeyboardResize } from '@capacitor/keyboard';
|
|
|
|
const packageJson = JSON.parse(
|
|
readFileSync(resolve(__dirname, './package.json'), 'utf-8')
|
|
);
|
|
|
|
interface AppConfig {
|
|
affineVersion: string;
|
|
}
|
|
|
|
const config: CapacitorConfig & AppConfig = {
|
|
appId: 'app.affine.pro',
|
|
appName: 'AFFiNE',
|
|
webDir: 'dist',
|
|
affineVersion: packageJson.version,
|
|
ios: {
|
|
scheme: 'AFFiNE',
|
|
path: '.',
|
|
webContentsDebuggingEnabled: true,
|
|
// Silence Capacitor's bridge logging (⚡️ TO JS / ⚡️ To Native -> / ⚡️ [log]).
|
|
loggingBehavior: 'none',
|
|
},
|
|
server: {
|
|
// url: 'http://localhost:8080',
|
|
},
|
|
plugins: {
|
|
CapacitorCookies: {
|
|
enabled: false,
|
|
},
|
|
CapacitorHttp: {
|
|
enabled: false,
|
|
},
|
|
Keyboard: {
|
|
resize: KeyboardResize.None,
|
|
},
|
|
},
|
|
};
|
|
|
|
if (process.env.CAP_SERVER_URL) {
|
|
Object.assign(config, {
|
|
server: {
|
|
url: process.env.CAP_SERVER_URL,
|
|
},
|
|
});
|
|
}
|
|
|
|
export default config;
|