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.
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.
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.
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.