diff options
author | Jessica <jessica@Absolventas-MacBook-Pro.local> | 2018-09-04 17:07:19 +0200 |
---|---|---|
committer | Jessica <jessica@Absolventas-MacBook-Pro.local> | 2018-09-04 17:07:19 +0200 |
commit | f2951292aa873852d0ef024226293445c2870c7f (patch) | |
tree | cdab24f884cf487a78625b93fe39c687940a8cea | |
parent | f15ed0d145499bff33fef39b3d074c8376da07b4 (diff) |
added webdav links for copy link and download, tidied code for popover menu creation
-rw-r--r-- | css/settings/settings-addressbook.scss | 1 | ||||
-rw-r--r-- | src/components/Settings/SettingsAddressbook.vue | 41 |
2 files changed, 23 insertions, 19 deletions
diff --git a/css/settings/settings-addressbook.scss b/css/settings/settings-addressbook.scss index 3276073d..c6c8e508 100644 --- a/css/settings/settings-addressbook.scss +++ b/css/settings/settings-addressbook.scss @@ -52,6 +52,7 @@ overflow: hidden; text-overflow: ellipsis; padding-left: 7px; + opacity: 0.7; } &__share, 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 }, |