rm web
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-05 22:10:19 +01:00
parent fb203e97d5
commit 60df6a16a1
4 changed files with 40 additions and 29 deletions

View File

@@ -60,6 +60,26 @@
'dockerfile-builder',
],
},
{
name: 'ssh-clear-web-folder',
image: 'appleboy/drone-ssh',
settings: {
host: 'pb42.de',
username: {
from_secret: 'deploy_username',
},
key: {
from_secret: 'deploy_key',
},
port: 42022,
script: [
'rm -rf web/* || true',
],
},
depends_on: [
'frontend-builder',
],
},
{
name: 'deploy_web',
image: 'appleboy/drone-scp',
@@ -78,7 +98,7 @@
port: 42022,
},
depends_on: [
'frontend-builder',
'ssh-clear-web-folder',
],
},
{

View File

@@ -14,4 +14,4 @@ async def scan(uuid: str):
def register_at(app):
print("register scan")
app.api.add_api_route("/scan/{uuid}", scan)
app.api.add_api_route("/scan/{uuid}", scan, methods=['GET', 'POST'])

View File

@@ -13,6 +13,7 @@ class NewMedicineState(rx.State):
"""Define your app state here."""
show_med_add_form: bool = False
sometext: str = "1234"
# medicine_name: str = ""
# last_scan_uuid: str = ""
# last_scan_time: str = ""
@@ -78,9 +79,11 @@ class NewMedicineState(rx.State):
#
def do_show_med_add_form(self):
self.show_med_add_form = True
sometext = "----"
def stop_show_med_add_form(self):
self.show_med_add_form = False
sometext = "++++"
# def handle_submit(self, form_data: dict):
# self.form_data = form_data
@@ -216,24 +219,21 @@ def medicine() -> rx.Component:
rx.spacer(),
rx.heading("Medikamente", font_size="3em"),
rx.spacer(),
rx.cond(
NewMedicineState.show_med_add_form,
rx.text('xxxx')
),
rx.hstack(
rx.button(
rx.text(
"-",
),
on_click=NewMedicineState.stop_show_med_add_form,
),
rx.button(
rx.text(
"+",
),
on_click=NewMedicineState.do_show_med_add_form,
),
),
rx.text(NewMedicineState.sometext),
# rx.hstack(
# rx.button(
# rx.text(
# "-",
# ),
# on_click=NewMedicineState.stop_show_med_add_form,
# ),
# rx.button(
# rx.text(
# "+",
# ),
# on_click=NewMedicineState.do_show_med_add_form,
# ),
# ),
width="100%",
border_bottom=styles.border,
padding="1em",

View File

@@ -1,9 +0,0 @@
import reflex as rx
import time
import datetime
import asyncio
from reflex_ipad.models import *
class State(rx.State):
"""Define your app state here."""
pass