feat(ui): add "How do I use this?" usage instructions to repo detail pages #105
Reference in New Issue
Block a user
Delete Branch "benvin/ui-usage-instructions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
A repository detail page in the ArtifactAPI UI showed configuration and stats, but nothing that told a user how to actually consume the repo. You had to already know the per-package-type URL scheme (yum baseurl, pip index-url, docker registry host, terraform source address, ...) by hand. This adds an in-page, copy-pasteable "How do I use this?" panel so each repo page tells you exactly how to point a Linux host at it.
Changes
UsageInstructionscomponent: a collapsible "How do I use this?" panel with monospace code boxes and copy-to-clipboard buttons, styled to match the existing detail-section / badge theme./api/v1/remote/<name>/...).PUT .../files/, docker Registry V2 push, terraform provider upload)./api/v1/virtual/<name>/...using the same per-type client config.window.location.origin(the UI is served on the API origin, clientBASE='') instead of hardcoding a hostname; falls back to the public host only whenwindowis unavailable.RemoteDetail,LocalDetail, and theVirtualsmember-expand panel.Verification
npm run build(tsc typecheck + vite build) passes.required_providers+ signing note), and a pypi virtual — all snippets render with the correct URLs and theme.