routing improvements
This commit is contained in:
parent
374e7828cc
commit
b2ba24906e
@ -39,7 +39,10 @@ export default {
|
|||||||
},
|
},
|
||||||
room(data) {
|
room(data) {
|
||||||
this.isInLobby = true;
|
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: {
|
methods: {
|
||||||
|
@ -137,7 +137,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
inviteLink() {
|
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() {
|
expansionsStatus() {
|
||||||
return this.togglable_expansions.map(x=>{
|
return this.togglable_expansions.map(x=>{
|
||||||
|
Loading…
Reference in New Issue
Block a user