summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--css/settings/settings-addressbook.scss1
-rw-r--r--src/components/Settings/SettingsAddressbook.vue41
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
},