import flet as ft

import os
os.environ["FLET_SECRET_KEY"] = os.urandom(12).hex()

def main(page: ft.Page):
    page.title = "Taina Gustului"
    page.theme_mode = ft.ThemeMode.LIGHT
    page.theme = ft.Theme(color_scheme=ft.ColorScheme(primary=ft.Colors.BLUE))
    page.vertical_alignment = ft.MainAxisAlignment.CENTER
    page.horizontal_alignment = ft.CrossAxisAlignment.CENTER
    page.padding = 0

    image = ft.Image("images/tainagustului.png", width=300)
    message = ft.Text("Deschidem in curand!", size=25, weight=ft.FontWeight.BOLD)
    page.add(image)
    page.add(message)
    page.update()


ft.app(
    target=main,
    assets_dir="assets",
    upload_dir="uploads",
    view=ft.WEB_BROWSER,
    port=8080,
    host="0.0.0.0"
)