1
1
import React , { useState } from 'react' ;
2
2
import styled from 'styled-components' ;
3
- import { FaSyncAlt , FaTimesCircle } from 'react-icons/fa' ;
3
+ import { FaTimesCircle as DismissIcon } from 'react-icons/fa' ;
4
+ import { MdRefresh as RefreshIcon } from 'react-icons/md' ;
4
5
import { APP_NAME_FULL } from '../../../../shared/constants' ;
5
6
6
7
const UpdateNoticeContainer = styled . div `
7
- max-width: 560px ;
8
+ max-width: 360px ;
8
9
position: relative;
9
- background-color: #fff ;
10
- border: 1px solid #ffb74d ;
11
- padding: 8px 8px ;
12
- border-radius: 4px ;
10
+ border: 2px solid #ff8f34 ;
11
+ box-sizing: border-box ;
12
+ padding: 8px 16px ;
13
+ border-radius: 10px ;
13
14
color: #000;
14
- background-color: #fff3e0 ;
15
+ background-color: #fff ;
15
16
16
17
font-family: sans-serif;
17
18
text-align: center;
18
19
font-size: 14px;
19
20
font-weight: 400;
20
21
font-style: normal;
21
- box-shadow: 0 1px 6px 0 rgba(32, 33, 36, 0.28);
22
+ box-shadow: 0 4px 10px 0 rgb(0 0 0 / 20%), 0 4px 20px 0 rgb(0 0 0 / 19%);
23
+ line-height: 22px;
24
+
25
+ z-index: 999999999;
22
26
` ;
23
27
24
28
const ExtensionNameContainerSpan = styled . span `
25
- background-color: rgb(233, 115, 46 );
26
- color: #fff ;
27
- padding: 2px 4px ;
29
+ background-color: rgb(255, 196, 161 );
30
+ color: #000 ;
31
+ padding: 2px 6px ;
28
32
border-radius: 4px;
29
33
font-weight: 600;
30
34
` ;
@@ -42,12 +46,16 @@ const ActionButton = styled.div`
42
46
display: flex;
43
47
align-items: center;
44
48
transition: all 0.05s ease-in;
45
- padding: 2px 6px ;
49
+ padding: 4px 8px ;
46
50
border-radius: 4px;
47
51
52
+ text-decoration: underline;
53
+
48
54
&:hover {
49
- background-color: rgb(233, 115, 46);
50
- color: #fff;
55
+ background-color: ${ ( props ) =>
56
+ props . action === 'reload' ? '#198754' : 'gray' } ;
57
+ color: ${ ( props ) => ( props . action === 'reload' ? '#fff' : '#fff' ) } ;
58
+ text-decoration: none;
51
59
}
52
60
` ;
53
61
@@ -60,7 +68,7 @@ const UpdateNotice = () => {
60
68
< div
61
69
style = { {
62
70
position : 'fixed' ,
63
- bottom : 5 ,
71
+ bottom : 10 ,
64
72
left : 0 ,
65
73
right : 0 ,
66
74
display : 'flex' ,
@@ -78,21 +86,23 @@ const UpdateNotice = () => {
78
86
</ div >
79
87
< ActionButtonsContainer >
80
88
< ActionButton
89
+ action = { 'reload' }
81
90
onClick = { ( ) => {
82
91
localStorage . removeItem ( 'vt-update-notice-dismissed' ) ;
83
92
window . location . reload ( ) ;
84
93
} }
85
94
>
86
- < FaSyncAlt size = "12px " style = { { marginRight : '4px' } } />
95
+ < RefreshIcon size = "20px " style = { { marginRight : '4px' } } />
87
96
Refresh Now
88
97
</ ActionButton >
89
98
< ActionButton
99
+ action = { 'dismiss' }
90
100
onClick = { ( ) => {
91
101
localStorage . setItem ( 'vt-update-notice-dismissed' , 'true' ) ;
92
102
setShouldDisplay ( false ) ;
93
103
} }
94
104
>
95
- < FaTimesCircle size = "12px " style = { { marginRight : '4px' } } />
105
+ < DismissIcon size = "16px " style = { { marginRight : '4px' } } />
96
106
Dismiss
97
107
</ ActionButton >
98
108
</ ActionButtonsContainer >
0 commit comments