Skip to content

Commit

Permalink
Merge pull request #3479 from nextcloud/bugfix/noid/emptycontent
Browse files Browse the repository at this point in the history
Fix dashboard empty content
  • Loading branch information
ChristophWurst authored Sep 2, 2020
2 parents 1f37e7d + 5e85556 commit c866057
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 31 deletions.
19 changes: 8 additions & 11 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.12",
"vue-server-renderer": "^2.6.11",
"vue-template-compiler": "^2.6.12",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12",
Expand Down
35 changes: 16 additions & 19 deletions src/views/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@
</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>
<a v-if="accounts.length === 0" :href="accountSetupUrl" class="button">{{ t('mail', 'Set up an account') }}</a>
</div>
<EmptyContent id="mail--empty-content" icon="icon-checkmark">
<template #desc>
{{ t('mail', 'No message found yet') }}
<div class="no-account">
<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 @@ -55,6 +56,7 @@ import { generateUrl, imagePath } from '@nextcloud/router'
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'
import Avatar from '../components/Avatar'
import { fetchEnvelopes } from '../service/MessageService'
Expand All @@ -70,6 +72,7 @@ export default {
Avatar,
DashboardWidget,
DashboardWidgetItem,
EmptyContent,
},
data() {
return {
Expand Down Expand Up @@ -130,19 +133,13 @@ export default {
}
</script>

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

0 comments on commit c866057

Please sign in to comment.