summaryrefslogtreecommitdiff
path: root/Hutch/Views/Settings/SettingsViewModel.swift
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-07-15 23:50:18 -0500
committerChristian Cleberg <[email protected]>2026-07-15 23:50:18 -0500
commitc4930f31ffc5d7c5de5eeafd3da184c7691f8ab7 (patch)
tree1a5761b045d02a5c293096782524b6d7a8226552 /Hutch/Views/Settings/SettingsViewModel.swift
parentf100206cc6d6784563d8eb905c9feb15c58bcc1e (diff)
downloadhutch-c4930f31ffc5d7c5de5eeafd3da184c7691f8ab7.tar.gz
hutch-c4930f31ffc5d7c5de5eeafd3da184c7691f8ab7.tar.bz2
hutch-c4930f31ffc5d7c5de5eeafd3da184c7691f8ab7.zip
feat: upload and delete repository artifacts
uploadArtifact and deleteArtifact existed in git.sr.ht's API but were never called, so the artifacts tab could only download. Upload is reachable two ways, and the second is the one that matters: the tab only lists tags that already carry an artifact, so a per-section button alone could never attach the first one to a tag — and the app cannot create that first artifact any other way. A toolbar action picks from all tags instead. The file variable is top-level here, unlike meta's avatar upload where it nests inside an input object. This is the second caller of executeMultipart, which until now only served avatars. Artifacts are tarballs and signatures, so the upload declares application/octet-stream rather than guessing a type from the extension. Security-scoped access is released after the read, since fileImporter hands back a URL the app does not otherwise own. Both actions are gated on repository ownership, reusing the check RepositoryDetailView already applies to its other management surfaces rather than recomputing it. Delete sits behind a confirmation naming the file.
Diffstat (limited to 'Hutch/Views/Settings/SettingsViewModel.swift')
0 files changed, 0 insertions, 0 deletions