mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 12:08:01 +00:00
<img width="1439" alt="Screenshot 2024-10-30 at 8 58 12 PM" src="https://github.com/user-attachments/assets/26231270-5e73-40fb-9efa-c661585ebe7c"> Fixes https://linear.app/chatwoot/project/campaign-redesign-f82bede26ca7/overview --------- Co-authored-by: Pranav <pranavrajs@gmail.com> Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
57 lines
1.4 KiB
Vue
57 lines
1.4 KiB
Vue
<script setup>
|
|
import EmptyStateLayout from 'dashboard/components-next/EmptyStateLayout.vue';
|
|
import Button from 'dashboard/components-next/button/Button.vue';
|
|
import ArticleCard from 'dashboard/components-next/HelpCenter/ArticleCard/ArticleCard.vue';
|
|
import articleContent from 'dashboard/components-next/HelpCenter/EmptyState/Portal/portalEmptyStateContent.js';
|
|
|
|
defineProps({
|
|
title: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
subtitle: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
showButton: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
buttonLabel: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
});
|
|
|
|
const emit = defineEmits(['click']);
|
|
|
|
const onClick = () => {
|
|
emit('click');
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<EmptyStateLayout :title="title" :subtitle="subtitle">
|
|
<template #empty-state-item>
|
|
<div class="grid grid-cols-1 gap-4 p-px overflow-hidden">
|
|
<ArticleCard
|
|
v-for="(article, index) in articleContent.slice(0, 5)"
|
|
:id="article.id"
|
|
:key="`article-${index}`"
|
|
:title="article.title"
|
|
:status="article.status"
|
|
:updated-at="article.updatedAt"
|
|
:author="article.author"
|
|
:category="article.category"
|
|
:views="article.views"
|
|
/>
|
|
</div>
|
|
</template>
|
|
<template #actions>
|
|
<div v-if="showButton">
|
|
<Button :label="buttonLabel" icon="i-lucide-plus" @click="onClick" />
|
|
</div>
|
|
</template>
|
|
</EmptyStateLayout>
|
|
</template>
|