From ea9312034c60e1fae08e43b08aaa8e3c6810ef7d Mon Sep 17 00:00:00 2001 From: Jonas Sulzer Date: Thu, 29 Nov 2018 14:21:32 +0100 Subject: [PATCH 1/3] highlight active popovermenu entry needs nextcloud/nextcloud-vue#130 Signed-off-by: Jonas Sulzer --- src/components/Composer.vue | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/components/Composer.vue b/src/components/Composer.vue index 3bcbf30c..aa8e5e85 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') } From 4041d576a92b396bb229b9a271367e90badb60c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 30 Nov 2018 10:17:27 +0100 Subject: [PATCH 2/3] Bump nextcloud-vue version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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", From b5751b95f2cec6fc971c72f8a4d635143f1008b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 30 Nov 2018 10:22:49 +0100 Subject: [PATCH 3/3] Fix eslint error with unecessary escape character MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/components/Composer.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Composer.vue b/src/components/Composer.vue index aa8e5e85..66794749 100644 --- a/src/components/Composer.vue +++ b/src/components/Composer.vue @@ -446,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)