feat(ui): Add /a/<asset-tag> for use with QR codes on asset stickers - #59
Conversation
|
|
|
Yeah definitely possible, but yeah would need the api endpoint first to be useful |
|
#61 has landed, so this should be possible now. |
f3733fc to
fc8cdef
Compare
| const { asset: initialAsset } = Route.useLoaderData(); | ||
|
|
||
| const asset = useQuery({ | ||
| ...getAssetByIdOrTagOptions({ path: { id: assetID } }), |
There was a problem hiding this comment.
just a thought, but is it worth having it update the browser url to always be the asset id rather than the tag, so that the id is always the canonical url for an asset, while still allowing you to quickly access an asset via its tag just by putting it in the url (the use case i can think of is an external doc referencing a specific item, which could become outdated if the asset gets a new tag, where making the link users copy from the address bar would prevent this in a lot of cases)
There was a problem hiding this comment.
So just redirect to /assets/$id if it gets /assets/$tag?
I've been thinking about what I said here, and maybe I was stupid.
Let me know if this sounds stupider. |
|
I think no, adding the requirement of configuring a reverse proxy to use a feature anyone using QR codes will use seems pointless, as it's all client side as well there's no such thing as 307 redirects so you'd have to do that from the backend. |
|
That's fair enough. Although my final question about that would if it's possible to also have the contact page on unauthenticated |
|
|
|
Sorry, yes, I did mean |
|
So what you want is one page that's dual purpose for both authenticated and unauthenticated users? The setup you described would work currently for authenticated users, and once I push the changes Ash suggested you'd still get "redirected" (it's js, so not an actual redirect) when you navigate to the |
|
If it's not worth making the page dual-purpose, don't bother. The suggestion posted by Ash is a good idea and my hypothetical scenario still works with the current implementation anyway, just not bar for bar. |
No description provided.