소스 검색

Update logo

As part of the logo update, make the state-in-logo-dot visualization
configurable.
Danilo Bargen 6 년 전
부모
커밋
b2c1cd54df
5개의 변경된 파일30개의 추가작업 그리고 21개의 파일을 삭제
  1. 4 17
      public/img/logo.svg
  2. 2 0
      src/config.ts
  3. 16 1
      src/controllers/status.ts
  4. 7 3
      src/sass/sections/_status_bar.scss
  5. 1 0
      src/threema.d.ts

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 4 - 17
public/img/logo.svg


+ 2 - 0
src/config.ts

@@ -73,5 +73,7 @@ export default {
     MSGPACK_LOG_TRACE: false,
     // Transport log level
     TRANSPORT_LOG_LEVEL: 'warn',
+    // Always show the real connection state using the dot in the logo
+    VISUALIZE_STATE: true,
 
 } as threema.Config;

+ 16 - 1
src/controllers/status.ts

@@ -39,6 +39,9 @@ export class StatusController {
     // Logging
     private readonly log: Logger;
 
+    // Config
+    private config: threema.Config;
+
     // State variable
     private state = GlobalConnectionState.Error;
     private unreadCount = 0;
@@ -63,15 +66,20 @@ export class StatusController {
 
     public static $inject = [
         '$scope', '$timeout', '$state',
+        'CONFIG',
         'ControllerService', 'StateService', 'LogService', 'TimeoutService', 'WebClientService',
     ];
     constructor($scope, $timeout: ng.ITimeoutService, $state: UiStateService,
+                config: threema.Config,
                 controllerService: ControllerService, stateService: StateService, logService: LogService,
                 timeoutService: TimeoutService, webClientService: WebClientService) {
 
         // Logging
         this.log = logService.getLogger('Status-C', 'color: #000; background-color: #ffff99');
 
+        // Config
+        this.config = config;
+
         // Angular services
         this.$timeout = $timeout;
         this.$state = $state;
@@ -101,7 +109,14 @@ export class StatusController {
      * Return the prefixed status.
      */
     public get statusClass(): string {
-        return 'status-task-' + this.webClientService.chosenTask + ' status-' + this.state;
+        const classes = [
+            `status-task-${this.webClientService.chosenTask}`,
+            `status-${this.state}`,
+        ];
+        if (this.config.VISUALIZE_STATE) {
+            classes.push(`visualize-state`);
+        }
+        return classes.join(' ');
     }
 
     /**

+ 7 - 3
src/sass/sections/_status_bar.scss

@@ -49,12 +49,16 @@ body {
     }
 }
 
+#title .dot {
+    fill: white;
+}
+
 .status-ok {
     #status-bar {
         background-color: $status-ok;
     }
 
-    #title .dot {
+    &.visualize-state #title .dot {
         fill: $status-ok;
     }
 }
@@ -64,7 +68,7 @@ body {
         background-color: $status-warning;
     }
 
-    #title .dot {
+    &.visualize-state #title .dot {
         fill: $status-warning;
     }
 }
@@ -74,7 +78,7 @@ body {
         background-color: $status-error;
     }
 
-    #title .dot {
+    &.visualize-state #title .dot {
         fill: $status-error;
     }
 }

+ 1 - 0
src/threema.d.ts

@@ -688,6 +688,7 @@ declare namespace threema {
         ARP_LOG_TRACE: boolean;
         MSGPACK_LOG_TRACE: boolean;
         TRANSPORT_LOG_LEVEL: LogLevel;
+        VISUALIZE_STATE: boolean;
     }
 
     interface InitialConversationData {

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.