@@ -36,6 +36,13 @@ const settingsFile = path.join(settingsDir, "settings.json");
36
36
// Load config
37
37
window . settings = require ( settingsFile ) ;
38
38
39
+ // Load CLI parameters
40
+ if ( electron . remote . process . argv . includes ( "--nointro" ) ) {
41
+ window . settings . nointro = true ;
42
+ } else {
43
+ window . settings . nointro = false ;
44
+ }
45
+
39
46
// Load UI theme
40
47
window . _loadTheme = ( theme ) => {
41
48
@@ -83,14 +90,35 @@ window._loadTheme = (theme) => {
83
90
84
91
_loadTheme ( require ( path . join ( themesDir , settings . theme + ".json" ) ) ) ;
85
92
86
- // Startup boot log
87
- let resumeInit , initUI , initMods , initGreeter ;
88
- let bootScreen = document . getElementById ( "boot_screen" ) ;
89
- let log = fs . readFileSync ( path . join ( __dirname , 'assets/misc/boot_log.txt' ) ) . toString ( ) . split ( '\n' ) ;
90
- let i = 0 ;
91
- displayLine ( ) ;
93
+ function initGraphicalErrorHandling ( ) {
94
+ window . edexErrorsModals = [ ] ;
95
+ window . onerror = ( msg , path , line , col , error ) => {
96
+ let errorModal = new Modal ( {
97
+ type : "error" ,
98
+ title : error ,
99
+ message : `${ msg } <br/> at ${ path } ${ line } :${ col } `
100
+ } ) ;
101
+ window . edexErrorsModals . push ( errorModal ) ;
92
102
103
+ ipc . send ( "log" , "error" , `${ error } : ${ msg } ` ) ;
104
+ ipc . send ( "log" , "debug" , `at ${ path } ${ line } :${ col } ` ) ;
105
+ } ;
106
+ }
107
+
108
+ if ( ! window . settings . nointro ) {
109
+ let i = 0 ;
110
+ displayLine ( ) ;
111
+ } else {
112
+ initGraphicalErrorHandling ( ) ;
113
+ document . getElementById ( "boot_screen" ) . remove ( ) ;
114
+ initUI ( ) ;
115
+ }
116
+
117
+ // Startup boot log
93
118
function displayLine ( ) {
119
+ let bootScreen = document . getElementById ( "boot_screen" ) ;
120
+ let log = fs . readFileSync ( path . join ( __dirname , 'assets/misc/boot_log.txt' ) ) . toString ( ) . split ( '\n' ) ;
121
+
94
122
function isArchUser ( ) {
95
123
return require ( "os" ) . platform ( ) === "linux"
96
124
&& fs . existsSync ( "/etc/os-release" )
@@ -134,7 +162,7 @@ function displayLine() {
134
162
}
135
163
136
164
// Show "logo" and background grid
137
- resumeInit = ( ) => {
165
+ function resumeInit ( ) {
138
166
bootScreen . innerHTML = "" ;
139
167
setTimeout ( ( ) => {
140
168
document . body . setAttribute ( "class" , "" ) ;
@@ -155,28 +183,17 @@ resumeInit = () => {
155
183
title . setAttribute ( "style" , `border: 5px solid rgb(${ window . theme . r } , ${ window . theme . g } , ${ window . theme . b } );` ) ;
156
184
setTimeout ( ( ) => {
157
185
// Initiate graphical error display
158
- window . edexErrorsModals = [ ] ;
159
- window . onerror = ( msg , path , line , col , error ) => {
160
- let errorModal = new Modal ( {
161
- type : "error" ,
162
- title : error ,
163
- message : `${ msg } <br/> at ${ path } ${ line } :${ col } `
164
- } ) ;
165
- window . edexErrorsModals . push ( errorModal ) ;
166
-
167
- ipc . send ( "log" , "error" , `${ error } : ${ msg } ` ) ;
168
- ipc . send ( "log" , "debug" , `at ${ path } ${ line } :${ col } ` ) ;
169
- } ;
186
+ initGraphicalErrorHandling ( ) ;
170
187
document . getElementById ( "boot_screen" ) . remove ( ) ;
171
188
initUI ( ) ;
172
189
} , 1200 ) ;
173
190
} , 600 ) ;
174
191
} , 300 ) ;
175
192
} , 400 ) ;
176
- } ;
193
+ }
177
194
178
195
// Create the UI's html structure and initialize the terminal client and the keyboard
179
- initUI = ( ) => {
196
+ function initUI ( ) {
180
197
document . body . innerHTML += `<section class="mod_column" id="mod_column_left">
181
198
<h3 class="title"><p>PANEL</p><p>SYSTEM</p></h3>
182
199
</section>
@@ -223,10 +240,10 @@ initUI = () => {
223
240
} , 700 ) ;
224
241
} , 500 ) ;
225
242
} , 10 ) ;
226
- } ;
243
+ }
227
244
228
245
// Create the "mods" in each column
229
- initMods = ( ) => {
246
+ function initMods ( ) {
230
247
window . mods = { } ;
231
248
232
249
// Left column
@@ -263,9 +280,9 @@ initMods = () => {
263
280
i ++ ;
264
281
}
265
282
} , 500 ) ;
266
- } ;
283
+ }
267
284
268
- initGreeter = ( ) => {
285
+ function initGreeter ( ) {
269
286
let shellContainer = document . getElementById ( "main_shell" ) ;
270
287
let greeter = document . getElementById ( "main_shell_greeting" ) ;
271
288
@@ -326,7 +343,7 @@ initGreeter = () => {
326
343
} , 500 ) ;
327
344
} , 1100 ) ;
328
345
} ) ;
329
- } ;
346
+ }
330
347
331
348
window . themeChanger = ( theme ) => {
332
349
for ( let i = 1 ; i <= 4 ; i ++ ) {
0 commit comments