Added Re-Init (#577)

This commit is contained in:
Alek Petuskey 2023-02-20 19:55:46 -08:00 committed by GitHub
parent a0967fc04c
commit 313dd7dc3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -1,5 +1,7 @@
"""Container to stack elements with spacing."""
from typing import Union
from pynecone.components.libs.chakra import ChakraComponent
from pynecone.var import Var
@ -25,7 +27,7 @@ class Progress(ChakraComponent):
min_: Var[int]
# The value of the progress indicator. If undefined the progress bar will be in indeterminate state
value: Var[int]
value: Var[Union[int, float]]
# The color scheme of the progress bar.
color_scheme: Var[str]

View File

@ -40,16 +40,14 @@ def init():
if not os.path.exists(constants.CONFIG_FILE):
utils.create_config(app_name)
utils.initialize_app_directory(app_name)
utils.set_pynecone_project_hash()
pynecone_telemetry("init", utils.get_config().telemetry_enabled)
else:
utils.set_pynecone_project_hash()
pynecone_telemetry("reinit", utils.get_config().telemetry_enabled)
# Initialize the .gitignore.
utils.initialize_gitignore()
# Set the pynecone project hash.
utils.set_pynecone_project_hash()
# Post a telemetry event.
pynecone_telemetry("init", utils.get_config().telemetry_enabled)
# Finish initializing the app.
utils.console.log(f"[bold green]Finished Initializing: {app_name}")