首次配置判断是否为win系统

This commit is contained in:
HibiKier 2025-03-12 09:54:36 +08:00
parent 9935e981f0
commit a1990e8b00
2 changed files with 4 additions and 1 deletions

View File

@ -60,7 +60,9 @@ async def _(setting: Setting) -> Result:
env_file.write_text(env_text, encoding="utf-8")
flag_file = Path() / f"{FILE_NAME}_{int(time.time())}"
flag_file.touch()
return Result.ok(info="设置成功,请重启真寻以完成配置!")
return Result.ok(
platform.system() == "Windows", info="设置成功,请重启真寻以完成配置!"
)
@router.get(

View File

@ -18,6 +18,7 @@ async def update_webui_assets():
download_url = await GithubUtils.parse_github_url(
WEBUI_DIST_GITHUB_URL
).get_archive_download_urls()
logger.info("开始下载 webui_assets 资源...", COMMAND_NAME)
if await AsyncHttpx.download_file(
download_url, webui_assets_path, follow_redirects=True
):