@@ -175,7 +175,7 @@ pub fn settings_page(config: Config) -> Element<'static, Message> {
175175 } )
176176 . into ( ) ,
177177 radio (
178- "Frequently Used " ,
178+ "Frequents " ,
179179 MainPage :: FrequentlyUsed ,
180180 Some ( config. main_page ) ,
181181 |page| Message :: SetConfig ( SetConfigFields :: SetPage ( page) ) ,
@@ -185,6 +185,14 @@ pub fn settings_page(config: Config) -> Element<'static, Message> {
185185 move |_, _| settings_radio_button_style ( & theme_clone. clone ( ) )
186186 } )
187187 . into ( ) ,
188+ radio ( "Events" , MainPage :: Events , Some ( config. main_page ) , |page| {
189+ Message :: SetConfig ( SetConfigFields :: SetPage ( page) )
190+ } )
191+ . style ( {
192+ let theme_clone = theme_clone. clone ( ) ;
193+ move |_, _| settings_radio_button_style ( & theme_clone. clone ( ) )
194+ } )
195+ . into ( ) ,
188196 radio ( "Nothing" , MainPage :: Blank , Some ( config. main_page ) , |page| {
189197 Message :: SetConfig ( SetConfigFields :: SetPage ( page) )
190198 } )
@@ -277,6 +285,23 @@ pub fn settings_page(config: Config) -> Element<'static, Message> {
277285 notice_item ( theme. clone ( ) , "What font rustcast should use" ) ,
278286 ] ) ;
279287
288+ let theme_clone = theme. clone ( ) ;
289+ let event_duration = settings_item_column ( [
290+ settings_hint_text ( theme. clone ( ) , "Set Event duration" ) ,
291+ text_input ( "Event duration" , & config. event_duration . to_string ( ) )
292+ . on_input ( move |input : String | {
293+ Message :: SetConfig ( SetConfigFields :: SetEventDuration ( input) )
294+ } )
295+ . on_submit ( Message :: WriteConfig ( false ) )
296+ . width ( Length :: Fill )
297+ . style ( move |_, _| settings_text_input_item_style ( & theme_clone) )
298+ . into ( ) ,
299+ notice_item (
300+ theme. clone ( ) ,
301+ "How many minutes from now the events should be displayed" ,
302+ ) ,
303+ ] ) ;
304+
280305 let theme_clone = theme. clone ( ) ;
281306 let theme_clone_1 = theme. clone ( ) ;
282307 let theme_clone_2 = theme. clone ( ) ;
@@ -431,6 +456,7 @@ pub fn settings_page(config: Config) -> Element<'static, Message> {
431456 clear_on_enter. into ( ) ,
432457 show_icons. into ( ) ,
433458 font_family. into ( ) ,
459+ event_duration. into ( ) ,
434460 text_clr. into ( ) ,
435461 bg_clr. into ( ) ,
436462 settings_hint_text ( theme. clone ( ) , "Aliases" ) ,
0 commit comments