Fix invites with relative server
This commit is contained in:
parent
41cf946888
commit
c8ba6459e2
|
@ -263,10 +263,14 @@ export default {
|
|||
|
||||
const invitePart = this.$router.resolve({
|
||||
name: 'join',
|
||||
params: { server: this.GET_SERVER, room: this.GET_ROOM, password: this.GET_PASSWORD },
|
||||
params: {
|
||||
...(this.GET_SERVER.length > 0 && { server: this.GET_SERVER }),
|
||||
room: this.GET_ROOM,
|
||||
password: this.GET_PASSWORD,
|
||||
},
|
||||
}).href;
|
||||
|
||||
return `${window.location.origin}/${invitePart}`;
|
||||
return new URL(invitePart, window.location).toString();
|
||||
}
|
||||
return '';
|
||||
},
|
||||
|
|
|
@ -37,7 +37,7 @@ export default new Router({
|
|||
},
|
||||
|
||||
{
|
||||
path: '/join/:server/:room/:password?',
|
||||
path: '/join/:server?/:room/:password?',
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
redirectAfterAuth: true,
|
||||
|
|
|
@ -60,7 +60,7 @@ export default {
|
|||
props: {
|
||||
server: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: '',
|
||||
},
|
||||
|
||||
room: {
|
||||
|
|
|
@ -15,6 +15,7 @@ try {
|
|||
// Sometimes on CI stuff they build with .git being present
|
||||
// TODO: find better way to do this
|
||||
process.env.VUE_APP_GIT_DATE = new Date().toISOString();
|
||||
console.log('env', process.env);
|
||||
|
||||
if (process.env.SOURCE_COMMIT) {
|
||||
process.env.VUE_APP_GIT_HASH = process.env.SOURCE_COMMIT.substring(0, 7);
|
||||
|
|
Loading…
Reference in New Issue