1111
1212def main (page : ft .Page ) -> None :
1313 page .title = 'PyOllaMx'
14- page .theme_mode = 'dark '
14+ page .theme_mode = 'light '
1515 page .scroll = ft .ScrollMode .ADAPTIVE
1616 #page.bgcolor = '#C7F9D6'
1717 page .window_resizable = False
@@ -37,7 +37,7 @@ def main(page: ft.Page) -> None:
3737 height = 75 ,
3838 fit = ft .ImageFit .CONTAIN ,
3939 )
40- banner_text = ft .Text (value = 'pyOllaMx ' , style = ft .TextStyle (font_family = 'CabinSketch-Bold' ), size = 30 )
40+ banner_text = ft .Text (value = 'PyOllaMx ' , style = ft .TextStyle (font_family = 'CabinSketch-Bold' ), size = 30 )
4141 subbanner_text = ft .Text (value = 'Your gateway to both Ollama & Apple MlX models' )
4242 chat_messages = ft .Column (
4343 alignment = ft .MainAxisAlignment .CENTER ,
@@ -78,8 +78,8 @@ def main(page: ft.Page) -> None:
7878 user_text_field = ft .TextField (multiline = True ,
7979 width = 675 , autofocus = True , label = 'Enter your prompt' )
8080 user_text_field .border_color = 'white' if page .theme_mode == 'dark' else 'black'
81- send_button = ft .ElevatedButton ("Send" , icon = ft .icons .ROCKET_LAUNCH )
82- clear_button = ft .ElevatedButton ("chats" , icon = ft .icons .DELETE_FOREVER , icon_color = "pink600" )
81+ send_button = ft .ElevatedButton ("Send" , icon = ft .icons .ROCKET_LAUNCH , tooltip = 'Select a model in the settings menu & type in a prompt to enable this control' )
82+ clear_button = ft .ElevatedButton ("chats" , icon = ft .icons .DELETE_FOREVER , icon_color = "pink600" , tooltip = 'Atleast one response from AI should be available to delete this conversation' )
8383 pr = ft .ProgressRing (width = 16 , height = 16 , stroke_width = 2 )
8484 pr .value = 0
8585 pr_ph = ft .Text ()
@@ -229,14 +229,14 @@ def showModelSettings(e: ControlEvent) -> None:
229229 def toggleTheme (e : ControlEvent ) -> None :
230230 icon : ft .IconButton = e .control
231231 if icon .icon == ft .icons .DARK_MODE_SHARP :
232- page .theme_mode = "light "
233- icon .icon = ft .icons .DARK_MODE_OUTLINED
234- user_text_field .border_color = 'black '
232+ page .theme_mode = "dark "
233+ icon .icon = ft .icons .SUNNY
234+ user_text_field .border_color = 'white '
235235 else :
236236 #icon.icon == ft.icons.DARK_MODE_OUTLINED
237- page .theme_mode = "dark "
237+ page .theme_mode = "light "
238238 icon .icon = ft .icons .DARK_MODE_SHARP
239- user_text_field .border_color = 'white '
239+ user_text_field .border_color = 'dark '
240240 page .update ()
241241
242242 def view_pop (view ):
@@ -297,7 +297,7 @@ def showHistory(e: ControlEvent):
297297 ft .IconButton (ft .icons .DARK_MODE_SHARP , on_click = toggleTheme , tooltip = 'Toggle Dark Mode' ),
298298 ft .IconButton (ft .icons .INSTALL_DESKTOP , on_click = showModelHub , tooltip = 'Download Models' ),
299299 ft .IconButton (ft .icons .HISTORY , on_click = showHistory , tooltip = 'Conversation History' ),
300- ft .PopupMenuButton ()
300+ # ft.PopupMenuButton()
301301 ], alignment = "spacearound" ),
302302 ], alignment = "spacebetween" )
303303
0 commit comments