@@ -3,88 +3,36 @@ import { Portal } from 'react-portal';
3
3
4
4
import { Close } from './Icon' ;
5
5
import { useAppDispatch , useAppSelector } from './hooks' ;
6
- import { swapTheme } from './reducers/configuration' ;
7
- import { seenDarkMode , seenRustSurvey2023 } from './reducers/notifications' ;
6
+ import { seenRustSurvey2024 } from './reducers/notifications' ;
8
7
import { allowLongRun , wsExecuteKillCurrent } from './reducers/output/execute' ;
9
8
import * as selectors from './selectors' ;
10
- import { Theme } from './types' ;
11
9
12
10
import * as styles from './Notifications.module.css' ;
13
11
14
- const SURVEY_URL = 'https://blog.rust-lang.org/2023 /12/18/ survey-launch.html' ;
12
+ const SURVEY_URL = 'https://blog.rust-lang.org/2024 /12/05/annual- survey-2024 -launch.html' ;
15
13
16
14
const Notifications : React . FC = ( ) => {
17
15
return (
18
16
< Portal >
19
17
< div className = { styles . container } >
20
- < DarkModeNotification />
21
- < RustSurvey2023Notification />
18
+ < RustSurvey2024Notification />
22
19
< ExcessiveExecutionNotification />
23
20
</ div >
24
21
</ Portal >
25
22
) ;
26
23
} ;
27
24
28
- const DarkModeNotification : React . FC = ( ) => {
29
- const showIt = useAppSelector ( selectors . showDarkModeSelector ) ;
25
+ const RustSurvey2024Notification : React . FC = ( ) => {
26
+ const showIt = useAppSelector ( selectors . showRustSurvey2024Selector ) ;
30
27
31
28
const dispatch = useAppDispatch ( ) ;
32
- const seenIt = useCallback ( ( ) => dispatch ( seenDarkMode ( ) ) , [ dispatch ] ) ;
33
- const swapToLight = useCallback ( ( ) => dispatch ( swapTheme ( Theme . Light ) ) , [ dispatch ] ) ;
34
- const swapToDark = useCallback ( ( ) => dispatch ( swapTheme ( Theme . Dark ) ) , [ dispatch ] ) ;
35
- const swapToSystem = useCallback ( ( ) => dispatch ( swapTheme ( Theme . System ) ) , [ dispatch ] ) ;
36
-
37
- return showIt ? (
38
- < Notification onClose = { seenIt } >
39
- < p > The playground now has a dark mode! Sample the themes here:</ p >
40
-
41
- < table >
42
- < tr >
43
- < th >
44
- < button className = { styles . swapTheme } onClick = { swapToSystem } >
45
- System
46
- </ button >
47
- </ th >
48
- < td > Use your system's preference</ td >
49
- </ tr >
50
-
51
- < tr >
52
- < th >
53
- < button className = { styles . swapTheme } onClick = { swapToLight } >
54
- Light
55
- </ button >
56
- </ th >
57
- < td > The classic playground style</ td >
58
- </ tr >
59
-
60
- < tr >
61
- < th >
62
- < button className = { styles . swapTheme } onClick = { swapToDark } >
63
- Dark
64
- </ button >
65
- </ th >
66
- < td > Reduce the number of photons hitting your eyeballs</ td >
67
- </ tr >
68
- </ table >
69
-
70
- < p >
71
- You can change the current UI theme (and the editor's theme) in the configuration menu.
72
- </ p >
73
- </ Notification >
74
- ) : null ;
75
- } ;
76
-
77
- const RustSurvey2023Notification : React . FC = ( ) => {
78
- const showIt = useAppSelector ( selectors . showRustSurvey2023Selector ) ;
79
-
80
- const dispatch = useAppDispatch ( ) ;
81
- const seenIt = useCallback ( ( ) => dispatch ( seenRustSurvey2023 ( ) ) , [ dispatch ] ) ;
29
+ const seenIt = useCallback ( ( ) => dispatch ( seenRustSurvey2024 ( ) ) , [ dispatch ] ) ;
82
30
83
31
return showIt ? (
84
32
< Notification onClose = { seenIt } >
85
33
Please help us take a look at who the Rust community is composed of, how the Rust project is
86
34
doing, and how we can improve the Rust programming experience by completing the{ ' ' }
87
- < a href = { SURVEY_URL } > 2023 State of Rust Survey</ a > . Whether or not you use Rust today, we want
35
+ < a href = { SURVEY_URL } > 2024 State of Rust Survey</ a > . Whether or not you use Rust today, we want
88
36
to know your opinions.
89
37
</ Notification >
90
38
) : null ;
0 commit comments