summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Veyssier <eneiluj@posteo.net>2020-12-14 19:33:14 +0100
committerCarl Schwan <carl@carlschwan.eu>2022-09-14 14:46:57 +0200
commitc2524c6707826b85091d296d43488a1915dbb96e (patch)
treebdb277cfeca853f0a3630e677f2bbb8f60c8b5bd
parent0915e4e1013c12a30372c713c2fe057acc119991 (diff)
fix eslint errors
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
-rw-r--r--src/dashboard.js9
-rw-r--r--src/views/Dashboard.vue23
2 files changed, 15 insertions, 17 deletions
diff --git a/src/dashboard.js b/src/dashboard.js
index 48132a91..8c2720ef 100644
--- a/src/dashboard.js
+++ b/src/dashboard.js
@@ -12,11 +12,10 @@
*/
import Vue from 'vue'
-import { translate, translatePlural } from '@nextcloud/l10n'
-import Dashboard from './views/Dashboard'
+import Dashboard from './views/Dashboard.vue'
-Vue.prototype.t = translate
-Vue.prototype.n = translatePlural
+Vue.prototype.t = t
+Vue.prototype.n = n
Vue.prototype.OC = window.OC
Vue.prototype.OCA = window.OCA
@@ -25,7 +24,7 @@ document.addEventListener('DOMContentLoaded', function() {
OCA.Dashboard.register('social_notifications', (el, { widget }) => {
const View = Vue.extend(Dashboard)
new View({
- propsData: { title: widget.title },
+ propsData: { title: widget.title }
}).$mount(el)
})
diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue
index bb5cbf8a..ead86748 100644
--- a/src/views/Dashboard.vue
+++ b/src/views/Dashboard.vue
@@ -23,8 +23,7 @@
<script>
import axios from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
-import { showError, showSuccess } from '@nextcloud/dialogs'
-import moment from '@nextcloud/moment'
+import { showError } from '@nextcloud/dialogs'
import { DashboardWidget } from '@nextcloud/vue-dashboard'
import EmptyContent from '@nextcloud/vue/dist/Components/EmptyContent'
@@ -33,14 +32,14 @@ export default {
components: {
DashboardWidget,
- EmptyContent,
+ EmptyContent
},
props: {
title: {
type: String,
- required: true,
- },
+ required: true
+ }
},
data() {
@@ -50,7 +49,7 @@ export default {
showMoreText: t('social', 'Social notifications'),
loop: null,
state: 'loading',
- appUrl: generateUrl('/apps/social'),
+ appUrl: generateUrl('/apps/social')
}
},
@@ -64,7 +63,7 @@ export default {
avatarUsername: this.getActorName(n),
overlayIconUrl: this.getNotificationTypeImage(n),
mainText: this.getMainText(n),
- subText: this.getSubline(n),
+ subText: this.getSubline(n)
}
})
},
@@ -88,7 +87,7 @@ export default {
return 'icon-checkmark'
}
return 'icon-checkmark'
- },
+ }
},
beforeMount() {
@@ -100,8 +99,8 @@ export default {
fetchNotifications() {
const req = {
params: {
- limit: 10,
- },
+ limit: 10
+ }
}
const url = generateUrl('/apps/social/api/v1/stream/notifications')
// TODO check why 'since' param is in fact 'until'
@@ -188,8 +187,8 @@ export default {
return generateUrl('/svg/social/add_user')
}
return ''
- },
- },
+ }
+ }
}
</script>