Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing half-empty dashboard empty content view #3407

Merged
merged 2 commits into from
Oct 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion src/components/NcDashboardWidget/NcDashboardWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,41 @@ export default {
</script>
```

### Showing items and a half empty content message
```vue
<template>
<NcDashboardWidget :items="items"
:show-items-and-empty-content="true"
:half-empty-content-message="'No unread items'">
<template #default="{ item }">
{{ item.title }}
</template>
</NcDashboardWidget>
</template>

<script>
const myItems = [
{
title: 'first',
content: 'blabla',
},
{
title: 'second',
content: 'fuzzfuzz',
},
]
export default {
name: 'MyDashboardWidget',
props: [],
data() {
return {
items: myItems
}
},
}
</script>
```

### Complete example using NcDashboardWidgetItem

```vue
Expand Down Expand Up @@ -140,7 +175,7 @@ export default {
<div class="dashboard-widget">
<!-- This element is shown if we have items, but want to show a general message as well.
Can be used e.g. to show "No mentions" on top of the item list. -->
<NcEmptyContent v-if="showHalfNcArea"
<NcEmptyContent v-if="showHalfEmptyContentArea"
:description="halfEmptyContentString"
class="half-screen">
<template #icon>
Expand Down