routing improvements
This commit is contained in:
parent
374e7828cc
commit
b2ba24906e
@ -39,7 +39,10 @@ export default {
|
||||
},
|
||||
room(data) {
|
||||
this.isInLobby = true;
|
||||
this.$router.push({path:'game', query: { code: data.name, pwd: data.password }})
|
||||
if (data.password)
|
||||
this.$router.replace({path:'game', query: { code: data.name, pwd: data.password }})
|
||||
else
|
||||
this.$router.replace({path:'game', query: { code: data.name }})
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
@ -137,7 +137,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
inviteLink() {
|
||||
return `${window.location.origin}/game?code=${this.lobbyName}&pwd=${this.password}`
|
||||
return `${window.location.origin}/game?code=${this.lobbyName}${this.password?`&pwd=${this.password}`:''}`
|
||||
},
|
||||
expansionsStatus() {
|
||||
return this.togglable_expansions.map(x=>{
|
||||
|
Loading…
Reference in New Issue
Block a user