fix eslint errors

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
pull/1162/head
Julien Veyssier 2020-12-14 19:33:14 +01:00 zatwierdzone przez Carl Schwan
rodzic 0915e4e101
commit c2524c6707
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: C3AA6B3A5EFA7AC5
2 zmienionych plików z 15 dodań i 17 usunięć

Wyświetl plik

@ -12,11 +12,10 @@
*/ */
import Vue from 'vue' import Vue from 'vue'
import { translate, translatePlural } from '@nextcloud/l10n' import Dashboard from './views/Dashboard.vue'
import Dashboard from './views/Dashboard'
Vue.prototype.t = translate Vue.prototype.t = t
Vue.prototype.n = translatePlural Vue.prototype.n = n
Vue.prototype.OC = window.OC Vue.prototype.OC = window.OC
Vue.prototype.OCA = window.OCA Vue.prototype.OCA = window.OCA
@ -25,7 +24,7 @@ document.addEventListener('DOMContentLoaded', function() {
OCA.Dashboard.register('social_notifications', (el, { widget }) => { OCA.Dashboard.register('social_notifications', (el, { widget }) => {
const View = Vue.extend(Dashboard) const View = Vue.extend(Dashboard)
new View({ new View({
propsData: { title: widget.title }, propsData: { title: widget.title }
}).$mount(el) }).$mount(el)
}) })

Wyświetl plik

@ -23,8 +23,7 @@
<script> <script>
import axios from '@nextcloud/axios' import axios from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router' import { generateUrl } from '@nextcloud/router'
import { showError, showSuccess } from '@nextcloud/dialogs' import { showError } from '@nextcloud/dialogs'
import moment from '@nextcloud/moment'
import { DashboardWidget } from '@nextcloud/vue-dashboard' import { DashboardWidget } from '@nextcloud/vue-dashboard'
import EmptyContent from '@nextcloud/vue/dist/Components/EmptyContent' import EmptyContent from '@nextcloud/vue/dist/Components/EmptyContent'
@ -33,14 +32,14 @@ export default {
components: { components: {
DashboardWidget, DashboardWidget,
EmptyContent, EmptyContent
}, },
props: { props: {
title: { title: {
type: String, type: String,
required: true, required: true
}, }
}, },
data() { data() {
@ -50,7 +49,7 @@ export default {
showMoreText: t('social', 'Social notifications'), showMoreText: t('social', 'Social notifications'),
loop: null, loop: null,
state: 'loading', state: 'loading',
appUrl: generateUrl('/apps/social'), appUrl: generateUrl('/apps/social')
} }
}, },
@ -64,7 +63,7 @@ export default {
avatarUsername: this.getActorName(n), avatarUsername: this.getActorName(n),
overlayIconUrl: this.getNotificationTypeImage(n), overlayIconUrl: this.getNotificationTypeImage(n),
mainText: this.getMainText(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'
} }
return 'icon-checkmark' return 'icon-checkmark'
}, }
}, },
beforeMount() { beforeMount() {
@ -100,8 +99,8 @@ export default {
fetchNotifications() { fetchNotifications() {
const req = { const req = {
params: { params: {
limit: 10, limit: 10
}, }
} }
const url = generateUrl('/apps/social/api/v1/stream/notifications') const url = generateUrl('/apps/social/api/v1/stream/notifications')
// TODO check why 'since' param is in fact 'until' // TODO check why 'since' param is in fact 'until'
@ -188,8 +187,8 @@ export default {
return generateUrl('/svg/social/add_user') return generateUrl('/svg/social/add_user')
} }
return '' return ''
}, }
}, }
} }
</script> </script>