Skip to content

Commit

Permalink
Fix empty content for mail
Browse files Browse the repository at this point in the history
Signed-off-by: GretaD <gretadoci@gmail.com>
  • Loading branch information
GretaD committed Aug 24, 2020
1 parent 4305007 commit e68e585
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 10 additions & 17 deletions src/views/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,12 @@
</DashboardWidgetItem>
</template>
<template v-slot:empty-content>
<div class="empty-content">
<img class="empty-content__image" :src="emptyImage">
<p class="empty-content__text">
{{ t('mail', 'No messages found yet') }}
</p>
<EmptyContent id="mail--empty-content" icon="icon-mail">
<template #desc>
{{ t('mail', 'No important message found yet') }}
<a v-if="accounts.length === 0" :href="accountSetupUrl" class="button">{{ t('mail', 'Set up an account') }}</a>
</div>
</template>
</EmptyContent>
</template>
</DashboardWidget>
</template>
Expand All @@ -57,6 +56,7 @@ import Avatar from '../components/Avatar'
import { DashboardWidget, DashboardWidgetItem } from '@nextcloud/vue-dashboard'
import orderBy from 'lodash/fp/orderBy'
import prop from 'lodash/fp/prop'
import EmptyContent from '@nextcloud/vue/dist/Components/EmptyContent'
const accounts = loadState('mail', 'mail-accounts')
const orderByDateInt = orderBy(prop('dateInt'), 'desc')
Expand All @@ -67,6 +67,7 @@ export default {
Avatar,
DashboardWidget,
DashboardWidgetItem,
EmptyContent,
},
data() {
return {
Expand Down Expand Up @@ -113,18 +114,10 @@ export default {
</script>

<style lang="scss" scoped>
.empty-content {
text-align: center;
#mail--empty-content {
margin-top: 50px;
}
.empty-content__image {
width: 80%;
margin: auto;
margin-bottom: 10px;
}
.empty-content__text {
color: var(--color-text-maxcontrast);
text-align: center;
margin-bottom: 10px;
.empty-content {
margin-top: 50px;
}
</style>

0 comments on commit e68e585

Please sign in to comment.