### 详细变更:
1. **文档与配置**:更新AGENTS.md添加命令超时约束,升级Rive依赖至0.14.7并替换平台插件引用
2. **UI优化**:重构AppInfo页面布局、移除图表冗余配置、锁定部分系统设置项
3. **功能增强**:
- 新增工具面板拖拽状态管理与介绍弹窗
- 新增进度页面编辑/重排/清空用户进度功能
- 新增摇一摇路由作用域拦截逻辑
4. **体验优化**:
- 统一外部链接跳转弹窗,添加文件打开确认逻辑
- 修复设备卡片IP溢出、Android权限声明问题
- 后台任务初始化增加协议校验
5. **代码重构**:拆分工具面板配置、拖拽逻辑与动画参数,优化状态管理代码
6. **工具脚本**:新增协议文件上传脚本
64 lines
1.6 KiB
Python
64 lines
1.6 KiB
Python
#!/usr/bin/env python3
|
|
import os
|
|
import paramiko
|
|
|
|
HOST = '123.207.67.197'
|
|
PORT = 22
|
|
USER = 'root'
|
|
PASS = '520Kiss123'
|
|
|
|
LOCAL_DIR = r'e:\project\flutter\f\xianyan\docs\toolsapi\agreements'
|
|
REMOTE_DIR = '/www/wwwroot/tools.wktyl.com/public/agreements/'
|
|
|
|
HTML_FILES = [
|
|
'index.html',
|
|
'privacy-policy.html',
|
|
'user-service-agreement.html',
|
|
'account-agreement.html',
|
|
'member-benefits.html',
|
|
'disclaimer.html',
|
|
'children-privacy.html',
|
|
'permission-usage.html',
|
|
'app-introduction.html',
|
|
'beginner-guide.html',
|
|
'dev-team.html',
|
|
]
|
|
|
|
def main():
|
|
print('=' * 60)
|
|
print('上传协议HTML文件到服务器')
|
|
print('=' * 60)
|
|
|
|
ssh = paramiko.SSHClient()
|
|
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
ssh.connect(HOST, port=PORT, username=USER, password=PASS)
|
|
sftp = ssh.open_sftp()
|
|
|
|
try:
|
|
try:
|
|
sftp.stat(REMOTE_DIR)
|
|
except FileNotFoundError:
|
|
sftp.mkdir(REMOTE_DIR)
|
|
print(f' [CREATE] {REMOTE_DIR}')
|
|
|
|
for filename in HTML_FILES:
|
|
local_path = os.path.join(LOCAL_DIR, filename)
|
|
remote_path = REMOTE_DIR + filename
|
|
if not os.path.exists(local_path):
|
|
print(f' [SKIP] {filename} - local file not found')
|
|
continue
|
|
sftp.put(local_path, remote_path)
|
|
size = os.path.getsize(local_path)
|
|
print(f' [OK] {filename} ({size:,} bytes)')
|
|
|
|
print()
|
|
print('All files uploaded successfully!')
|
|
print(f'URL: https://tools.wktyl.com/agreements/')
|
|
|
|
finally:
|
|
sftp.close()
|
|
ssh.close()
|
|
|
|
if __name__ == '__main__':
|
|
main()
|