Selaa lähdekoodia

Merge pull request #1091 from BeatC/customer-agreement

Customer agreement
master
Дамян Минков 8 vuotta sitten
vanhempi
commit
a9c984e7db

+ 29
- 0
css/_inlay.scss Näytä tiedosto

@@ -0,0 +1,29 @@
1
+.inlay {
2
+    margin-top: 14%;
3
+    @include border-radius(3px);
4
+    padding: 40px 38px 44px;
5
+    color: #fff;
6
+    background: lighten(desaturate($defaultBackground, 70%), 20%);
7
+    text-align: center;
8
+
9
+    &__title {
10
+        margin: 12px 0;
11
+        padding-bottom: 17px;
12
+        color: $popoverFontColor;
13
+        font-size: 21px;
14
+        letter-spacing: 0.3px;
15
+        border-bottom: 1px solid $auiBorderColor;
16
+    }
17
+
18
+    &__text {
19
+        color: $popoverFontColor;
20
+        display: block;
21
+        margin-top: 22px;
22
+        font-size: 16px;
23
+    }
24
+
25
+    &__icon {
26
+        margin: 0 10px;
27
+        font-size: 50px;
28
+    }
29
+}

+ 15
- 0
css/_policy.scss Näytä tiedosto

@@ -0,0 +1,15 @@
1
+.policy {
2
+    &__logo {
3
+        display: block;
4
+        width: 200px;
5
+        height: 50px;
6
+        margin: 30px auto 0;
7
+    }
8
+
9
+    &__text {
10
+        text-align: center;
11
+        font-size: 14px;
12
+        line-height: 21px;
13
+        font-weight: 300;
14
+    }
15
+}

+ 2
- 1
css/_variables.scss Näytä tiedosto

@@ -1,3 +1,5 @@
1
+@import "themes/light";
2
+
1 3
 /**
2 4
  * Style variables
3 5
  */
@@ -23,7 +25,6 @@ $defaultColor: #F1F1F1;
23 25
 $defaultSideBarFontColor: #44A5FF;
24 26
 $defaultSemiDarkColor: #ACACAC;
25 27
 $defaultDarkColor: #2b3d5c;
26
-$defaultBackground: #474747;
27 28
 $tooltipBg: rgba(0,0,0, 0.7);
28 29
 
29 30
 /**

+ 2
- 4
css/main.scss Näytä tiedosto

@@ -29,15 +29,12 @@
29 29
 
30 30
 /* Fonts END */
31 31
 
32
-/* Theme  BEGIN */
33
-@import "themes/main";
34
-/* Theme END */
35
-
36 32
 /* Modules BEGIN */
37 33
 
38 34
 @import 'toastr';
39 35
 @import 'base';
40 36
 @import 'overlay/overlay';
37
+@import 'inlay';
41 38
 @import 'reload_overlay/reload_overlay';
42 39
 @import 'modals/dialog';
43 40
 @import 'modals/feedback/feedback';
@@ -65,5 +62,6 @@
65 62
 @import "connection-info";
66 63
 @import 'aui-components/dropdown';
67 64
 @import '404';
65
+@import 'policy';
68 66
 
69 67
 /* Modules END */

+ 28
- 27
css/overlay/_overlay.scss Näytä tiedosto

@@ -1,30 +1,31 @@
1
-.overlay_container {
2
-    top: 0;
3
-    left: 0;
4
-    width: 100%;
5
-    height: 100%;
6
-    position: fixed;
7
-    z-index: $overlayZ;
8
-    background: rgba(22, 185, 252, .9);
9
-}
1
+.overlay {
2
+    &__container {
3
+        top: 0;
4
+        left: 0;
5
+        width: 100%;
6
+        height: 100%;
7
+        position: fixed;
8
+        z-index: $overlayZ;
9
+        background: $defaultBackground;
10
+    }
10 11
 
11
-.overlay_content {
12
-    color: #fff;
13
-    text-align: center;
14
-    width: 400px;
15
-    height: 250px;
16
-    top: 50%;
17
-    left: 50%;
18
-    position: absolute;
19
-    margin-top: -125px;
20
-    margin-left: -200px;
21
-}
12
+    &__content {
13
+        position: absolute;
14
+        margin: 0 auto;
15
+        height: 100%;
16
+        width: 56%;
17
+        left: 50%;
18
+        @include transform(translateX(-50%));
22 19
 
23
-.overlay_text_small {
24
-    display: block;
25
-    font-size: 18px;
26
-}
20
+        &_bottom {
21
+            position: absolute;
22
+            bottom: 0;
23
+        }
24
+    }
27 25
 
28
-.overlay_icon {
29
-    font-size: 100px;
30
-}
26
+    &__policy {
27
+        position: absolute;
28
+        bottom: 24px;
29
+        width: 100%;
30
+    }
31
+}

