diff --git a/chat_history.json b/chat_history.json deleted file mode 100644 index ce96a1d..0000000 --- a/chat_history.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "role": "user", - "text": "Analyze the provided image thoroughly and generate an exhaustive, meticulous description capturing every detail with pinpoint accuracy. ; prioritize thoroughness and precision over conciseness.. ((RESPONDE EN UN SOLO PARRAFO NO MAS DE 250 PALABRAS))" - }, - { - "role": "model", - "text": "The image captures a woman lying face-up in a lush green meadow, her eyes closed and her head resting on a bed of vibrant pink flowers. The woman is wearing a light pink off-the-shoulder top, and her long, wavy brown hair cascades down her back and over her shoulder, partially obscuring her face. She is illuminated by the warm glow of the setting sun, which creates a soft, ethereal ambiance. In the background, a large waterfall tumbles down a rocky cliff face, creating a serene and picturesque backdrop. The image conveys a sense of tranquility and peace, highlighting the beauty of nature and the simple pleasures of life. \n" - } -] \ No newline at end of file diff --git a/components/widgets.py b/components/widgets.py index 573f860..88906a1 100644 --- a/components/widgets.py +++ b/components/widgets.py @@ -123,14 +123,14 @@ def hide_keyboard(self,e ): def update_premio(self, e): # Aplicar el descuento del 15% - if not self.keyboard and e.control == self.text_field_premio : - self.keyboard = True - self.page.floating_action_button = ft.FloatingActionButton( - icon=ft.icons.KEYBOARD_HIDE, - on_click=self.hide_keyboard - ) - self.page.update() - self.sonido.play() + # if not self.keyboard and e.control == self.text_field_premio : + # self.keyboard = True + # self.page.floating_action_button = ft.FloatingActionButton( + # icon=ft.icons.KEYBOARD_HIDE, + # on_click=self.hide_keyboard + # ) + # self.page.update() + if self.text_field_premio.value == '' or int(self.text_field_premio.value) <= 0: self.valor_final.value = "Ingresa un premio" self.premio_display.value = "$0" @@ -149,7 +149,7 @@ def update_premio(self, e): self.cuotas_display.update() if self.text_field_premio.value == '': return - + self.sonido.play() discounted_value = int(float(self.text_field_premio.value) * (1 - self.descuento / 100)) intervalo = int(self.intervalo_slider.value) @@ -321,7 +321,7 @@ def __init__(self): self.border_radius=10 self.border=ft.border.all(1, ft.colors.BLACK12) self.bgcolor=ft.colors.PRIMARY_CONTAINER - self.width=500 + self.width=400 self.padding=10 diff --git a/main.py b/main.py index 4aaeff6..0eaac9f 100644 --- a/main.py +++ b/main.py @@ -5,6 +5,12 @@ def main(page: ft.Page): page.spacing = 0 page.padding = 0 + page.title = "Utilidades" + page.theme_mode = ft.ThemeMode.DARK + page.locale_configuration = ft.LocaleConfiguration( + [ft.Locale('es', 'ES')], + current_locale=ft.Locale('es', 'ES'), + ) page.bgcolor = ft.colors.BACKGROUND last_width, last_height = calcular_alto(414) resizing = False @@ -39,7 +45,17 @@ def on_resize(e): text="RUS", content=ft.Container( expand=True, - content=CalculadoraPremio() + content=ft.Tabs( + [ + ft.Tab( + text="Premio", + content=CalculadoraPremio() + ) + ], + tab_alignment=ft.TabAlignment.CENTER, + expand=True + ), + ) ), ft.Tab( diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..77382dd --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,24 @@ +[project] +name = "Oficina" +version = "1.0.0" +description = "Utilidades para la Oficina" +authors = [ + {name = "Julián Perez", email = "mordecaaii@gmail.com"} +] +dependencies = [ + "flet==0.25.0.dev3526" +] + +[tool.flet] +org = "pj.code" +product = "Oficina" +company = "PAS Toval" +copyright = "Copyright (C) 2024 by Julian Perez" +build_number = 1 + +[tool.flet.splash] +color = "#2f2f2f" +dark_color = "#2f2f2f" +web = true +ios = true +android = true \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index f337f4f..225a40d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -flet==0.25.0.dev3519 \ No newline at end of file +flet==0.25.0.dev3526 \ No newline at end of file