removed alert and added a less intrusive notification

This commit is contained in:
Gonçalo Valério 2019-04-13 21:07:34 +01:00
parent 9018c0e9ba
commit 00eb6f3902
2 changed files with 10 additions and 2 deletions

View File

@ -88,14 +88,19 @@ var callbackDetails = new Vue({
el: "#callback-details",
delimiters: ["[[", "]]"],
data: {
callback_url: ""
callback_url: "",
show_copy_notification: false
},
methods: {
copytoclipboard: function() {
var url = document.getElementById("callback-uuid-field");
url.select();
document.execCommand("copy");
alert("The callback url was copied to your clipboard.");
this.show_copy_notification = true;
let self = this;
setTimeout(function() {
self.show_copy_notification = false;
}, 2000);
}
},
mounted: function() {

View File

@ -47,6 +47,9 @@
</a>
</div>
</div>
<div class="notification is-success" v-if="show_copy_notification">
The callback url was copied to your clipboard.
</div>
</div>
</section>
<section class="section" id="request-list">