mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 18:39:04 +08:00
Add: auto-run config in deploy
Auto-run specified config when startup
This commit is contained in:
parent
110688c4b6
commit
acc4fab614
@ -58,6 +58,7 @@ class ConfigModel:
|
|||||||
DpiScaling: bool = True
|
DpiScaling: bool = True
|
||||||
Password: Optional[str] = None
|
Password: Optional[str] = None
|
||||||
CDN: Union[str, bool] = False
|
CDN: Union[str, bool] = False
|
||||||
|
RUN: Optional[str] = None
|
||||||
|
|
||||||
|
|
||||||
class DeployConfig(ConfigModel):
|
class DeployConfig(ConfigModel):
|
||||||
|
|||||||
@ -148,3 +148,7 @@ Deploy:
|
|||||||
# 'false' for self host cdn (automatically)
|
# 'false' for self host cdn (automatically)
|
||||||
# 'https://path.to.your/cdn' to use custom cdn
|
# 'https://path.to.your/cdn' to use custom cdn
|
||||||
CDN: false
|
CDN: false
|
||||||
|
# --run. Auto-run specified config when startup
|
||||||
|
# 'default' null
|
||||||
|
# 'alas' for default config
|
||||||
|
RUN: null
|
||||||
|
|||||||
@ -1197,7 +1197,12 @@ def app():
|
|||||||
key = args.key or State.deploy_config.Password
|
key = args.key or State.deploy_config.Password
|
||||||
cdn = args.cdn if args.cdn else State.deploy_config.CDN
|
cdn = args.cdn if args.cdn else State.deploy_config.CDN
|
||||||
State.electron = args.electron
|
State.electron = args.electron
|
||||||
instances: List[str] = args.run
|
runs = None
|
||||||
|
if args.run:
|
||||||
|
runs = args.run
|
||||||
|
elif State.deploy_config.RUN:
|
||||||
|
runs = [State.deploy_config.RUN]
|
||||||
|
instances: List[str] = runs
|
||||||
|
|
||||||
logger.hr("Webui configs")
|
logger.hr("Webui configs")
|
||||||
logger.attr("Theme", State.deploy_config.Theme)
|
logger.attr("Theme", State.deploy_config.Theme)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user