app/modules/home.py

35 lines
904 B
Python
Raw Normal View History

2024-04-19 16:59:43 +00:00
import flet as ft
from utils import AppView, Title
from modules.settings import config
2024-04-19 20:02:44 +00:00
2024-04-19 16:59:43 +00:00
def Home(page: ft.Page):
return AppView(
2024-04-19 20:02:44 +00:00
'/',
2024-04-19 16:59:43 +00:00
[
ft.AppBar(
title=ft.Text(Title(__file__)),
actions=[
ft.IconButton(
icon=ft.icons.SETTINGS,
2024-04-19 20:02:44 +00:00
on_click=lambda _: page.go('/settings'),
),
],
2024-04-19 16:59:43 +00:00
),
ft.Container(
height=100,
padding=10,
content=ft.Column(
controls=[
ft.Text(
2024-04-19 20:02:44 +00:00
'Goodmorning,',
2024-04-19 16:59:43 +00:00
),
ft.Text(
2024-04-19 20:02:44 +00:00
config.get('general', 'name'),
),
2024-04-19 16:59:43 +00:00
],
),
),
],
)