소스 검색

feat(virtual-background) Virtual background UI changes

j8
Tudor D. Pop 4 년 전
부모
커밋
b1833fddad
No account linked to committer's email address

+ 108
- 42
css/modals/virtual-background/_virtual-background.scss 파일 보기

1
 .virtual-background-dialog {
1
 .virtual-background-dialog {
2
+    max-height: 300px;
3
+    color: white;
2
     display: inline-grid;
4
     display: inline-grid;
3
-    grid-template-columns: auto auto auto auto auto auto auto auto;
4
-    max-width: 370px;
5
+    grid-template-columns: auto auto auto auto auto;
6
+    column-gap: 8px;
5
     cursor: pointer;
7
     cursor: pointer;
8
+    .thumbnail:hover, .blur:hover, .slight-blur:hover, .virtual-background-none:hover{
9
+        height: 56px;
10
+        width: 103px;
11
+        opacity: .5;
12
+        border: 2px solid #99bbf3;
13
+        @media (min-width: 432px) and (max-width: 632px) {
14
+            height: 56px;
15
+            width: 56px;
16
+        }
17
+    }
6
     .thumbnail {
18
     .thumbnail {
7
-        border-radius: 10px;
19
+        margin-top: 8px;
20
+        border-radius: 6px;
8
         object-fit: cover;
21
         object-fit: cover;
9
-        padding: 5px;
10
-        height: 40px;
11
-        width: 40px;
22
+        height: 60px;
23
+        width: 107px;
12
     }
24
     }
13
 
25
 
14
     .thumbnail:hover ~ .delete-image-icon {
26
     .thumbnail:hover ~ .delete-image-icon {
15
         display: block;
27
         display: block;
16
     }
28
     }
17
     .thumbnail-selected {
29
     .thumbnail-selected {
18
-        border-radius: 10px;
30
+        margin-top: 8px;
31
+        border-radius: 6px;
19
         object-fit: cover;
32
         object-fit: cover;
20
-        padding: 5px;
21
-        height: 40px;
22
-        width: 40px;
23
-        border: 2px solid #a4b8d1;
33
+        height: 60px;
34
+        width: 107px;
35
+        border: 2px solid #246FE5;
36
+    }
37
+    .blur{
38
+        box-shadow: inset 0 0 12px #000000;
39
+        margin-top: 8px;
40
+        background: #7E8287;
41
+        font-weight: bold;
42
+        height: 60px;
43
+        width: 107px;
44
+        border-radius: 6px;
45
+        text-align: center;
46
+        vertical-align: middle;
47
+        line-height: 60px;
24
     }
48
     }
25
     .blur-selected {
49
     .blur-selected {
26
-        border-radius: 10px;
27
-        border: 2px solid #a4b8d1;
50
+        box-shadow: inset 0 0 12px #000000;
51
+        margin-top: 8px;
52
+        background: #7E8287;
53
+        font-weight: bold;
54
+        height: 60px;
55
+        width: 107px;
56
+        border-radius: 6px;
57
+        border: 2px solid #246FE5;
58
+        text-align: center;
59
+        vertical-align: middle;
60
+        line-height: 60px;
61
+    }
62
+    .slight-blur{
63
+        box-shadow: inset 0 0 12px #000000;
64
+        margin-top: 8px;
65
+        background: #A4A4A4;
66
+        font-weight: bold;
67
+        height: 60px;
68
+        width: 107px;
69
+        border-radius: 6px;
70
+        text-align: center;
71
+        vertical-align: middle;
72
+        line-height: 60px;
73
+    }
74
+    .slight-blur-selected{
75
+        box-shadow: inset 0 0 12px #000000;
76
+        margin-top: 8px;
77
+        background: #A4A4A4;
78
+        font-weight: bold;
79
+        height: 60px;
80
+        width: 107px;
81
+        border-radius: 6px;
82
+        border: 2px solid #246FE5;
83
+        text-align: center;
84
+        vertical-align: middle;
85
+        line-height: 60px;
28
     }
86
     }
29
     .virtual-background-none {
87
     .virtual-background-none {
88
+        margin-top: 8px;
89
+        background: #525252;
30
         font-weight: bold;
90
         font-weight: bold;
31
-        padding: 5px;
32
-        height: 34px;
33
-        width: 34px;
34
-        border-radius: 10px;
35
-        border: 1px solid #a4b8d1;
91
+        height: 60px;
92
+        width: 107px;
93
+        border-radius: 6px;
36
         text-align: center;
94
         text-align: center;
37
         vertical-align: middle;
95
         vertical-align: middle;
38
-        line-height: 35px;
39
-        margin-right: 5px;
96
+        line-height: 60px;
40
     }
97
     }
41
     .none-selected {
98
     .none-selected {
99
+        margin-top: 8px;
100
+        background: #525252;
42
         font-weight: bold;
101
         font-weight: bold;
43
-        padding: 5px;
44
-        height: 34px;
45
-        width: 34px;
46
-        border-radius: 10px;
47
-        border: 2px solid #a4b8d1;
102
+        height: 60px;
103
+        width: 107px;
104
+        border-radius: 6px;
105
+        border: 2px solid #246FE5;
48
         text-align: center;
106
         text-align: center;
49
         vertical-align: middle;
107
         vertical-align: middle;
50
-        line-height: 35px;
51
-        margin-right: 5px;
108
+        line-height: 60px;
109
+    }
110
+    @media (min-width: 432px) and (max-width: 632px) {
111
+        font-size: 1.5vw;
112
+        .virtual-background-none, .thumbnail, .thumbnail-selected, .none-selected, .blur, .blur-selected, .slight-blur, .slight-blur-selected{
113
+            height: 60px;
114
+            width: 60px;
115
+        }
52
     }
116
     }
53
 }
117
 }
