summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJessica <jessica@Absolventas-MacBook-Pro.local>2018-09-25 15:31:23 +0200
committerJessica <jessica@Absolventas-MacBook-Pro.local>2018-09-25 15:31:23 +0200
commit6698382da09705d9a36f67861a916b427f62d2aa (patch)
treee29a07cb0cfbf1aa1d262cdddeb1be01bd3feb62 /src
parent0753301b9d829ea276d043e59513831bb072227f (diff)
added prevent & stop to event for copy addressbook
Diffstat (limited to 'src')
-rw-r--r--src/components/Settings/SettingsAddressbook.vue19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/components/Settings/SettingsAddressbook.vue b/src/components/Settings/SettingsAddressbook.vue
index 32862b81..239856ce 100644
--- a/src/components/Settings/SettingsAddressbook.vue
+++ b/src/components/Settings/SettingsAddressbook.vue
@@ -210,7 +210,7 @@ export default {
this.renameLoading = true
setTimeout(() => {
try {
- this.$store.dispatch('renameAddressbook', { addressbook, newName }) // .then(e.target.parent.classList.add())
+ this.$store.dispatch('renameAddressbook', { addressbook, newName })
} catch (err) {
// error handling
} finally {
@@ -222,24 +222,27 @@ export default {
}
}, 500)
},
- copyLink() {
+ copyLink(event) {
// change to loading status
this.copyLoading = true
+ event.stopPropagation()
+
// copy link for addressbook to clipboard
this.$copyText(this.addressbook.url).then(e => {
+ event.preventDefault()
this.copySuccess = true
this.copied = true
+ // timeout sets the text back to copy to show text was copied
+ setTimeout(() => {
+ // stop loading status regardless of outcome
+ this.copyLoading = false
+ this.copied = false
+ }, 1500)
}, e => {
this.copySuccess = false
this.copied = true
})
- // timeout sets the text back to copy to show text was copied
- setTimeout(() => {
- // stop loading status regardless of outcome
- this.copyLoading = false
- this.copied = false
- }, 1500)
}
}
}