Add "link copied!" toast to room info

This commit is contained in:
N-Pex 2021-04-02 09:43:58 +02:00
parent 73f7a0d4d8
commit b7d280f675
2 changed files with 24 additions and 17 deletions

View file

@ -724,6 +724,19 @@ $admin-fg: white;
border: 1px solid #808080 !important;
position: relative;
}
}
.room-link .v-input__slot::before {
/* Remove text underline */
border-style: none !important;
}
.created-room-welcome-header {
background-color: #e0e0e0;
border-radius: 25px;
margin: 20px;
padding: 20px;
}
.link-copied {
position: absolute;
@ -738,16 +751,3 @@ $admin-fg: white;
vertical-align: middle;
padding-top: 10px;
}
}
.room-link .v-input__slot::before {
/* Remove text underline */
border-style: none !important;
}
.created-room-welcome-header {
background-color: #e0e0e0;
border-radius: 25px;
margin: 20px;
padding: 20px;
}

View file

@ -60,6 +60,7 @@
type="text"
@click:append="copyRoomLink"
></v-text-field>
<div v-if="publicRoomLinkCopied" class="link-copied">Link copied!</div>
</v-radio-group>
<!-- <div v-if="anyoneCanJoin">
@ -183,6 +184,7 @@ export default {
expandedMembers: [],
buildVersion: "",
updatingJoinRule: false, // Flag if we are processing update curerntly
publicRoomLinkCopied: false,
};
},
mounted() {
@ -311,10 +313,15 @@ export default {
},
copyRoomLink() {
const self = this;
this.$copyText(this.publicRoomLink).then(
function (e) {
console.log(e);
},
function (ignored) {
// Success!
self.publicRoomLinkCopied = true;
setInterval(() => {
// Hide again
self.publicRoomLinkCopied = false;
}, 3000); },
function (e) {
console.log(e);
}