54
 
118
 
58
 .file-upload-btn {
122
 .file-upload-btn {
59
     display: none;
123
     display: none;
60
 }
124
 }
61
-.custom-file-upload {
62
-    font-size: x-large;
63
-    font-weight: bold;
64
-    display: inline-block;
65
-    padding: 4px;
66
-    height: 35px;
67
-    width: 35px;
68
-    border-radius: 10px;
69
-    border: 1px solid #a4b8d1;
70
-    text-align: center;
71
-    vertical-align: middle;
72
-    line-height: 35px;
73
-    margin-left: 5px;
125
+.file-upload-label{
126
+    font-size: 14px;
127
+    font-weight: 600;
128
+    line-height: 20px;
129
+    margin-bottom: 8px;
130
+    color: #669AEC;
131
+    display: inline-flex;
74
     cursor: pointer;
132
     cursor: pointer;
75
 }
133
 }
76
 
134
 
77
 .delete-image-icon {
135
 .delete-image-icon {
136
+    background: #3d3d3d;
78
     position: absolute;
137
     position: absolute;
79
     display: none;
138
     display: none;
80
-    left: 36;
81
-    bottom: 36;
139
+    left: 96;
140
+    bottom: 51;
141
+    @media (min-width: 432px) and (max-width: 632px) {
142
+        left: 51px
143
+    }
82
 }
144
 }
83
 .delete-image-icon:hover {
145
 .delete-image-icon:hover {
84
     display: block;
146
     display: block;
91
 .loading-content-text{
153
 .loading-content-text{
92
   margin-right: 15px;
154
   margin-right: 15px;
93
 }
155
 }
156
+
157
+.add-background{
158
+    margin-right: 8px;
159
+}

BIN
images/virtual-background/background-1.jpg 파일 보기


BIN
images/virtual-background/background-2.jpg 파일 보기


BIN
images/virtual-background/background-3.jpg 파일 보기


BIN
images/virtual-background/background-4.jpg 파일 보기


BIN
images/virtual-background/background-5.jpg 파일 보기


BIN
images/virtual-background/background-6.jpg 파일 보기


BIN
images/virtual-background/background-7.jpg 파일 보기


+ 2
- 2
lang/main.json 파일 보기

338
         "title": "Embed this meeting"
338
         "title": "Embed this meeting"
339
     },
339
     },
