karlomikus / vue-salt-rim

Salt Rim is a Vue based web client used for connecting to Bar Assistant server instance.
https://barassistant.app
MIT License
99 stars 17 forks source link

Implement join bar link. Fix redirect bug in login flow. Fix bug in public menus link. #235

Closed Fra146 closed 1 month ago

Fra146 commented 1 month ago

This PR implements the feature and resolves #172; it fixes a bug which overwrites the redirect property in the login flow; it fixes a bug in the menu public link which doesn't allow certain menus to be seen.

Closes #172

A new route (/invite/join/:invite) allows the user to join a bar by supplying the invite code in an URL parameter. This will display the normal join bar dialog, with an automatically set invite code. If the user doesn't specify :invite, the bar join dialog will open but no invite code will be set. In the bars list, when the bar invite code is visible, a clickable link allows the user to copy the invite link to the clipboard. Bars ⋅ Bar Assistant

Three strings are added to en_US.json, to tell the user if the link is successfully copied or not and for the button to actually join the bar (using "Join" instead of "Save" seemed more appropriate)

A new copy to clipboard function is also available in Utils.js

Bug fixes

A new public menu route (/menu/:slug) would be the replacement for the old public menu route (/bars/:slug). This is because if a bar has its public link equivalent to "form" or "join", the hard-coded router route would overwrite them, rendering the menu useless. To avoid invalidating QR codes, the old route (/bars/:slug) is still available as a legacy option. The bar settings and the generated QR codes are updated to work with the new route (/menu/:slug)

The login flow redirect is fixed, allowing users to be logged in and redirected to where they intended to go in the first place.

karlomikus commented 1 month ago

Nice work, thank you very much 👍