diff --git a/src/components/dialogs/UserDialog/UserDialog.vue b/src/components/dialogs/UserDialog/UserDialog.vue
index 9a7bfef0..5c14a1fa 100644
--- a/src/components/dialogs/UserDialog/UserDialog.vue
+++ b/src/components/dialogs/UserDialog/UserDialog.vue
@@ -978,18 +978,31 @@
+
+
+
+
![]()
+
+
+
+
+
+
+
-
-
![]()
-
-
-
-
-
+ v-else-if="!userDialog.isWorldsLoading"
+ style="
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ min-height: 120px;
+ width: 100%;
+ ">
+
@@ -1055,7 +1068,7 @@
- No favorite worlds found.
+
@@ -1127,25 +1140,41 @@
+
+
+
+
![]()
+
+
+
+
+
+
+
+
+
-
-
![]()
-
-
-
-
-
-
-
+ v-else-if="!userDialog.isAvatarsLoading"
+ style="
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ min-height: 120px;
+ width: 100%;
+ ">
+
@@ -1217,6 +1246,7 @@
import { DialogDescription, DialogHeader, DialogTitle } from '@/components/ui/dialog';
import { Button } from '@/components/ui/button';
import { Checkbox } from '@/components/ui/checkbox';
+ import { DataTableEmpty } from '@/components/ui/data-table';
import { Spinner } from '@/components/ui/spinner';
import { TabsUnderline } from '@/components/ui/tabs';
import { storeToRefs } from 'pinia';
diff --git a/src/components/ui/data-table/DataTableEmpty.vue b/src/components/ui/data-table/DataTableEmpty.vue
new file mode 100644
index 00000000..560a891a
--- /dev/null
+++ b/src/components/ui/data-table/DataTableEmpty.vue
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+ {{ emptyText }}
+
+
+
+
+
+
diff --git a/src/components/ui/data-table/DataTableLayout.vue b/src/components/ui/data-table/DataTableLayout.vue
index e6af6c32..14b033c0 100644
--- a/src/components/ui/data-table/DataTableLayout.vue
+++ b/src/components/ui/data-table/DataTableLayout.vue
@@ -59,9 +59,9 @@
-
+
- {{ emptyText }}
+
@@ -134,6 +134,8 @@
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '../table';
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../select';
+ import DataTableEmpty from './DataTableEmpty.vue';
+
const appearanceSettingsStore = useAppearanceSettingsStore();
const { isDataTableStriped } = storeToRefs(appearanceSettingsStore);
@@ -162,10 +164,6 @@
type: Array,
default: () => []
},
- emptyText: {
- type: String,
- default: 'No results.'
- },
showPagination: {
type: Boolean,
default: true
@@ -187,6 +185,11 @@
const { t } = useI18n();
const tableScrollRef = ref(null);
+ const emptyType = computed(() => {
+ const totalRows = props.table?.getCoreRowModel?.().rows?.length ?? 0;
+ return totalRows === 0 ? 'nodata' : 'nomatch';
+ });
+
const expandedRenderer = computed(() => {
const columns = props.table.getAllColumns?.() ?? [];
for (const column of columns) {
diff --git a/src/components/ui/data-table/index.js b/src/components/ui/data-table/index.js
index bf2f48a0..52afe5a6 100644
--- a/src/components/ui/data-table/index.js
+++ b/src/components/ui/data-table/index.js
@@ -1 +1,2 @@
export { default as DataTableLayout } from './DataTableLayout.vue';
+export { default as DataTableEmpty } from './DataTableEmpty.vue';
diff --git a/src/components/ui/empty/Empty.vue b/src/components/ui/empty/Empty.vue
new file mode 100644
index 00000000..4b5549ec
--- /dev/null
+++ b/src/components/ui/empty/Empty.vue
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/empty/EmptyContent.vue b/src/components/ui/empty/EmptyContent.vue
new file mode 100644
index 00000000..3a417ee9
--- /dev/null
+++ b/src/components/ui/empty/EmptyContent.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/empty/EmptyDescription.vue b/src/components/ui/empty/EmptyDescription.vue
new file mode 100644
index 00000000..ccf345e1
--- /dev/null
+++ b/src/components/ui/empty/EmptyDescription.vue
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/empty/EmptyHeader.vue b/src/components/ui/empty/EmptyHeader.vue
new file mode 100644
index 00000000..ecb54d10
--- /dev/null
+++ b/src/components/ui/empty/EmptyHeader.vue
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/empty/EmptyMedia.vue b/src/components/ui/empty/EmptyMedia.vue
new file mode 100644
index 00000000..a3183919
--- /dev/null
+++ b/src/components/ui/empty/EmptyMedia.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/empty/EmptyTitle.vue b/src/components/ui/empty/EmptyTitle.vue
new file mode 100644
index 00000000..ca2e432e
--- /dev/null
+++ b/src/components/ui/empty/EmptyTitle.vue
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/empty/index.js b/src/components/ui/empty/index.js
new file mode 100644
index 00000000..f26a0c76
--- /dev/null
+++ b/src/components/ui/empty/index.js
@@ -0,0 +1,23 @@
+import { cva } from 'class-variance-authority';
+
+export { default as Empty } from './Empty.vue';
+export { default as EmptyContent } from './EmptyContent.vue';
+export { default as EmptyDescription } from './EmptyDescription.vue';
+export { default as EmptyHeader } from './EmptyHeader.vue';
+export { default as EmptyMedia } from './EmptyMedia.vue';
+export { default as EmptyTitle } from './EmptyTitle.vue';
+
+export const emptyMediaVariants = cva(
+ 'mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0',
+ {
+ variants: {
+ variant: {
+ default: 'bg-transparent',
+ icon: "bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6"
+ }
+ },
+ defaultVariants: {
+ variant: 'default'
+ }
+ }
+);
diff --git a/src/localization/en.json b/src/localization/en.json
index e73ac534..3f0ddf46 100644
--- a/src/localization/en.json
+++ b/src/localization/en.json
@@ -2437,6 +2437,10 @@
"action": "Action"
}
},
+ "common": {
+ "no_data": "No data",
+ "no_matching_records": "No matching records"
+ },
"vr": {
"status": {
"timer": "Timer:",
diff --git a/src/views/Charts/components/InstanceActivity.vue b/src/views/Charts/components/InstanceActivity.vue
index 84c3467a..458311f5 100644
--- a/src/views/Charts/components/InstanceActivity.vue
+++ b/src/views/Charts/components/InstanceActivity.vue
@@ -6,7 +6,7 @@
{{ t('view.charts.instance_activity.header') }}
-
+
@@ -23,7 +23,7 @@
- No data here, try another day
+
@@ -165,6 +165,7 @@
import { HoverCard, HoverCardContent, HoverCardTrigger } from '@/components/ui/hover-card';
import { fromDate, getLocalTimeZone, today } from '@internationalized/date';
import { Button } from '@/components/ui/button';
+ import { DataTableEmpty } from '@/components/ui/data-table';
import { ButtonGroup } from '@/components/ui/button-group';
import { Calendar } from '@/components/ui/calendar';
import { Separator } from '@/components/ui/separator';
diff --git a/src/views/Charts/components/InstanceActivityDetail.vue b/src/views/Charts/components/InstanceActivityDetail.vue
index ae58c15b..37941e8e 100644
--- a/src/views/Charts/components/InstanceActivityDetail.vue
+++ b/src/views/Charts/components/InstanceActivityDetail.vue
@@ -10,12 +10,16 @@
-
+
+
+
+