forked from logseq/logseq
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcapacitor.config.ts
More file actions
63 lines (56 loc) · 1.37 KB
/
capacitor.config.ts
File metadata and controls
63 lines (56 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import { CapacitorConfig } from '@capacitor/cli'
import { KeyboardResize } from '@capacitor/keyboard'
import * as fs from 'fs'
const version = fs.readFileSync('static/package.json', 'utf8').match(/"version": "(.*?)"/)?.at(1) ?? '0.0.0'
const config: CapacitorConfig = {
appId: 'com.logseq.app',
appName: 'Logseq',
webDir: 'static/mobile',
loggingBehavior: 'debug',
server: {
androidScheme: 'http',
},
plugins: {
StatusBar: {
overlaysWebView: true,
style: 'Light',
backgroundColor: '#ffffffff',
},
SplashScreen: {
launchShowDuration: 500,
launchAutoHide: false,
androidScaleType: 'CENTER_CROP',
splashImmersive: false,
backgroundColor: '#002b36'
},
Keyboard: {
resize: KeyboardResize.None,
resizeOnFullScreen: true,
},
SafeArea: {
enabled: true,
customColorsForSystemBars: true,
statusBarColor: '#000000',
statusBarContent: 'light',
navigationBarColor: '#000000',
navigationBarContent: 'light',
offset: 0
}
},
android: {
appendUserAgent: `Logseq/${version} (Android)`,
},
ios: {
scheme: 'Logseq',
appendUserAgent: `Logseq/${version} (iOS)`,
}
}
if (process.env.LOGSEQ_APP_SERVER_URL) {
Object.assign(config, {
server: {
url: process.env.LOGSEQ_APP_SERVER_URL,
cleartext: true
}
})
}
export = config;