diff --git a/package.json b/package.json index 460e6dc3..41afc627 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "dtsgen": "node tools/dtsgen/index.js", "trgen": "node tools/trgen/index.js", "tsc": "tsc", + "compile-scss": "sass loader/css/index.scss:loader/css/index.css", "start": "npm run compile-project-base && node file.js ndevelop", "build-web": "webpack --config webpack-web.config.js", "build-client": "webpack --config webpack-client.config.js", diff --git a/scripts/build.sh b/scripts/build.sh index cc4e3aec..780b0a41 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -49,6 +49,13 @@ if [[ $_exit_code -ne 0 ]]; then exit 1 fi +echo "Generating style files" +npm run compile-scss; _exit_code=$? +if [[ $_exit_code -ne 0 ]]; then + echo "Failed to generate style files" + exit 1 +fi + if [[ "$build_type" == "release" ]]; then # Compile everything for release mode NODE_ENV=production npm run build-$build_target; _exit_code=$? if [[ $_exit_code -ne 0 ]]; then diff --git a/shared/js/main.tsx b/shared/js/main.tsx index f4da9344..174a8a7a 100644 --- a/shared/js/main.tsx +++ b/shared/js/main.tsx @@ -127,7 +127,7 @@ function setup_jsrender() : boolean { if(!$.templates(_entry.id, _entry.innerHTML)) { log.error(LogCategory.GENERAL, tr("Failed to setup cache for js renderer template %s!"), _entry.id); } else - log.info(LogCategory.GENERAL, tr("Successfully loaded jsrender template %s"), _entry.id); + log.trace(LogCategory.GENERAL, tr("Successfully loaded jsrender template %s"), _entry.id); }); return true; } @@ -595,6 +595,9 @@ const task_connect_handler: loader.Task = { const task_certificate_callback: loader.Task = { name: "certificate accept tester", function: async () => { + /* + This is not needed any more. If we would use the certificate accept stuff, we would have an extra loader target. + I'm just keeping this, so later I've not to to any work, writing this, again. const certificate_accept = settings.static_global(Settings.KEY_CERTIFICATE_CALLBACK, undefined); if(certificate_accept) { log.info(LogCategory.IPC, tr("Using this instance as certificate callback. ID: %s"), certificate_accept); @@ -620,12 +623,9 @@ const task_certificate_callback: loader.Task = { } }, 1000); - const message = - "You've successfully accepted the certificate.{:br:}" + - "This page will close in {0} seconds."; createInfoModal( tr("Certificate acccepted successfully"), - formatMessage(/* @tr-ignore */ tr(message), seconds_tag), + formatMessage(tr("You've successfully accepted the certificate.{:br:}This page will close in {0} seconds."), seconds_tag), { closeable: false, footer: undefined @@ -638,7 +638,7 @@ const task_certificate_callback: loader.Task = { } else { log.info(LogCategory.IPC, tr("We're not used to accept certificated. Booting app.")); } - + */ loader.register_task(loader.Stage.LOADED, task_connect_handler); }, priority: 10 diff --git a/shared/js/stats.ts b/shared/js/stats.ts index 3d20c9ce..42931f3e 100644 --- a/shared/js/stats.ts +++ b/shared/js/stats.ts @@ -120,7 +120,7 @@ namespace connection { if(connection_copy !== connection) return; if(current_config.verbose) - log.info(LogCategory.STATISTICS, tr("Successfully connected to server. Initializing session.")); + log.debug(LogCategory.STATISTICS, tr("Successfully connected to server. Initializing session.")); connection_state = ConnectionState.INITIALIZING; initialize_session(); @@ -141,7 +141,7 @@ namespace connection { if(typeof(event.data) !== 'string') { if(current_config.verbose) - log.info(LogCategory.STATISTICS, tr("Received an message which isn't a string. Event object: %o"), event); + log.warn(LogCategory.STATISTICS, tr("Received an message which isn't a string. Event object: %o"), event); return; } @@ -212,7 +212,7 @@ namespace connection { if(typeof(handler[type]) === 'function') { if(current_config.verbose) - log.debug(LogCategory.STATISTICS, tr("Handling message of type %s"), type); + log.trace(LogCategory.STATISTICS, tr("Handling message of type %s"), type); handler[type](data); } else if(current_config.verbose) { log.warn(LogCategory.STATISTICS, tr("Received message with an unknown type (%s). Dropping message. Full message: %o"), type, data_object); diff --git a/web/app/audio/player.ts b/web/app/audio/player.ts index a929e0e5..7b9da3a9 100644 --- a/web/app/audio/player.ts +++ b/web/app/audio/player.ts @@ -43,7 +43,7 @@ export function initialized() : boolean { } function fire_initialized() { - log.info(LogCategory.AUDIO, tr("File initialized for %d listeners"), _initialized_listener.length); + log.info(LogCategory.AUDIO, tr("Fire audio player initialized for %d listeners"), _initialized_listener.length); while(_initialized_listener.length > 0) _initialized_listener.pop_front()(); } diff --git a/web/app/voice/VoiceHandler.ts b/web/app/voice/VoiceHandler.ts index 11bb969d..beab8f33 100644 --- a/web/app/voice/VoiceHandler.ts +++ b/web/app/voice/VoiceHandler.ts @@ -44,7 +44,7 @@ export namespace codec { const dummy_client_id = 0xFFEF; this.ownCodec(dummy_client_id, _ => {}).then(codec => { - log.info(LogCategory.VOICE, tr("Release again! (%o)"), codec); + log.trace(LogCategory.VOICE, tr("Releasing codec instance (%o)"), codec); this.releaseCodec(dummy_client_id); }).catch(error => { if(this._supported) { diff --git a/web/app/workers/codec/CodecWorker.ts b/web/app/workers/codec/CodecWorker.ts index 5ea2ba7d..bffc57ba 100644 --- a/web/app/workers/codec/CodecWorker.ts +++ b/web/app/workers/codec/CodecWorker.ts @@ -110,7 +110,7 @@ registerCommandHandler("global-initialize", async () => { }); registerCommandHandler("initialise", async data => { - console.log(prefix + "Initialize for codec %s", CodecType[data.type as CodecType]); + console.log(prefix + "Initialize codec worker for codec %s", CodecType[data.type as CodecType]); if(!supported_types[data.type]) throw "type unsupported";