340
     "virtualBackground": {
340
     "virtualBackground": {
341
-        "title": "Backgrounds",
341
+        "title": "Virtual backgrounds",
342
         "blur": "Blur",
342
         "blur": "Blur",
343
         "slightBlur": "Slight Blur",
343
         "slightBlur": "Slight Blur",
344
         "removeBackground": "Remove background",
344
         "removeBackground": "Remove background",
345
-        "uploadImage": "Upload image",
345
+        "addBackground": "Add background",
346
         "pleaseWait": "Please wait...",
346
         "pleaseWait": "Please wait...",
347
         "none": "None"
347
         "none": "None"
348
     },
348
     },

+ 0
- 3
react/features/base/icons/svg/blur-background.svg 파일 보기

1
-<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2
-<path fill-rule="evenodd" clip-rule="evenodd" d="M8.25 4.58333C8.75626 4.58333 9.16667 4.17293 9.16667 3.66667C9.16667 3.16041 8.75626 2.75 8.25 2.75C7.74374 2.75 7.33333 3.16041 7.33333 3.66667C7.33333 4.17293 7.74374 4.58333 8.25 4.58333ZM8.25 10.0833C9.26252 10.0833 10.0833 9.26252 10.0833 8.25C10.0833 7.23748 9.26252 6.41667 8.25 6.41667C7.23748 6.41667 6.41667 7.23748 6.41667 8.25C6.41667 9.26252 7.23748 10.0833 8.25 10.0833ZM13.75 10.0833C14.7625 10.0833 15.5833 9.26252 15.5833 8.25C15.5833 7.23748 14.7625 6.41667 13.75 6.41667C12.7375 6.41667 11.9167 7.23748 11.9167 8.25C11.9167 9.26252 12.7375 10.0833 13.75 10.0833ZM10.0833 13.75C10.0833 14.7625 9.26252 15.5833 8.25 15.5833C7.23748 15.5833 6.41667 14.7625 6.41667 13.75C6.41667 12.7375 7.23748 11.9167 8.25 11.9167C9.26252 11.9167 10.0833 12.7375 10.0833 13.75ZM8.25 19.25C8.75626 19.25 9.16667 18.8396 9.16667 18.3333C9.16667 17.8271 8.75626 17.4167 8.25 17.4167C7.74374 17.4167 7.33333 17.8271 7.33333 18.3333C7.33333 18.8396 7.74374 19.25 8.25 19.25ZM14.6667 18.3333C14.6667 18.8396 14.2563 19.25 13.75 19.25C13.2437 19.25 12.8333 18.8396 12.8333 18.3333C12.8333 17.8271 13.2437 17.4167 13.75 17.4167C14.2563 17.4167 14.6667 17.8271 14.6667 18.3333ZM3.66667 14.6667C4.17293 14.6667 4.58333 14.2563 4.58333 13.75C4.58333 13.2437 4.17293 12.8333 3.66667 12.8333C3.16041 12.8333 2.75 13.2437 2.75 13.75C2.75 14.2563 3.16041 14.6667 3.66667 14.6667ZM4.58333 8.25C4.58333 8.75626 4.17293 9.16667 3.66667 9.16667C3.16041 9.16667 2.75 8.75626 2.75 8.25C2.75 7.74374 3.16041 7.33333 3.66667 7.33333C4.17293 7.33333 4.58333 7.74374 4.58333 8.25ZM18.3333 14.6667C18.8396 14.6667 19.25 14.2563 19.25 13.75C19.25 13.2437 18.8396 12.8333 18.3333 12.8333C17.8271 12.8333 17.4167 13.2437 17.4167 13.75C17.4167 14.2563 17.8271 14.6667 18.3333 14.6667ZM19.25 8.25C19.25 8.75626 18.8396 9.16667 18.3333 9.16667C17.8271 9.16667 17.4167 8.75626 17.4167 8.25C17.4167 7.74374 17.8271 7.33333 18.3333 7.33333C18.8396 7.33333 19.25 7.74374 19.25 8.25ZM14.6667 3.66667C14.6667 4.17293 14.2563 4.58333 13.75 4.58333C13.2437 4.58333 12.8333 4.17293 12.8333 3.66667C12.8333 3.16041 13.2437 2.75 13.75 2.75C14.2563 2.75 14.6667 3.16041 14.6667 3.66667ZM13.75 15.5833C14.7625 15.5833 15.5833 14.7625 15.5833 13.75C15.5833 12.7375 14.7625 11.9167 13.75 11.9167C12.7375 11.9167 11.9167 12.7375 11.9167 13.75C11.9167 14.7625 12.7375 15.5833 13.75 15.5833Z"/>
3
-</svg>

