-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ts
79 lines (69 loc) · 2.01 KB
/
config.ts
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
export interface ConfigWindowShared {
/** The base URL to prepend to relative URLs */
baseURL?: string
}
export interface Config extends ConfigWindowShared {
/** If true, won't update the config file automatically. */
freeze: boolean
/** Which port to start the API on. */
apiPort: number | undefined | null
/** When set, require all API requests to set apiKey */
apiKey?: string
/** A list of the windows to be created */
windows: { [id: string]: ConfigWindow }
}
export interface ConfigWindow {
/** X-position of the window */
x: number | undefined
/** Y-position of the window */
y: number | undefined
/** Width of the window */
width: number
/** Height of the window */
height: number
/** Set to true to make the window fullscreen */
fullScreen: boolean
/** Set to true make the window always-on-top */
onTop?: boolean
/** When true, will display an overlay with debug information */
displayDebug?: boolean
/** When true, web-content console.log will be output to console */
logContent?: boolean
/**
* Set to true to make the window "frameless" (borderless).
* This could be useful in a situation where you don't want a fullscreen window
*/
frameless?: boolean
/** The default URL to load on startup */
defaultURL: string
/** The default background color to use. Defaults to black. Set to empty string to disable. */
defaultColor: string
/** Hide cursor on top of window content. Defaults to true */
hideCursor: boolean
/** Hide any scrollbars for the displayed content. Defaults to false */
hideScrollbar: boolean
/** Zoom factor of the content. Default is 100 (%) */
zoomFactor?: number
}
export const DEFAULT_CONFIG: Config = {
freeze: false,
apiPort: 5270,
apiKey: '',
windows: {
default: {
x: undefined,
y: undefined,
width: 1280,
height: 720,
fullScreen: false,
onTop: false,
frameless: false,
displayDebug: true,
defaultURL: 'https://bouncingdvdlogo.com/',
defaultColor: '#000000',
hideCursor: true,
hideScrollbar: false,
zoomFactor: 100,
},
},
}