feat(electron): add persistent auth, auto-updater, and NAS copy script

- Integrate electron-store for persistent PocketBase auth backup
  across localStorage clears and app reinstalls
- Switch build target from portable to nsis to generate latest.yml
  for electron-updater generic provider
- Add user confirmation dialogs before download and before install
- Add post-build script to copy .exe/.yml/.nupkg to NAS share and
  local electron-update/ directory for nginx volume mount
- Mount ./electron-update into frontend nginx containers via
  docker-compose for automatic update file serving

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
wjl
2026-04-21 14:38:48 +08:00
parent d3ef22f06e
commit 6b3cd288b1
11 changed files with 318 additions and 16 deletions
+8
View File
@@ -39,6 +39,14 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# Electron 自动更新文件托管
# 部署时将 electron/dist/latest.yml 和 electron/dist/*.exe 放到此目录
location /electron-update/ {
alias /usr/share/nginx/html/electron-update/;
autoindex on;
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
# API 代理到局域网 PocketBase
location /api/ {
client_max_body_size 500m;