summaryrefslogtreecommitdiffstats
path: root/src/components/Settings/SettingsAddressbook.vue
diff options
context:
space:
mode:
authorJessica <jessica@Absolventas-MacBook-Pro.local>2018-09-04 17:07:19 +0200
committerJessica <jessica@Absolventas-MacBook-Pro.local>2018-09-04 17:07:19 +0200
commitf2951292aa873852d0ef024226293445c2870c7f (patch)
treecdab24f884cf487a78625b93fe39c687940a8cea /src/components/Settings/SettingsAddressbook.vue
parentf15ed0d145499bff33fef39b3d074c8376da07b4 (diff)
added webdav links for copy link and download, tidied code for popover menu creation
Diffstat (limited to 'src/components/Settings/SettingsAddressbook.vue')
-rw-r--r--src/components/Settings/SettingsAddressbook.vue41
1 files changed, 22 insertions, 19 deletions
diff --git a/src/components/Settings/SettingsAddressbook.vue b/src/components/Settings/SettingsAddressbook.vue
index 378a51f8..afcd2081 100644
--- a/src/components/Settings/SettingsAddressbook.vue
+++ b/src/components/Settings/SettingsAddressbook.vue
@@ -94,44 +94,47 @@ export default {
// building the popover menu
menu() {
return [{
- href: '#',
+ href: '/remote.php/dav/addressbooks/users/admin/Contacts/',
icon: 'icon-public',
- text: 'Copy link',
- action: () => {
- alert('share link')
- }
+ text: t('settings', 'Copy link'),
+ action: ''
},
{
- href: '#',
+ href: '/remote.php/dav/addressbooks/users/admin/Contacts/?export',
icon: 'icon-download',
- text: 'Download'
+ text: t('settings', 'Download'),
+ action: ''
},
{
icon: 'icon-rename',
- text: 'Rename',
- action: () => {
- this.renameAddressbook()
- }
+ text: t('settings', 'Rename'),
+ action: this.renameAddressbook
},
{
icon: 'checkbox',
- text: 'Enabled',
+ text: this.enabled ? t('settings', 'Enabled') : t('settings', 'Disabled'),
input: 'checkbox',
model: this.enabled,
- action: () => {
- this.$store.dispatch('toggleAddressbookEnabled', this.addressbook)
- }
+ action: this.toggleAddressbookEnabled
},
{
icon: 'icon-delete',
- text: 'Delete',
- action: () => {
- this.$store.dispatch('deleteAddressbook', this.addressbook)
- }
+ text: t('settings', 'Delete'),
+ action: this.deleteAddressbook
}]
}
},
+ mounted() {
+ // required if popup needs to stay opened after menu click
+ this.popupItem = this.$el
+ },
methods: {
+ toggleAddressbookEnabled() {
+ this.$store.dispatch('toggleAddressbookEnabled', this.addressbook)
+ },
+ deleteAddressbook() {
+ this.$store.dispatch('deleteAddressbook', this.addressbook)
+ },
toggleShare() {
this.shareOpen = !this.shareOpen
},