highlight active popovermenu entry

needs nextcloud/nextcloud-vue#130

Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>
pull/78/head
Jonas Sulzer 2018-11-29 14:21:32 +01:00 zatwierdzone przez Julius Härtl
rodzic 78f2b0ae6d
commit ea9312034c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4C614C6ED2CDE6DF
1 zmienionych plików z 13 dodań i 0 usunięć

Wyświetl plik

@ -384,29 +384,42 @@ export default {
}
}
},
activeState() {
return (type) => {
if (type === this.type) {
return true
} else {
return false
}
}
},
visibilityPopover() {
return [
{
action: () => { this.switchType('direct') },
icon: this.visibilityIconClass('direct'),
active: this.activeState('direct'),
text: t('social', 'Direct'),
longtext: t('social', 'Post to mentioned users only')
},
{
action: () => { this.switchType('unlisted') },
icon: this.visibilityIconClass('unlisted'),
active: this.activeState('unlisted'),
text: t('social', 'Unlisted'),
longtext: t('social', 'Do not post to public timelines')
},
{
action: () => { this.switchType('followers') },
icon: this.visibilityIconClass('followers'),
active: this.activeState('followers'),
text: t('social', 'Followers'),
longtext: t('social', 'Post to followers only')
},
{
action: () => { this.switchType('public') },
icon: this.visibilityIconClass('public'),
active: this.activeState('public'),
text: t('social', 'Public'),
longtext: t('social', 'Post to public timelines')
}