Skip to content

Commit 9ffdf76

Browse files
authored
Better no task placeholder (#365)
1 parent 23fcdd3 commit 9ffdf76

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/components/sidebar/tabs/QueueSideBarTab.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,11 @@
6060
</Column>
6161
</DataTable>
6262
<div v-else>
63-
<Message icon="pi pi-info" severity="error">
64-
<span class="ml-2">No tasks</span>
65-
</Message>
63+
<NoResultsPlaceholder
64+
icon="pi pi-info-circle"
65+
:title="$t('noTasksFound')"
66+
:message="$t('noTasksFoundMessage')"
67+
/>
6668
</div>
6769
</template>
6870

@@ -73,7 +75,7 @@ import Tag from 'primevue/tag'
7375
import Button from 'primevue/button'
7476
import ConfirmPopup from 'primevue/confirmpopup'
7577
import Toast from 'primevue/toast'
76-
import Message from 'primevue/message'
78+
import NoResultsPlaceholder from '@/components/common/NoResultsPlaceholder.vue'
7779
import { useConfirm } from 'primevue/useconfirm'
7880
import { useToast } from 'primevue/usetoast'
7981
import {

src/i18n.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ const messages = {
77
noResultsFound: 'No Results Found',
88
searchFailedMessage:
99
"We couldn't find any settings matching your search. Try adjusting your search terms.",
10+
noTasksFound: 'No Tasks Found',
11+
noTasksFoundMessage: 'There are no tasks in the queue.',
1012
sideToolBar: {
1113
themeToggle: 'Toggle Theme',
1214
queue: 'Queue',
@@ -20,6 +22,8 @@ const messages = {
2022
settings: '设置',
2123
searchSettings: '搜索设置',
2224
noResultsFound: '未找到结果',
25+
noTasksFound: '未找到任务',
26+
noTasksFoundMessage: '队列中没有任务。',
2327
searchFailedMessage:
2428
'我们找不到与您的搜索匹配的任何设置。请尝试调整搜索条件。',
2529
sideToolBar: {

0 commit comments

Comments
 (0)