mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-01 14:19:40 +08:00
b6de0ad51b
#### PR Dependency Tree * **PR #15538** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added rich link previews to mobile and iOS sharing, including images, metadata, transcripts, and selected text. * Share imports can now create structured content blocks, embeds, bookmarks, and transcript callouts. * Added workspace-aware preview handling for cloud, self-hosted, and signed-out modes. * **Accessibility** * Improved collapse/expand controls with semantic buttons and ARIA relationships. * **Bug Fixes** * Enhanced URL and error sanitization in server logs. * Improved link-preview CORS support, validation, and request handling. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
53 lines
1.1 KiB
TypeScript
53 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: '.',
|
|
appendUserAgent: `iOS AFFiNE/${packageJson.version}`,
|
|
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;
|