+ 3
- 0
react/features/base/icons/svg/close-small.svg 파일 보기

1
+<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
2
+<path fill-rule="evenodd" clip-rule="evenodd" d="M8.69136 8.00002L11.4568 5.23457C11.6477 5.04366 11.6477 4.73412 11.4568 4.54321C11.2659 4.3523 10.9564 4.3523 10.7654 4.54321L7.99999 7.30866L5.23454 4.54321C5.04363 4.3523 4.73409 4.3523 4.54318 4.54321C4.35227 4.73412 4.35227 5.04366 4.54318 5.23457L7.30863 8.00002L4.54318 10.7655C4.35227 10.9564 4.35227 11.2659 4.54318 11.4568C4.73409 11.6478 5.04363 11.6478 5.23454 11.4568L7.99999 8.69139L10.7654 11.4568C10.9564 11.6478 11.2659 11.6478 11.4568 11.4568C11.6477 11.2659 11.6477 10.9564 11.4568 10.7655L8.69136 8.00002Z" fill="white"/>
3
+</svg>

+ 2
- 1
react/features/base/icons/svg/index.js 파일 보기

14
 export { default as IconAudioOnly } from './visibility.svg';
14
 export { default as IconAudioOnly } from './visibility.svg';
15
 export { default as IconAudioOnlyOff } from './visibility-off.svg';
15
 export { default as IconAudioOnlyOff } from './visibility-off.svg';
16
 export { default as IconAudioRoute } from './volume.svg';
16
 export { default as IconAudioRoute } from './volume.svg';
17
-export { default as IconBlurBackground } from './blur-background.svg';
18
 export { default as IconPlusCalendar } from './calendar-plus.svg';
17
 export { default as IconPlusCalendar } from './calendar-plus.svg';
18
+export { default as IconPlusCircle } from './plus-circle.svg';
19
 export { default as IconCamera } from './camera.svg';
19
 export { default as IconCamera } from './camera.svg';
20
 export { default as IconCameraDisabled } from './camera-disabled.svg';
20
 export { default as IconCameraDisabled } from './camera-disabled.svg';
21
 export { default as IconCameraEmpty } from './camera-empty.svg';
21
 export { default as IconCameraEmpty } from './camera-empty.svg';
29
 export { default as IconClose } from './close.svg';
29
 export { default as IconClose } from './close.svg';
30
 export { default as IconCloseX } from './close-x.svg';
30
 export { default as IconCloseX } from './close-x.svg';
31
 export { default as IconClosedCaption } from './closed_caption.svg';
31
 export { default as IconClosedCaption } from './closed_caption.svg';
32
+export { default as IconCloseSmall } from './close-small.svg';
32
 export { default as IconCodeBlock } from './code-block.svg';
33
 export { default as IconCodeBlock } from './code-block.svg';
33
 export { default as IconConnectionActive } from './gsm-bars.svg';
34
 export { default as IconConnectionActive } from './gsm-bars.svg';
34
 export { default as IconConnectionInactive } from './ninja.svg';
35
 export { default as IconConnectionInactive } from './ninja.svg';

+ 3
- 0
react/features/base/icons/svg/plus-circle.svg 파일 보기

