diff --git a/package-lock.json b/package-lock.json index c392aac3..0669807a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7631,9 +7631,9 @@ } }, "nextcloud-vue": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/nextcloud-vue/-/nextcloud-vue-0.4.2.tgz", - "integrity": "sha512-4aePhl0VqpJw9LqNsQenPFmQ6I715vbOAlfVjPMdqVqoKnN9r2gr87/PfNeOLkVFrfo0vaYPx4QS0JSiLsAiqg==", + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/nextcloud-vue/-/nextcloud-vue-0.4.6.tgz", + "integrity": "sha512-INrIz3RmxxUCrM/xy2ytLvrrZr131p0DOT87A+IH0/+LFlfK//eR0uB32lSUsqh9Tb+bkTyu8Ztq9iuTrFfl2Q==", "requires": { "@babel/polyfill": "^7.0.0", "md5": "^2.2.1", diff --git a/package.json b/package.json index 104c92d3..667b9fc7 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "@babel/polyfill": "^7.0.0", "linkifyjs": "^2.1.7", "nextcloud-axios": "^0.1.2", - "nextcloud-vue": "^0.4.2", + "nextcloud-vue": "^0.4.6", "tributejs": "^3.3.5", "twemoji": "^11.2.0", "uuid": "^3.3.2", diff --git a/src/components/Composer.vue b/src/components/Composer.vue index 3bcbf30c..66794749 100644 --- a/src/components/Composer.vue +++ b/src/components/Composer.vue @@ -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') } @@ -433,7 +446,7 @@ export default { emoji.replaceWith(em) }) let to = [] - const re = /@(([\w-\_.]+)(@[\w-.]+)?)/g + const re = /@(([\w-_.]+)(@[\w-.]+)?)/g let match = null do { match = re.exec(element.innerText)