+ 5
- 0
css/themes/_light.scss Näytä tiedosto

@@ -22,6 +22,11 @@ $primaryButtonFontWeight: 400;
22 22
 
23 23
 $buttonShadowColor: #192d4f;
24 24
 
25
+/**
26
+* Color variables
27
+**/
28
+$defaultBackground: #474747;
29
+
25 30
 /**
26 31
 * Connection indicator
27 32
 **/

+ 0
- 5
css/themes/_main.scss Näytä tiedosto

@@ -1,5 +0,0 @@
1
-/**
2
-* Switch themes here
3
-*/
4
-
5
-@import "light";

+ 2
- 1
interface_config.js Näytä tiedosto

@@ -69,5 +69,6 @@ var interfaceConfig = { // eslint-disable-line no-unused-vars
69 69
     // disables the ringing sound when the RingOverlay is shown.
70 70
     DISABLE_RINGING: false,
71 71
     AUDIO_LEVEL_PRIMARY_COLOR: "rgba(255,255,255,0.4)",
72
-    AUDIO_LEVEL_SECONDARY_COLOR: "rgba(255,255,255,0.2)"
72
+    AUDIO_LEVEL_SECONDARY_COLOR: "rgba(255,255,255,0.2)",
73
+    POLICY_LOGO: null
73 74
 };

+ 4
- 0
lang/main.json Näytä tiedosto

@@ -75,6 +75,10 @@
75 75
             "content": "Learn about your users through easy integration with Piwik, Google Analytics, and other usage monitoring and statistics systems."
76 76
         }
77 77
     },
78
+    "startupoverlay": {
79
+        "policyText": " ",
80
+        "title": "__app__ needs to use your microphone and camera."
81
+    },
78 82
     "toolbar": {
79 83
         "mute": "Mute / Unmute",
80 84
         "videomute": "Start / Stop camera",

+ 28
- 6
modules/UI/gum_overlay/UserMediaPermissionsGuidanceOverlay.js Näytä tiedosto

@@ -1,4 +1,4 @@
1
-/* global */
1
+/* global interfaceConfig */
2 2
 
3 3
 import Overlay from '../overlay/Overlay';
4 4
 
@@ -22,11 +22,33 @@ class GUMOverlayImpl extends Overlay {
22 22
      * @inheritDoc
23 23
      */
24 24
     _buildOverlayContent() {
25
-        return `
26
-            <span class="overlay_icon icon-microphone"></span>
27
-            <span class="overlay_icon icon-camera"></span>
28
-            <span data-i18n='[html]userMedia.${this.browser}GrantPermissions' 
29
-                  class='overlay_text_small'></span>`;
25
+        let textKey = `userMedia.${this.browser}GrantPermissions`;
26
+        let titleKey = 'startupoverlay.title';
27
+        let titleOptions = '{ "postProcess": "resolveAppName" }';
28
+        let policyTextKey = 'startupoverlay.policyText';
29
+        let policyLogo = '';
30
+        let policyLogoSrc = interfaceConfig.POLICY_LOGO;
31
+        if (policyLogoSrc) {
32
+            policyLogo += (
33
+                `<div class="policy__logo">
34
+                    <img src="${policyLogoSrc}"/>
35
+                </div>`
36
+            );
37
+        }
38
+
39
+        return (
40
+            `<div class="inlay">
41
+                <span class="inlay__icon icon-microphone"></span>
42
+                <span class="inlay__icon icon-camera"></span>
43
+                <h3 class="inlay__title" data-i18n="${titleKey}"
44
+                    data-i18n-options='${titleOptions}'></h3>
45
+                <span class='inlay__text'data-i18n='[html]${textKey}'></span>
46
+            </div>
47
+            <div class="policy overlay__policy">
48
+                <p class="policy__text" data-i18n="[html]${policyTextKey}"></p>
49
+                ${policyLogo}
50
+            </div>`
51
+        );
30 52
     }
31 53
 }
32 54
 

+ 2
- 2
modules/UI/overlay/Overlay.js Näytä tiedosto

@@ -34,8 +34,8 @@ export default class Overlay{
34 34
         let overlayContent = this._buildOverlayContent();
35 35
 
36 36
         this.$overlay = $(`
37
-            <div class='overlay_container'>
38
-                <div class='overlay_content'>
37
+            <div class='overlay__container'>
38
+                <div class='overlay__content'>
39 39
                     ${overlayContent}
40 40
                 </div>
41 41
             </div>`);

Loading…
Peruuta
Tallenna