This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree 9 files changed +67
-11
lines changed
9 files changed +67
-11
lines changed Original file line number Diff line number Diff line change 5
5
@import " ./_font-weights.scss" ;
6
6
@import " ./_spacing.scss" ;
7
7
@import " ./components/views/beacon/_LeftPanelLiveShareWarning.scss" ;
8
+ @import " ./components/views/beacon/_StyledLiveBeaconIcon.scss" ;
8
9
@import " ./components/views/location/_LiveDurationDropdown.scss" ;
9
10
@import " ./components/views/location/_LocationShareMenu.scss" ;
10
11
@import " ./components/views/location/_MapError.scss" ;
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2022 The Matrix.org Foundation C.I.C.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */
16
+
17
+ .mx_StyledLiveBeaconIcon {
18
+ flex-grow : 0 ;
19
+ flex-shrink : 0 ;
20
+ box-sizing : border-box ;
21
+ border-width : 2px ;
22
+ border-style : solid ;
23
+ border-radius : 50% ;
24
+
25
+ background-color : $location-live-color ;
26
+ border-color : $location-live-secondary-color ;
27
+ padding : 2px ;
28
+ // colors icon
29
+ color : white ;
30
+ }
Original file line number Diff line number Diff line change @@ -83,19 +83,12 @@ limitations under the License.
83
83
border-style : solid ;
84
84
border-radius : 50% ;
85
85
86
+ // Live is styled by StyledLiveBeaconIcon
87
+
86
88
& .Own {
87
89
border-color : $accent ;
88
90
}
89
91
90
- & .Live {
91
- background-color : $location-live-color ;
92
- // 20% brightness $location-live-color
93
- border-color : #deddfd ;
94
- padding : 2px ;
95
- // colors icon
96
- color : white ;
97
- }
98
-
99
92
& .Pin {
100
93
border-color : $accent ;
101
94
background-color : $accent ;
Original file line number Diff line number Diff line change @@ -185,6 +185,7 @@ $video-feed-secondary-background: $system;
185
185
// Location sharing
186
186
// ********************
187
187
$location-live-color : #5c56f5 ;
188
+ $location-live-secondary-color : #deddfd ;
188
189
// ********************
189
190
190
191
// Location sharing
Original file line number Diff line number Diff line change @@ -192,6 +192,7 @@ $eventbubble-reply-color: #C1C6CD;
192
192
// ********************
193
193
$location-marker-color : #ffffff ;
194
194
$location-live-color : #5c56f5 ;
195
+ $location-live-secondary-color : #deddfd ;
195
196
// ********************
196
197
197
198
// ***** Mixins! *****
Original file line number Diff line number Diff line change @@ -288,6 +288,7 @@ $groupFilterPanel-divider-color: $tertiary-content;
288
288
// ********************
289
289
$location-marker-color : #ffffff ;
290
290
$location-live-color : #5c56f5 ;
291
+ $location-live-secondary-color : #deddfd ;
291
292
// ********************
292
293
293
294
// ***** Mixins! *****
Original file line number Diff line number Diff line change @@ -302,6 +302,7 @@ $copy-button-url: "$(res)/img/feather-customised/clipboard.svg";
302
302
// ********************
303
303
$location-marker-color : #ffffff ;
304
304
$location-live-color : #5c56f5 ;
305
+ $location-live-secondary-color : #deddfd ;
305
306
// ********************
306
307
307
308
// Mixins
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2022 The Matrix.org Foundation C.I.C.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */
16
+
17
+ import React from 'react' ;
18
+ import classNames from 'classnames' ;
19
+
20
+ import { Icon as LiveLocationIcon } from '../../../../res/img/location/live-location.svg' ;
21
+
22
+ const StyledLiveBeaconIcon : React . FC < React . SVGProps < SVGSVGElement > > = ( { className, ...props } ) =>
23
+ < LiveLocationIcon
24
+ { ...props }
25
+ className = { classNames ( 'mx_StyledLiveBeaconIcon' , className ) }
26
+ /> ;
27
+
28
+ export default StyledLiveBeaconIcon ;
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ import BaseAvatar from '../avatars/BaseAvatar';
23
23
import AccessibleButton from '../elements/AccessibleButton' ;
24
24
import Heading from '../typography/Heading' ;
25
25
import { Icon as LocationIcon } from '../../../../res/img/element-icons/location.svg' ;
26
- import { Icon as LiveLocationIcon } from '../../../../res/img/location/live-location.svg' ;
27
26
import { LocationShareType } from './shareLocation' ;
27
+ import StyledLiveBeaconIcon from '../beacon/StyledLiveBeaconIcon' ;
28
28
29
29
const UserAvatar = ( ) => {
30
30
const matrixClient = useContext ( MatrixClientContext ) ;
@@ -59,7 +59,7 @@ const ShareTypeOption: React.FC<ShareTypeOptionProps> = ({
59
59
{ shareType === LocationShareType . Pin &&
60
60
< LocationIcon className = { `mx_ShareType_option-icon ${ LocationShareType . Pin } ` } /> }
61
61
{ shareType === LocationShareType . Live &&
62
- < LiveLocationIcon className = { `mx_ShareType_option-icon ${ LocationShareType . Live } ` } /> }
62
+ < StyledLiveBeaconIcon className = { `mx_ShareType_option-icon ${ LocationShareType . Live } ` } /> }
63
63
64
64
{ label }
65
65
</ AccessibleButton > ;
You can’t perform that action at this time.
0 commit comments