You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

33 lines
1.4 KiB

#!/usr/bin/env python3
"""
Test the new bg.dev() method for instant development server
"""
import badgui as bg
def main():
with bg.page("/", "DevTestPage", "Dev Mode Test"):
bg.label("🚀 Live Development Mode Test").classes("text-h2 text-primary text-center q-mb-lg")
bg.label("This page was created with bg.dev()!").classes("text-h6 text-center q-mb-md")
bg.label("No manual build, install, or server start needed.").classes("text-body1 text-grey-7 text-center q-mb-lg")
with bg.row() as button_row:
button_row.classes("justify-center q-gutter-md q-mb-lg")
bg.button("Primary Button").classes("q-btn-primary")
bg.button("Secondary Button").classes("q-btn-secondary")
bg.button("Accent Button").classes("q-btn-accent")
with bg.column() as form_column:
form_column.classes("bg-grey-1 p-4 rounded max-width-md mx-auto")
bg.label("Quick Test Form").classes("text-h6 q-mb-md")
bg.input(placeholder="Your name").classes("q-mb-md").props("filled")
bg.input(placeholder="Your email").classes("q-mb-md").props("filled type=email")
bg.button("Submit").classes("q-btn-primary full-width")
# Instead of bg.build(), just run bg.dev()!
print("Starting development server with bg.dev()...")
bg.dev(port=3000, host="localhost")
if __name__ == "__main__":
main()