diff --git a/src/components/RoomInfo.vue b/src/components/RoomInfo.vue
index ff3829a..c9854be 100644
--- a/src/components/RoomInfo.vue
+++ b/src/components/RoomInfo.vue
@@ -26,7 +26,14 @@
{{ roomName }}
{{ roomTopic }}
Created by {{ creator }}
-
+
+
+
@@ -113,7 +120,11 @@
Your are logged in as {{ displayName }}.
- View
@@ -263,21 +274,23 @@ export default {
},
updateQRCode() {
- var fullUrl = this.roomLink;
- var canvas = document.getElementById("room-qr");
- QRCode.toCanvas(
- canvas,
- fullUrl,
- {
- type: "image/png",
- margin: 1,
- width: canvas.clientWidth,
- },
- function (error) {
- if (error) console.error(error);
- else console.log("success!");
- }
- );
+ var fullUrl = this.publicRoomLink;
+ var canvas = this.$refs.roomQr;
+ if (fullUrl && canvas) {
+ QRCode.toCanvas(
+ canvas,
+ fullUrl,
+ {
+ type: "image/png",
+ margin: 1,
+ width: canvas.clientWidth,
+ },
+ function (error) {
+ if (error) console.error(error);
+ else console.log("success!");
+ }
+ );
+ }
},
memberAvatar(member) {
@@ -298,7 +311,7 @@ export default {
},
copyRoomLink() {
- this.$copyText(this.roomLink).then(
+ this.$copyText(this.publicRoomLink).then(
function (e) {
console.log(e);
},
@@ -359,6 +372,7 @@ export default {
})
.finally(() => {
this.updatingJoinRule = false;
+ this.updateQRCode();
});
},
},