1
+<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
2
+<path fill-rule="evenodd" clip-rule="evenodd" d="M1.66666 9.99999C1.66666 14.6024 5.39762 18.3333 10 18.3333C14.6024 18.3333 18.3333 14.6024 18.3333 9.99999C18.3333 5.39762 14.6024 1.66666 10 1.66666C5.39762 1.66666 1.66666 5.39762 1.66666 9.99999ZM16.8182 9.99999C16.8182 13.7656 13.7656 16.8182 10 16.8182C6.23442 16.8182 3.18182 13.7656 3.18182 9.99999C3.18182 6.23441 6.23442 3.18181 10 3.18181C13.7656 3.18181 16.8182 6.23441 16.8182 9.99999ZM9.24242 10.7576V13.7879H10.7576V10.7576H13.7879V9.24241H10.7576V6.21211H9.24242V9.24241H6.21212V10.7576H9.24242Z" fill="#669AEC"/>
3
+</svg>

+ 47
- 51
react/features/virtual-background/components/VirtualBackgroundDialog.js 파일 보기

7
 
7
 
8
 import { Dialog } from '../../base/dialog';
8
 import { Dialog } from '../../base/dialog';
9
 import { translate } from '../../base/i18n';
9
 import { translate } from '../../base/i18n';
10
-import { Icon, IconBlurBackground, IconCancelSelection } from '../../base/icons';
10
+import { Icon, IconCloseSmall, IconPlusCircle } from '../../base/icons';
11
 import { connect } from '../../base/redux';
11
 import { connect } from '../../base/redux';
12
-import { Tooltip } from '../../base/tooltip';
13
 import { toggleBackgroundEffect } from '../actions';
12
 import { toggleBackgroundEffect } from '../actions';
14
 import { resizeImage, toDataURL } from '../functions';
13
 import { resizeImage, toDataURL } from '../functions';
15
 import logger from '../logger';
14
 import logger from '../logger';
34
     {
33
     {
35
         id: '4',
34
         id: '4',
36
         src: 'images/virtual-background/background-4.jpg'
35
         src: 'images/virtual-background/background-4.jpg'
36
+    },
37
+    {
38
+        id: '5',
39
+        src: 'images/virtual-background/background-5.jpg'
40
+    },
41
+    {
42
+        id: '6',
43
+        src: 'images/virtual-background/background-6.jpg'
44
+    },
45
+    {
46
+        id: '7',
47
+        src: 'images/virtual-background/background-7.jpg'
37
     }
48
     }
38
 ];
49
 ];
39
 type Props = {
50
 type Props = {
170
     return (
181
     return (
171
         <Dialog
182
         <Dialog
172
             hideCancelButton = { true }
183
             hideCancelButton = { true }
173
-            submitDisabled = { false }
184
+            submitDisabled = { true }
174
             titleKey = { 'virtualBackground.title' }
185
             titleKey = { 'virtualBackground.title' }
175
-            width = '450px'>
186
+            width = '640px'>
176
             {loading ? (
187
             {loading ? (
177
                 <div className = 'virtual-background-loading'>
188
                 <div className = 'virtual-background-loading'>
178
                     <span className = 'loading-content-text'>{t('virtualBackground.pleaseWait')}</span>
189
                     <span className = 'loading-content-text'>{t('virtualBackground.pleaseWait')}</span>
182
                 </div>
193
                 </div>
183
             ) : (
194
             ) : (
184
                 <div>
195
                 <div>
196
+                    <label
197
+                        className = 'file-upload-label'
198
+                        htmlFor = 'file-upload'>
199
+                        <Icon
200
+                            className = { 'add-background' }
201
+                            size = { 20 }
202
+                            src = { IconPlusCircle } />
203
+                        {t('virtualBackground.addBackground')}
204
+                    </label>
205
+                    <input
206
+                        accept = 'image/*'
207
+                        className = 'file-upload-btn'
208
+                        id = 'file-upload'
209
+                        onChange = { e => uploadImage(e.target.files) }
210
+                        type = 'file' />
185
                     <div className = 'virtual-background-dialog'>
211
                     <div className = 'virtual-background-dialog'>
186
-                        <Tooltip
187
-                            content = { t('virtualBackground.removeBackground') }
188
-                            position = { 'top' }>
189
-                            <div
190
-                                className = { _selectedThumbnail === 'none'
191
-                                    ? 'none-selected' : 'virtual-background-none' }
192
-                                onClick = { removeBackground }>
193
-                                {t('virtualBackground.none')}
194
-                            </div>
195
-                        </Tooltip>
196
-                        <Tooltip
197
-                            content = { t('virtualBackground.slightBlur') }
198
-                            position = { 'top' }>
199
-                            <Icon
200
-                                className = { _selectedThumbnail === 'slight-blur' ? 'blur-selected' : '' }
201
-                                onClick = { () => enableBlur(8, 'slight-blur') }
202
-                                size = { 50 }
203
-                                src = { IconBlurBackground } />
204
-                        </Tooltip>
205
-                        <Tooltip
206
-                            content = { t('virtualBackground.blur') }
207
-                            position = { 'top' }>
208
-                            <Icon
209
-                                className = { _selectedThumbnail === 'blur' ? 'blur-selected' : '' }
210
-                                onClick = { () => enableBlur(25, 'blur') }
211
-                                size = { 50 }
212
-                                src = { IconBlurBackground } />
213
-                        </Tooltip>
212
+                        <div
213
+                            className = { _selectedThumbnail === 'none' ? 'none-selected' : 'virtual-background-none' }
214
+                            onClick = { removeBackground }>
215
+                            {t('virtualBackground.none')}
216
+                        </div>
217
+                        <div
218
+                            className = { _selectedThumbnail === 'slight-blur'
219
+                                ? 'slight-blur-selected' : 'slight-blur' }
220
+                            onClick = { () => enableBlur(8, 'slight-blur') }>
221
+                            {t('virtualBackground.slightBlur')}
222
+                        </div>
223
+                        <div
224
+                            className = { _selectedThumbnail === 'blur' ? 'blur-selected' : 'blur' }
225
+                            onClick = { () => enableBlur(25, 'blur') }>
226
+                            {t('virtualBackground.blur')}
227
+                        </div>
214
                         {images.map((image, index) => (
228
                         {images.map((image, index) => (
215
                             <img
229
                             <img
216
                                 className = { _selectedThumbnail === image.id ? 'thumbnail-selected' : 'thumbnail' }
230
                                 className = { _selectedThumbnail === image.id ? 'thumbnail-selected' : 'thumbnail' }
219
                                 onError = { event => event.target.style.display = 'none' }
233
                                 onError = { event => event.target.style.display = 'none' }
220
                                 src = { image.src } />
234
                                 src = { image.src } />
221
                         ))}
235
                         ))}
222
-                        <Tooltip
223
-                            content = { t('virtualBackground.uploadImage') }
224
-                            position = { 'top' }>
225
-                            <label
226
-                                className = 'custom-file-upload'
227
-                                htmlFor = 'file-upload'>
228
-                                +
229
-                            </label>
230
-                            <input
231
-                                accept = 'image/*'
232
-                                className = 'file-upload-btn'
233
-                                id = 'file-upload'
234
-                                onChange = { e => uploadImage(e.target.files) }
235
-                                type = 'file' />
236
-                        </Tooltip>
237
-                    </div>
238
-
239
-                    <div className = 'virtual-background-dialog'>
240
                         {storedImages.map((image, index) => (
236
                         {storedImages.map((image, index) => (
241
                             <div
237
                             <div
242
                                 className = { 'thumbnail-container' }
238
                                 className = { 'thumbnail-container' }
250
                                     className = { 'delete-image-icon' }
246
                                     className = { 'delete-image-icon' }
251
                                     onClick = { () => deleteStoredImage(image) }
247
                                     onClick = { () => deleteStoredImage(image) }
252
                                     size = { 15 }
248
                                     size = { 15 }
253
-                                    src = { IconCancelSelection } />
249
+                                    src = { IconCloseSmall } />
254
                             </div>
250
                             </div>
255
                         ))}
251
                         ))}
256
                     </div>
252
                     </div>

Loading…
취소
저장