hydrus
hydrus copied to clipboard
Make the "ipfs" label in the media viewer clickable
Just like how URLs are clickable (or you can right-click them to get the "Copy Link Location" option), I would like the "ipfs" label that appears on pinned files to do the same. Here are the acceptance criteria I have in mind:
-
When clicking the label, hydrus should tell the OS to open the native URL (i.e.,
ipfs://{hash}
) for that media.Leave it up to the OS to decide on how to handle the URL. (I think most people are going to set it up so that it opens in a web browser.)
-
When right-clicking and choosing "Copy Link Location", it should copy the same URL to your clipboard.
-
(Optional) If you have a "clipboard multihash url prefix" set in your ipfs service, then perhaps it could replace the
ipfs://
with that. Up to you. -
It should never just copy the multihash, as that by itself is basically useless.
-
It should use the
bafy
hash rather than theQm
hash.It should be noted that the URL documentation, as of this writing, strongly recommends avoiding case-sensitive CID multihashes, both in native URL format as well as with an HTTP gateway (i.e., via the "clipboard multihash url prefix" setting); they recommend CIDv1 with Base32 or Base36 encoding instead. You know,
bafy
hashes. This is because some user agents will forcefully lowercase the multihash because they are treating it like it's a web domain (which is case-insensitive.) Hydrus currently seems to speak inQm
hashes instead right now, hence this requirement.
By the way: if the ipfs addresses were just added as known URLs, I think it would meet the requirements of this request and also #981, which was closed because Suika only cared about a way to get the ipfs hashes from the API.