fix(plugin): screenshot limit, version/build fields, delete button, workspace scripts

- list_screenshots: bump limit 12 → 50 so users can scroll further back
- Add versionString + buildId to DeckyVaultImportV1, SessionData, and
  buildImportPayload. Import endpoint now saves them on new game versions.
- Screenshot delete button in preset detail modal: owner/admin sees a
  trash icon on hover that calls DELETE /api/performance/:id/screenshots/:sid
- Root workspace scripts for plugin workflow:
  bun run plugin:build  | plugin:zip | plugin:release | plugin:deploy
- Add deploy.sh (SSH scripts to push plugin to Deck)
This commit is contained in:
2026-06-29 00:33:20 +08:00
parent 8cff20c13e
commit 868faafb4d
7 changed files with 104 additions and 27 deletions
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
# Deploy the built plugin dist/ + main.py to the Steam Deck and restart the
# plugin loader. The build step is handled separately (bun run plugin:build
# calls rollup first, then this script runs).
set -euo pipefail
DECK_IP="${DECK_IP:-192.168.254.112}"
DECK_USER="${DECK_USER:-deck}"
DECK_PASS="${DECK_PASS:-22122012003}"
PLUGIN_DIR="/home/deck/homebrew/plugins/decky-vault"
cd "$(dirname "$0")/.."
echo " Deploying to ${DECK_USER}@${DECK_IP}"
sshpass -p "$DECK_PASS" ssh -o StrictHostKeyChecking=no "${DECK_USER}@${DECK_IP}" \
"mkdir -p /tmp/dv-deploy && rm -rf /tmp/dv-deploy/*"
sshpass -p "$DECK_PASS" scp -o StrictHostKeyChecking=no -r dist main.py \
"${DECK_USER}@${DECK_IP}:/tmp/dv-deploy/"
sshpass -p "$DECK_PASS" ssh -o StrictHostKeyChecking=no "${DECK_USER}@${DECK_IP}" \
"echo '${DECK_PASS}' | sudo -S cp /tmp/dv-deploy/dist/index.js ${PLUGIN_DIR}/dist/index.js && \
echo '${DECK_PASS}' | sudo -S cp /tmp/dv-deploy/main.py ${PLUGIN_DIR}/main.py && \
echo '${DECK_PASS}' | sudo -S systemctl restart plugin_loader.service && \
sleep 1 && echo 'restarted'"
echo "✓ Deployed — plugin loaded:"
sshpass -p "$DECK_PASS" ssh -o StrictHostKeyChecking=no "${DECK_USER}@${DECK_IP}" \
"ls -t /home/deck/homebrew/logs/decky-vault/ | head -1 | xargs -I{} tail -1 '/home/deck/homebrew/logs/decky-vault/{}'"