-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathtypes.d.ts
More file actions
160 lines (141 loc) · 2.91 KB
/
types.d.ts
File metadata and controls
160 lines (141 loc) · 2.91 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
interface DorionSettings {
// Deprecated
theme: string;
themes: string[];
zoom: string;
client_type: string;
sys_tray: boolean;
push_to_talk: boolean;
push_to_talk_keys: string[];
cache_css: boolean;
use_native_titlebar: boolean;
start_maximized: boolean;
profile: string;
streamer_mode_detection: boolean;
rpc_server: boolean;
open_on_startup: boolean;
startup_minimized: boolean;
autoupdate: boolean;
update_notify: boolean;
desktop_notifications: boolean;
auto_clear_cache: boolean;
multi_instance: boolean;
disable_hardware_accel: boolean;
blur: string;
blur_css: boolean;
client_mods: string[];
unread_badge: boolean;
client_plugins: boolean;
tray_icon_enabled: boolean;
proxy_uri: string;
keybinds: Record<string, KeyStruct[]>;
keybinds_enabled: boolean;
win7_style_notifications: boolean;
// RPC-specific options
rpc_process_scanner: boolean;
rpc_ipc_connector: boolean;
rpc_websocket_connector: boolean;
rpc_secondary_events: boolean;
}
interface DorionTheme {
label: string
value: string
}
interface DorionPluginList {
// Key is the filename
[key: string]: {
name: string
preload: boolean
enabled: boolean
}
}
interface ShelteRPCPreviouslyPlayed {
name: string
lastPlayed: number
hide: boolean
local?: boolean
appid: string
}
interface ShelteRPCStore {
currentlyPlaying: string
previouslyPlayed: ShelteRPCPreviouslyPlayed[]
}
interface ProcessWindow {
title: string
pid: string
process_name: string
}
interface BasicModalProps {
header: string
body: string
}
interface ConfirmationModalProps {
header: string
body: string
confirmText: string
cancelText?: string
onConfirm?: () => void
onCancel?: () => void
type?: 'neutral' | 'danger' | 'warning'
}
interface Backend {
name: string
invoke: (name: string, args?: any) => Promise<any>
event: {
emit: (name: string, args?: any) => void
listen: (name: string, cb: (args: any) => void) => Promise<void>
}
app: {
getVersion: () => string
}
process: {
relaunch: () => void
}
apiWindow: {
appWindow: {
setFullscreen: (isFullscreen: boolean) => void
}
}
}
interface KeyStruct {
name: string
code: string
}
interface Keybind {
key: string
keys: KeyStruct[]
}
interface KeybindActionType {
label: string
value: string
}
interface KeybindDescription {
[key: string]: string
}
interface KeybindActionsInternal {
[key: string]: {
storeValue?: {
store: string
key: string
eventKey: string
modify: (event: any, store: any) => any
}
press?: {
[key: string]: any
}[]
release?: {
[key: string]: any
}[]
}
}
// Global window types for Dorion
declare global {
interface Window {
__DORION_LANG?: string
__DORION_TRANSLATIONS?: {
[key: string]: Record<string, unknown>
}
__DORION_RESTART?: boolean
__DORION_CONFIG__?: DorionSettings
}
}