@antelopejs/dms 0.21.4-next.1006.g63d3e11 → 0.21.4-next.1007.gae3a8da
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/frontend-vue/layers/dms-layout/app/build/components/notification/NotificationPopover.vue +10 -2
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationInboxItem.vue +8 -2
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/notificationDisplay.ts +13 -0
- package/package.json +2 -2
package/frontend-vue/layers/dms-layout/app/build/components/notification/NotificationPopover.vue
CHANGED
|
@@ -8,7 +8,10 @@ import {
|
|
|
8
8
|
settledRenderedBellCounts,
|
|
9
9
|
type UserNotification,
|
|
10
10
|
} from "../../../composables/notification/useNotifications";
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
formatNotificationFullTime,
|
|
13
|
+
resolveNotificationTone,
|
|
14
|
+
} from "../pages/settings/notification/notificationDisplay";
|
|
12
15
|
import { DMS_TONE_SOLID, iconWellToneOf } from "#dms-ui/app/entries/utils/tone";
|
|
13
16
|
import DmsRowSkeleton from "#dms-ui/app/entries/components/skeleton/RowSkeleton";
|
|
14
17
|
|
|
@@ -227,7 +230,12 @@ const goToNotifications = () => {
|
|
|
227
230
|
}}
|
|
228
231
|
</div>
|
|
229
232
|
<div class="text-muted mt-1 text-[10px]">
|
|
230
|
-
|
|
233
|
+
<time
|
|
234
|
+
:datetime="notification.createdAt"
|
|
235
|
+
:title="formatNotificationFullTime(notification.createdAt, locale)"
|
|
236
|
+
>
|
|
237
|
+
{{ formatRelativeTime(notification.createdAt, t, locale) }}
|
|
238
|
+
</time>
|
|
231
239
|
</div>
|
|
232
240
|
</template>
|
|
233
241
|
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
MODULE_TAG_CLASS,
|
|
5
5
|
type NotificationSourceTag,
|
|
6
6
|
SOURCE_TAG_CLASS,
|
|
7
|
+
formatNotificationFullTime,
|
|
7
8
|
resolveNotificationTone,
|
|
8
9
|
} from "./notificationDisplay";
|
|
9
10
|
|
|
@@ -19,7 +20,7 @@ const emit = defineEmits<{
|
|
|
19
20
|
toggleRead: [];
|
|
20
21
|
delete: [];
|
|
21
22
|
}>();
|
|
22
|
-
const { t } = useI18n();
|
|
23
|
+
const { t, locale } = useI18n();
|
|
23
24
|
const { processI18n } = useTranslation();
|
|
24
25
|
|
|
25
26
|
const isUnread = computed(() => !props.notification.isRead);
|
|
@@ -27,6 +28,9 @@ const iconWellTone = computed(() => {
|
|
|
27
28
|
const tone = resolveNotificationTone(props.notification);
|
|
28
29
|
return tone === "neutral" ? "muted" : tone;
|
|
29
30
|
});
|
|
31
|
+
const fullTime = computed(() =>
|
|
32
|
+
formatNotificationFullTime(props.notification.createdAt, locale.value),
|
|
33
|
+
);
|
|
30
34
|
const readToggleLabel = computed(() =>
|
|
31
35
|
isUnread.value
|
|
32
36
|
? t("page.settings.notifications.mark_read")
|
|
@@ -71,7 +75,9 @@ const actionLabelUi = {
|
|
|
71
75
|
}}
|
|
72
76
|
</template>
|
|
73
77
|
<template #meta>
|
|
74
|
-
<time :datetime="props.notification.createdAt">{{
|
|
78
|
+
<time :datetime="props.notification.createdAt" :title="fullTime">{{
|
|
79
|
+
props.time
|
|
80
|
+
}}</time>
|
|
75
81
|
<span
|
|
76
82
|
v-if="props.source"
|
|
77
83
|
:class="[SOURCE_TAG_CLASS, props.source.isModule && MODULE_TAG_CLASS]"
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { formatDate } from "#dms-core/app/utils/formatter";
|
|
1
2
|
import { MONO_TAG_CLASS } from "#dms-ui/app/entries/utils/monoChip";
|
|
2
3
|
import {
|
|
3
4
|
formatShortDate,
|
|
@@ -82,6 +83,18 @@ export const formatNotificationTime = (
|
|
|
82
83
|
return formatShortDate(date, now, locale);
|
|
83
84
|
};
|
|
84
85
|
|
|
86
|
+
const FULL_TIME_FORMAT: Intl.DateTimeFormatOptions = {
|
|
87
|
+
dateStyle: "medium",
|
|
88
|
+
timeStyle: "short",
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/** The exact date and time, in the user's language, for a time's hover title. */
|
|
92
|
+
export const formatNotificationFullTime = (
|
|
93
|
+
createdAt: string,
|
|
94
|
+
locale: string,
|
|
95
|
+
): string | undefined =>
|
|
96
|
+
formatDate(createdAt, locale, FULL_TIME_FORMAT) ?? undefined;
|
|
97
|
+
|
|
85
98
|
/**
|
|
86
99
|
* The matrix lays out from its own width (`@container/matrix` on the table),
|
|
87
100
|
* not the viewport's: the settings column at 1024px is narrower than a phone
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/dms",
|
|
3
|
-
"version": "0.21.4-next.
|
|
3
|
+
"version": "0.21.4-next.1007.gae3a8da",
|
|
4
4
|
"description": "AntelopeJS DMS. Plug in your PostgreSQL, MySQL, MariaDB, MongoDB or RethinkDB database and your coding agent builds a back office and analytics dashboard as typed TypeScript. Real-time updates on the data the DMS manages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antelopejs",
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
"optional": true
|
|
214
214
|
}
|
|
215
215
|
},
|
|
216
|
-
"gitHead": "
|
|
216
|
+
"gitHead": "ae3a8daf5284e30df23c1b58d30e0bdb2952a4e7",
|
|
217
217
|
"scripts": {
|
|
218
218
|
"build": "pnpm --filter @antelopejs/interface-dms --filter @antelopejs/interface-dms-builder build && rimraf dist && antelopejs-tsc && tsc-alias && tsc -p e2e/tsconfig.types.json",
|
|
219
219
|
"dev": "ajs project run --inspect -w -p playground",
|