parent
bcde25336f
commit
947fea9bb7
2 changed files with 6 additions and 3 deletions
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import User from "../models/user";
|
import User from "../models/user";
|
||||||
|
import util from "../plugins/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Login",
|
name: "Login",
|
||||||
|
|
@ -75,7 +76,7 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (this.loggedIn) {
|
if (this.loggedIn) {
|
||||||
this.$navigation.push({name: "Chat", params: { roomId: this.$matrix.currentRoomId }}, -1);
|
this.$navigation.push({name: "Chat", params: { roomId: util.sanitizeRoomId(this.$matrix.currentRoomId) }}, -1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -120,7 +121,7 @@ export default {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch("auth/login", user).then(
|
this.$store.dispatch("auth/login", user).then(
|
||||||
() => {
|
() => {
|
||||||
this.$navigation.push({name: "Chat", params: { roomId: this.$matrix.currentRoomId }}, -1);
|
this.$navigation.push({name: "Chat", params: { roomId: util.sanitizeRoomId(this.$matrix.currentRoomId) }}, -1);
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import util from "../plugins/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RoomList",
|
name: "RoomList",
|
||||||
|
|
||||||
|
|
@ -26,7 +28,7 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
currentRoomId() {
|
currentRoomId() {
|
||||||
this.$emit("close");
|
this.$emit("close");
|
||||||
this.$navigation.push({name: 'Chat', params: { roomId: this.currentRoomId }}, -1);
|
this.$navigation.push({name: 'Chat', params: { roomId: util.sanitizeRoomId(this.currentRoomId) }}, -1);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue