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
+1 -1
View File
@@ -605,7 +605,7 @@ exec mangohud "$@"
except Exception as e:
return {"success": False, "error": str(e), "status": 0}
async def list_screenshots(self, limit: int = 12) -> dict:
async def list_screenshots(self, limit: int = 50) -> dict:
"""RPC: List recent Steam Deck screenshots from ~/Pictures/Screenshots/.
Returns {screenshots: [{path, name, mtime, size}], error?}.
Steam saves timestamped JPGs in a 'Steam Client' subfolder and keeps
+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/{}'"
+6
View File
@@ -34,6 +34,8 @@ export interface SessionData {
hardwareName: string
osVersion: string
protonVersion: string
versionString: string
buildId: string
// Manual inputs (filled by user in the form)
upscalerType: string
upscalerVersion: string
@@ -66,6 +68,8 @@ function createEmptySession(): SessionData {
hardwareName: "",
osVersion: "",
protonVersion: "",
versionString: "",
buildId: "",
upscalerType: "none",
upscalerVersion: "",
frameGenMethod: "none",
@@ -244,6 +248,8 @@ export function buildImportPayload(sess: SessionData): DeckyVaultImportV1 {
fpsHigh: sess.fpsHigh,
protonVersion: sess.protonVersion || null,
osVersion: sess.osVersion || null,
versionString: sess.versionString || null,
buildId: sess.buildId || null,
upscalerType: sess.upscalerType,
upscalerVersion: sess.upscalerVersion || null,
frameGenMethod: sess.frameGenMethod,