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 25, 2020
1 parent 4305007 commit bfd92ee
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 29 deletions.
21 changes: 12 additions & 9 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"svg-inline-loader": "^0.8.2",
"url-loader": "^4.1.0",
"vue-loader": "^15.9.3",
"vue-server-renderer": "^2.6.11",
"vue-server-renderer": "^2.6.12",
"vue-template-compiler": "^2.6.12",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12",
Expand Down
28 changes: 9 additions & 19 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 @@ -112,19 +113,8 @@ export default {
}
</script>

<style lang="scss" scoped>
.empty-content {
text-align: center;
<style lang="scss">
#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;
}
</style>

0 comments on commit bfd92ee

Please sign in to comment.