You've already forked AstralRinth
forked from didirus/AstralRinth
fix: standardize relative timestamping (#3612)
* fix(frontend): relative timestamps are incorrectly rounded. Closes: #1371 * fix(all): remove legacy fromNow for proper relative timestamp creation Closes: #1395
This commit is contained in:
@@ -19,7 +19,14 @@ import {
|
|||||||
WorldIcon,
|
WorldIcon,
|
||||||
XIcon,
|
XIcon,
|
||||||
} from '@modrinth/assets'
|
} from '@modrinth/assets'
|
||||||
import { Avatar, Button, ButtonStyled, Notifications, OverflowMenu } from '@modrinth/ui'
|
import {
|
||||||
|
Avatar,
|
||||||
|
Button,
|
||||||
|
ButtonStyled,
|
||||||
|
Notifications,
|
||||||
|
OverflowMenu,
|
||||||
|
useRelativeTime,
|
||||||
|
} from '@modrinth/ui'
|
||||||
import { useLoading, useTheming } from '@/store/state'
|
import { useLoading, useTheming } from '@/store/state'
|
||||||
import ModrinthAppLogo from '@/assets/modrinth_app.svg?component'
|
import ModrinthAppLogo from '@/assets/modrinth_app.svg?component'
|
||||||
import AccountsCard from '@/components/ui/AccountsCard.vue'
|
import AccountsCard from '@/components/ui/AccountsCard.vue'
|
||||||
@@ -62,6 +69,8 @@ import FriendsList from '@/components/ui/friends/FriendsList.vue'
|
|||||||
import { openUrl } from '@tauri-apps/plugin-opener'
|
import { openUrl } from '@tauri-apps/plugin-opener'
|
||||||
import QuickInstanceSwitcher from '@/components/ui/QuickInstanceSwitcher.vue'
|
import QuickInstanceSwitcher from '@/components/ui/QuickInstanceSwitcher.vue'
|
||||||
|
|
||||||
|
const formatRelativeTime = useRelativeTime()
|
||||||
|
|
||||||
const themeStore = useTheming()
|
const themeStore = useTheming()
|
||||||
|
|
||||||
const news = ref([])
|
const news = ref([])
|
||||||
@@ -590,7 +599,7 @@ function handleAuxClick(e) {
|
|||||||
</h4>
|
</h4>
|
||||||
<p class="my-1 text-sm text-secondary leading-tight">{{ item.summary }}</p>
|
<p class="my-1 text-sm text-secondary leading-tight">{{ item.summary }}</p>
|
||||||
<p class="text-right text-sm text-secondary opacity-60 leading-tight m-0">
|
<p class="text-right text-sm text-secondary opacity-60 leading-tight m-0">
|
||||||
{{ dayjs(item.date).fromNow() }}
|
{{ formatRelativeTime(dayjs(item.date).toISOString()) }}
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
<hr
|
<hr
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
StopCircleIcon,
|
StopCircleIcon,
|
||||||
TimerIcon,
|
TimerIcon,
|
||||||
} from '@modrinth/assets'
|
} from '@modrinth/assets'
|
||||||
import { Avatar, ButtonStyled } from '@modrinth/ui'
|
import { Avatar, ButtonStyled, useRelativeTime } from '@modrinth/ui'
|
||||||
import { convertFileSrc } from '@tauri-apps/api/core'
|
import { convertFileSrc } from '@tauri-apps/api/core'
|
||||||
import { finish_install, kill, run } from '@/helpers/profile'
|
import { finish_install, kill, run } from '@/helpers/profile'
|
||||||
import { get_by_profile_path } from '@/helpers/process'
|
import { get_by_profile_path } from '@/helpers/process'
|
||||||
@@ -19,10 +19,9 @@ import { showProfileInFolder } from '@/helpers/utils.js'
|
|||||||
import { handleSevereError } from '@/store/error.js'
|
import { handleSevereError } from '@/store/error.js'
|
||||||
import { trackEvent } from '@/helpers/analytics'
|
import { trackEvent } from '@/helpers/analytics'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import relativeTime from 'dayjs/plugin/relativeTime'
|
|
||||||
import { formatCategory } from '@modrinth/utils'
|
import { formatCategory } from '@modrinth/utils'
|
||||||
|
|
||||||
dayjs.extend(relativeTime)
|
const formatRelativeTime = useRelativeTime()
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
instance: {
|
instance: {
|
||||||
@@ -173,7 +172,9 @@ onUnmounted(() => unlisten())
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex items-center col-span-3 gap-1 text-secondary font-semibold">
|
<div class="flex items-center col-span-3 gap-1 text-secondary font-semibold">
|
||||||
<TimerIcon />
|
<TimerIcon />
|
||||||
<span class="text-sm"> Played {{ dayjs(instance.last_played).fromNow() }} </span>
|
<span class="text-sm">
|
||||||
|
Played {{ formatRelativeTime(dayjs(instance.last_played).toISOString()) }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Avatar, ButtonStyled, OverflowMenu } from '@modrinth/ui'
|
import { Avatar, ButtonStyled, OverflowMenu, useRelativeTime } from '@modrinth/ui'
|
||||||
import {
|
import {
|
||||||
UserPlusIcon,
|
UserPlusIcon,
|
||||||
MoreVerticalIcon,
|
MoreVerticalIcon,
|
||||||
@@ -18,6 +18,8 @@ import type { Dayjs } from 'dayjs'
|
|||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import ModalWrapper from '@/components/ui/modal/ModalWrapper.vue'
|
import ModalWrapper from '@/components/ui/modal/ModalWrapper.vue'
|
||||||
|
|
||||||
|
const formatRelativeTime = useRelativeTime()
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
credentials: unknown | null
|
credentials: unknown | null
|
||||||
signIn: () => void
|
signIn: () => void
|
||||||
@@ -205,7 +207,9 @@ onUnmounted(() => {
|
|||||||
You sent <span class="font-bold">{{ friend.username }}</span> a friend request
|
You sent <span class="font-bold">{{ friend.username }}</span> a friend request
|
||||||
</template>
|
</template>
|
||||||
</p>
|
</p>
|
||||||
<p class="m-0 text-sm text-secondary">{{ friend.created.fromNow() }}</p>
|
<p class="m-0 text-sm text-secondary">
|
||||||
|
{{ formatRelativeTime(friend.created.toISOString()) }}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<template v-if="friend.id === userCredentials.user_id">
|
<template v-if="friend.id === userCredentials.user_id">
|
||||||
|
|||||||
@@ -8,7 +8,14 @@ import {
|
|||||||
SpinnerIcon,
|
SpinnerIcon,
|
||||||
StopCircleIcon,
|
StopCircleIcon,
|
||||||
} from '@modrinth/assets'
|
} from '@modrinth/assets'
|
||||||
import { Avatar, ButtonStyled, commonMessages, OverflowMenu, SmartClickable } from '@modrinth/ui'
|
import {
|
||||||
|
Avatar,
|
||||||
|
ButtonStyled,
|
||||||
|
commonMessages,
|
||||||
|
OverflowMenu,
|
||||||
|
SmartClickable,
|
||||||
|
useRelativeTime,
|
||||||
|
} from '@modrinth/ui'
|
||||||
import { useVIntl } from '@vintl/vintl'
|
import { useVIntl } from '@vintl/vintl'
|
||||||
import { computed, nextTick, ref, onMounted, onUnmounted } from 'vue'
|
import { computed, nextTick, ref, onMounted, onUnmounted } from 'vue'
|
||||||
import { showProfileInFolder } from '@/helpers/utils'
|
import { showProfileInFolder } from '@/helpers/utils'
|
||||||
@@ -25,6 +32,7 @@ import { handleError } from '@/store/notifications'
|
|||||||
import { process_listener } from '@/helpers/events'
|
import { process_listener } from '@/helpers/events'
|
||||||
|
|
||||||
const { formatMessage } = useVIntl()
|
const { formatMessage } = useVIntl()
|
||||||
|
const formatRelativeTime = useRelativeTime()
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
@@ -144,7 +152,7 @@ onUnmounted(() => {
|
|||||||
<template v-if="instance.last_played">
|
<template v-if="instance.last_played">
|
||||||
{{
|
{{
|
||||||
formatMessage(commonMessages.playedLabel, {
|
formatMessage(commonMessages.playedLabel, {
|
||||||
time: dayjs(instance.last_played).fromNow(),
|
time: formatRelativeTime(instance.last_played.toISOString()),
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -7,6 +7,14 @@ import {
|
|||||||
showWorldInFolder,
|
showWorldInFolder,
|
||||||
} from '@/helpers/worlds.ts'
|
} from '@/helpers/worlds.ts'
|
||||||
import { formatNumber } from '@modrinth/utils'
|
import { formatNumber } from '@modrinth/utils'
|
||||||
|
import {
|
||||||
|
useRelativeTime,
|
||||||
|
Avatar,
|
||||||
|
ButtonStyled,
|
||||||
|
commonMessages,
|
||||||
|
OverflowMenu,
|
||||||
|
SmartClickable,
|
||||||
|
} from '@modrinth/ui'
|
||||||
import {
|
import {
|
||||||
IssuesIcon,
|
IssuesIcon,
|
||||||
EyeIcon,
|
EyeIcon,
|
||||||
@@ -25,7 +33,6 @@ import {
|
|||||||
UserIcon,
|
UserIcon,
|
||||||
XIcon,
|
XIcon,
|
||||||
} from '@modrinth/assets'
|
} from '@modrinth/assets'
|
||||||
import { Avatar, ButtonStyled, commonMessages, OverflowMenu, SmartClickable } from '@modrinth/ui'
|
|
||||||
import type { MessageDescriptor } from '@vintl/vintl'
|
import type { MessageDescriptor } from '@vintl/vintl'
|
||||||
import { defineMessages, useVIntl } from '@vintl/vintl'
|
import { defineMessages, useVIntl } from '@vintl/vintl'
|
||||||
import type { Component } from 'vue'
|
import type { Component } from 'vue'
|
||||||
@@ -36,6 +43,7 @@ import { useRouter } from 'vue-router'
|
|||||||
import { Tooltip } from 'floating-vue'
|
import { Tooltip } from 'floating-vue'
|
||||||
|
|
||||||
const { formatMessage } = useVIntl()
|
const { formatMessage } = useVIntl()
|
||||||
|
const formatRelativeTime = useRelativeTime()
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
@@ -255,7 +263,7 @@ const messages = defineMessages({
|
|||||||
<template v-if="world.last_played">
|
<template v-if="world.last_played">
|
||||||
{{
|
{{
|
||||||
formatMessage(commonMessages.playedLabel, {
|
formatMessage(commonMessages.playedLabel, {
|
||||||
time: dayjs(world.last_played).fromNow(),
|
time: formatRelativeTime(dayjs(world.last_played).toISOString()),
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -184,7 +184,7 @@
|
|||||||
"
|
"
|
||||||
class="date"
|
class="date"
|
||||||
>
|
>
|
||||||
{{ fromNow(notif.extra_data.version.date_published) }}
|
{{ formatRelativeTime(notif.extra_data.version.date_published) }}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -201,7 +201,7 @@
|
|||||||
v-tooltip="$dayjs(notification.created).format('MMMM D, YYYY [at] h:mm A')"
|
v-tooltip="$dayjs(notification.created).format('MMMM D, YYYY [at] h:mm A')"
|
||||||
class="inline-flex"
|
class="inline-flex"
|
||||||
>
|
>
|
||||||
<CalendarIcon class="mr-1" /> Received {{ fromNow(notification.created) }}
|
<CalendarIcon class="mr-1" /> Received {{ formatRelativeTime(notification.created) }}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<div v-if="compact" class="notification__actions">
|
<div v-if="compact" class="notification__actions">
|
||||||
@@ -331,6 +331,7 @@ import {
|
|||||||
XIcon,
|
XIcon,
|
||||||
ExternalIcon,
|
ExternalIcon,
|
||||||
} from "@modrinth/assets";
|
} from "@modrinth/assets";
|
||||||
|
import { useRelativeTime } from "@modrinth/ui";
|
||||||
import ThreadSummary from "~/components/ui/thread/ThreadSummary.vue";
|
import ThreadSummary from "~/components/ui/thread/ThreadSummary.vue";
|
||||||
import { getProjectLink, getVersionLink } from "~/helpers/projects.js";
|
import { getProjectLink, getVersionLink } from "~/helpers/projects.js";
|
||||||
import { getUserLink } from "~/helpers/users.js";
|
import { getUserLink } from "~/helpers/users.js";
|
||||||
@@ -345,6 +346,8 @@ import Categories from "~/components/ui/search/Categories.vue";
|
|||||||
const app = useNuxtApp();
|
const app = useNuxtApp();
|
||||||
const emit = defineEmits(["update:notifications"]);
|
const emit = defineEmits(["update:notifications"]);
|
||||||
|
|
||||||
|
const formatRelativeTime = useRelativeTime();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
notification: {
|
notification: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
class="stat date"
|
class="stat date"
|
||||||
>
|
>
|
||||||
<UpdatedIcon aria-hidden="true" />
|
<UpdatedIcon aria-hidden="true" />
|
||||||
<span class="date-label">Updated </span>{{ fromNow(updatedAt) }}
|
<span class="date-label">Updated </span>{{ formatRelativeTime(updatedAt) }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-else-if="showCreatedDate"
|
v-else-if="showCreatedDate"
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
class="stat date"
|
class="stat date"
|
||||||
>
|
>
|
||||||
<CalendarIcon aria-hidden="true" />
|
<CalendarIcon aria-hidden="true" />
|
||||||
<span class="date-label">Published </span>{{ fromNow(createdAt) }}
|
<span class="date-label">Published </span>{{ formatRelativeTime(createdAt) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
@@ -95,6 +95,7 @@ import Categories from "~/components/ui/search/Categories.vue";
|
|||||||
import Badge from "~/components/ui/Badge.vue";
|
import Badge from "~/components/ui/Badge.vue";
|
||||||
import EnvironmentIndicator from "~/components/ui/EnvironmentIndicator.vue";
|
import EnvironmentIndicator from "~/components/ui/EnvironmentIndicator.vue";
|
||||||
import Avatar from "~/components/ui/Avatar.vue";
|
import Avatar from "~/components/ui/Avatar.vue";
|
||||||
|
import { useRelativeTime } from "@modrinth/ui";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -213,8 +214,9 @@ export default {
|
|||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const tags = useTags();
|
const tags = useTags();
|
||||||
|
const formatRelativeTime = useRelativeTime();
|
||||||
|
|
||||||
return { tags };
|
return { tags, formatRelativeTime };
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
projectTypeDisplay() {
|
projectTypeDisplay() {
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
<span> </span>
|
<span> </span>
|
||||||
<span v-tooltip="$dayjs(report.created).format('MMMM D, YYYY [at] h:mm A')">{{
|
<span v-tooltip="$dayjs(report.created).format('MMMM D, YYYY [at] h:mm A')">{{
|
||||||
fromNow(report.created)
|
formatRelativeTime(report.created)
|
||||||
}}</span>
|
}}</span>
|
||||||
<CopyCode v-if="flags.developerMode" :text="report.id" class="report-id" />
|
<CopyCode v-if="flags.developerMode" :text="report.id" class="report-id" />
|
||||||
</div>
|
</div>
|
||||||
@@ -105,11 +105,14 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ReportIcon, UnknownIcon, VersionIcon } from "@modrinth/assets";
|
import { ReportIcon, UnknownIcon, VersionIcon } from "@modrinth/assets";
|
||||||
import { renderHighlightedString } from "~/helpers/highlight.js";
|
import { renderHighlightedString } from "~/helpers/highlight.js";
|
||||||
|
import { useRelativeTime } from "@modrinth/ui";
|
||||||
import Avatar from "~/components/ui/Avatar.vue";
|
import Avatar from "~/components/ui/Avatar.vue";
|
||||||
import Badge from "~/components/ui/Badge.vue";
|
import Badge from "~/components/ui/Badge.vue";
|
||||||
import ThreadSummary from "~/components/ui/thread/ThreadSummary.vue";
|
import ThreadSummary from "~/components/ui/thread/ThreadSummary.vue";
|
||||||
import CopyCode from "~/components/ui/CopyCode.vue";
|
import CopyCode from "~/components/ui/CopyCode.vue";
|
||||||
|
|
||||||
|
const formatRelativeTime = useRelativeTime();
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
report: {
|
report: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import dayjs from "dayjs";
|
|||||||
import { ButtonStyled, commonMessages, CopyCode, ServerNotice, TagItem } from "@modrinth/ui";
|
import { ButtonStyled, commonMessages, CopyCode, ServerNotice, TagItem } from "@modrinth/ui";
|
||||||
import { EditIcon, SettingsIcon, TrashIcon } from "@modrinth/assets";
|
import { EditIcon, SettingsIcon, TrashIcon } from "@modrinth/assets";
|
||||||
import { ServerNotice as ServerNoticeType } from "@modrinth/utils";
|
import { ServerNotice as ServerNoticeType } from "@modrinth/utils";
|
||||||
|
import { useRelativeTime } from "@modrinth/ui";
|
||||||
import {
|
import {
|
||||||
DISMISSABLE,
|
DISMISSABLE,
|
||||||
getDismissableMetadata,
|
getDismissableMetadata,
|
||||||
@@ -11,6 +12,7 @@ import {
|
|||||||
import { useVIntl } from "@vintl/vintl";
|
import { useVIntl } from "@vintl/vintl";
|
||||||
|
|
||||||
const { formatMessage } = useVIntl();
|
const { formatMessage } = useVIntl();
|
||||||
|
const formatRelativeTime = useRelativeTime();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
notice: ServerNoticeType;
|
notice: ServerNoticeType;
|
||||||
@@ -25,7 +27,7 @@ const props = defineProps<{
|
|||||||
<div class="text-sm">
|
<div class="text-sm">
|
||||||
<span v-if="notice.announce_at">
|
<span v-if="notice.announce_at">
|
||||||
{{ dayjs(notice.announce_at).format("MMM D, YYYY [at] h:mm A") }} ({{
|
{{ dayjs(notice.announce_at).format("MMM D, YYYY [at] h:mm A") }} ({{
|
||||||
dayjs(notice.announce_at).fromNow()
|
formatRelativeTime(notice.announce_at)
|
||||||
}})
|
}})
|
||||||
</span>
|
</span>
|
||||||
<template v-else> Never begins </template>
|
<template v-else> Never begins </template>
|
||||||
@@ -35,7 +37,7 @@ const props = defineProps<{
|
|||||||
v-if="notice.expires"
|
v-if="notice.expires"
|
||||||
v-tooltip="dayjs(notice.expires).format('MMMM D, YYYY [at] h:mm A')"
|
v-tooltip="dayjs(notice.expires).format('MMMM D, YYYY [at] h:mm A')"
|
||||||
>
|
>
|
||||||
{{ dayjs(notice.expires).fromNow() }}
|
{{ formatRelativeTime(notice.expires) }}
|
||||||
</span>
|
</span>
|
||||||
<template v-else> Never expires </template>
|
<template v-else> Never expires </template>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ import {
|
|||||||
ModrinthIcon,
|
ModrinthIcon,
|
||||||
ScaleIcon,
|
ScaleIcon,
|
||||||
} from "@modrinth/assets";
|
} from "@modrinth/assets";
|
||||||
import { AutoLink, OverflowMenu } from "@modrinth/ui";
|
import { AutoLink, OverflowMenu, useRelativeTime } from "@modrinth/ui";
|
||||||
import { renderString } from "@modrinth/utils";
|
import { renderString } from "@modrinth/utils";
|
||||||
import Avatar from "~/components/ui/Avatar.vue";
|
import Avatar from "~/components/ui/Avatar.vue";
|
||||||
import Badge from "~/components/ui/Badge.vue";
|
import Badge from "~/components/ui/Badge.vue";
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
import dayjs from "dayjs";
|
|
||||||
import relativeTime from "dayjs/plugin/relativeTime";
|
|
||||||
|
|
||||||
dayjs.extend(relativeTime); // eslint-disable-line import/no-named-as-default-member
|
|
||||||
|
|
||||||
export const useCurrentDate = () => useState("currentDate", () => Date.now());
|
|
||||||
|
|
||||||
export const updateCurrentDate = () => {
|
|
||||||
const currentDate = useCurrentDate();
|
|
||||||
|
|
||||||
currentDate.value = Date.now();
|
|
||||||
};
|
|
||||||
|
|
||||||
export const fromNow = (date) => {
|
|
||||||
const currentDate = useCurrentDate();
|
|
||||||
return dayjs(date).from(currentDate.value);
|
|
||||||
};
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
import { createFormatter, type Formatter } from "@vintl/how-ago";
|
|
||||||
import type { IntlController } from "@vintl/vintl/controller";
|
|
||||||
|
|
||||||
const formatters = new WeakMap<IntlController<any>, Formatter>();
|
|
||||||
|
|
||||||
export function useRelativeTime(): Formatter {
|
|
||||||
const vintl = useVIntl();
|
|
||||||
|
|
||||||
let formatter = formatters.get(vintl);
|
|
||||||
|
|
||||||
if (formatter == null) {
|
|
||||||
const formatterRef = computed(() => createFormatter(vintl.intl));
|
|
||||||
formatter = (value, options) => formatterRef.value(value, options);
|
|
||||||
formatters.set(vintl, formatter);
|
|
||||||
}
|
|
||||||
|
|
||||||
return formatter;
|
|
||||||
}
|
|
||||||
@@ -871,6 +871,7 @@ import {
|
|||||||
ProjectSidebarDetails,
|
ProjectSidebarDetails,
|
||||||
ProjectSidebarLinks,
|
ProjectSidebarLinks,
|
||||||
ScrollablePanel,
|
ScrollablePanel,
|
||||||
|
useRelativeTime,
|
||||||
} from "@modrinth/ui";
|
} from "@modrinth/ui";
|
||||||
import VersionSummary from "@modrinth/ui/src/components/version/VersionSummary.vue";
|
import VersionSummary from "@modrinth/ui/src/components/version/VersionSummary.vue";
|
||||||
import { formatCategory, isRejected, isStaff, isUnderReview, renderString } from "@modrinth/utils";
|
import { formatCategory, isRejected, isStaff, isUnderReview, renderString } from "@modrinth/utils";
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
<div class="mb-4 mt-2 flex w-full items-center gap-1 text-sm text-secondary">
|
<div class="mb-4 mt-2 flex w-full items-center gap-1 text-sm text-secondary">
|
||||||
{{ formatCategory(subscription.interval) }} ⋅ {{ subscription.status }} ⋅
|
{{ formatCategory(subscription.interval) }} ⋅ {{ subscription.status }} ⋅
|
||||||
{{ dayjs(subscription.created).format("MMMM D, YYYY [at] h:mma") }} ({{
|
{{ dayjs(subscription.created).format("MMMM D, YYYY [at] h:mma") }} ({{
|
||||||
dayjs(subscription.created).fromNow()
|
formatRelativeTime(subscription.created)
|
||||||
}})
|
}})
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<span class="text-sm text-secondary">
|
<span class="text-sm text-secondary">
|
||||||
{{ dayjs(charge.due).format("MMMM D, YYYY [at] h:mma") }}
|
{{ dayjs(charge.due).format("MMMM D, YYYY [at] h:mma") }}
|
||||||
<span class="text-secondary">({{ dayjs(charge.due).fromNow() }}) </span>
|
<span class="text-secondary">({{ formatRelativeTime(charge.due) }}) </span>
|
||||||
</span>
|
</span>
|
||||||
<div
|
<div
|
||||||
v-if="flags.developerMode"
|
v-if="flags.developerMode"
|
||||||
@@ -196,7 +196,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { Avatar, ButtonStyled, CopyCode, DropdownSelect, NewModal, Toggle } from "@modrinth/ui";
|
import {
|
||||||
|
Avatar,
|
||||||
|
ButtonStyled,
|
||||||
|
CopyCode,
|
||||||
|
DropdownSelect,
|
||||||
|
NewModal,
|
||||||
|
Toggle,
|
||||||
|
useRelativeTime,
|
||||||
|
} from "@modrinth/ui";
|
||||||
import { formatCategory, formatPrice } from "@modrinth/utils";
|
import { formatCategory, formatPrice } from "@modrinth/utils";
|
||||||
import {
|
import {
|
||||||
CheckIcon,
|
CheckIcon,
|
||||||
@@ -215,7 +223,9 @@ const flags = useFeatureFlags();
|
|||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const data = useNuxtApp();
|
const data = useNuxtApp();
|
||||||
const vintl = useVIntl();
|
const vintl = useVIntl();
|
||||||
|
|
||||||
const { formatMessage } = vintl;
|
const { formatMessage } = vintl;
|
||||||
|
const formatRelativeTime = useRelativeTime();
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
userNotFoundError: {
|
userNotFoundError: {
|
||||||
|
|||||||
@@ -156,7 +156,7 @@
|
|||||||
<div class="text-sm">
|
<div class="text-sm">
|
||||||
<span v-if="notice.announce_at">
|
<span v-if="notice.announce_at">
|
||||||
{{ dayjs(notice.announce_at).format("MMM D, YYYY [at] h:mm A") }} ({{
|
{{ dayjs(notice.announce_at).format("MMM D, YYYY [at] h:mm A") }} ({{
|
||||||
dayjs(notice.announce_at).fromNow()
|
formatRelativeTime(notice.announce_at)
|
||||||
}})
|
}})
|
||||||
</span>
|
</span>
|
||||||
<template v-else> Never begins </template>
|
<template v-else> Never begins </template>
|
||||||
@@ -166,7 +166,7 @@
|
|||||||
v-if="notice.expires"
|
v-if="notice.expires"
|
||||||
v-tooltip="dayjs(notice.expires).format('MMMM D, YYYY [at] h:mm A')"
|
v-tooltip="dayjs(notice.expires).format('MMMM D, YYYY [at] h:mm A')"
|
||||||
>
|
>
|
||||||
{{ dayjs(notice.expires).fromNow() }}
|
{{ formatRelativeTime(notice.expires) }}
|
||||||
</span>
|
</span>
|
||||||
<template v-else> Never expires </template>
|
<template v-else> Never expires </template>
|
||||||
</div>
|
</div>
|
||||||
@@ -267,6 +267,7 @@ import {
|
|||||||
NewModal,
|
NewModal,
|
||||||
TeleportDropdownMenu,
|
TeleportDropdownMenu,
|
||||||
Toggle,
|
Toggle,
|
||||||
|
useRelativeTime,
|
||||||
} from "@modrinth/ui";
|
} from "@modrinth/ui";
|
||||||
import { SettingsIcon, PlusIcon, SaveIcon, TrashIcon, EditIcon, XIcon } from "@modrinth/assets";
|
import { SettingsIcon, PlusIcon, SaveIcon, TrashIcon, EditIcon, XIcon } from "@modrinth/assets";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
@@ -278,6 +279,8 @@ import { usePyroFetch } from "~/composables/pyroFetch.ts";
|
|||||||
import AssignNoticeModal from "~/components/ui/servers/notice/AssignNoticeModal.vue";
|
import AssignNoticeModal from "~/components/ui/servers/notice/AssignNoticeModal.vue";
|
||||||
|
|
||||||
const { formatMessage } = useVIntl();
|
const { formatMessage } = useVIntl();
|
||||||
|
const formatRelativeTime = useRelativeTime();
|
||||||
|
|
||||||
const app = useNuxtApp() as unknown as { $notify: any };
|
const app = useNuxtApp() as unknown as { $notify: any };
|
||||||
|
|
||||||
const notices = ref<ServerNoticeType[]>([]);
|
const notices = ref<ServerNoticeType[]>([]);
|
||||||
|
|||||||
@@ -391,6 +391,7 @@ import {
|
|||||||
DropdownSelect,
|
DropdownSelect,
|
||||||
FileInput,
|
FileInput,
|
||||||
PopoutMenu,
|
PopoutMenu,
|
||||||
|
useRelativeTime,
|
||||||
} from "@modrinth/ui";
|
} from "@modrinth/ui";
|
||||||
|
|
||||||
import { isAdmin } from "@modrinth/utils";
|
import { isAdmin } from "@modrinth/utils";
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { useRelativeTime } from "@modrinth/ui";
|
||||||
|
|
||||||
const vintl = useVIntl();
|
const vintl = useVIntl();
|
||||||
const { formatMessage } = vintl;
|
const { formatMessage } = vintl;
|
||||||
|
|
||||||
|
|||||||
@@ -185,7 +185,7 @@
|
|||||||
<CalendarIcon aria-hidden="true" />
|
<CalendarIcon aria-hidden="true" />
|
||||||
<span>
|
<span>
|
||||||
Received
|
Received
|
||||||
{{ fromNow(notification.date_modified) }}
|
{{ formatRelativeTime(notification.date_modified) }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -527,7 +527,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { Multiselect } from "vue-multiselect";
|
import { Multiselect } from "vue-multiselect";
|
||||||
import { ButtonStyled } from "@modrinth/ui";
|
import { ButtonStyled, useRelativeTime } from "@modrinth/ui";
|
||||||
import {
|
import {
|
||||||
CompassIcon,
|
CompassIcon,
|
||||||
LogInIcon,
|
LogInIcon,
|
||||||
@@ -544,6 +544,8 @@ import ProjectCard from "~/components/ui/ProjectCard.vue";
|
|||||||
|
|
||||||
import { homePageProjects, homePageSearch, homePageNotifs } from "~/generated/state.json";
|
import { homePageProjects, homePageSearch, homePageNotifs } from "~/generated/state.json";
|
||||||
|
|
||||||
|
const formatRelativeTime = useRelativeTime();
|
||||||
|
|
||||||
const searchQuery = ref("leave");
|
const searchQuery = ref("leave");
|
||||||
const sortType = ref("relevance");
|
const sortType = ref("relevance");
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
<IssuesIcon v-if="project.age_warning" />
|
<IssuesIcon v-if="project.age_warning" />
|
||||||
Submitted
|
Submitted
|
||||||
<span v-tooltip="$dayjs(project.queued).format('MMMM D, YYYY [at] h:mm A')">{{
|
<span v-tooltip="$dayjs(project.queued).format('MMMM D, YYYY [at] h:mm A')">{{
|
||||||
fromNow(project.queued)
|
formatRelativeTime(project.queued)
|
||||||
}}</span>
|
}}</span>
|
||||||
</span>
|
</span>
|
||||||
<span v-else class="submitter-info"><UnknownIcon /> Unknown queue date</span>
|
<span v-else class="submitter-info"><UnknownIcon /> Unknown queue date</span>
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { Chips } from "@modrinth/ui";
|
import { Chips, useRelativeTime } from "@modrinth/ui";
|
||||||
import {
|
import {
|
||||||
UnknownIcon,
|
UnknownIcon,
|
||||||
EyeIcon,
|
EyeIcon,
|
||||||
@@ -128,6 +128,8 @@ const now = app.$dayjs();
|
|||||||
const TIME_24H = 86400000;
|
const TIME_24H = 86400000;
|
||||||
const TIME_48H = TIME_24H * 2;
|
const TIME_48H = TIME_24H * 2;
|
||||||
|
|
||||||
|
const formatRelativeTime = useRelativeTime();
|
||||||
|
|
||||||
const { data: projects } = await useAsyncData("moderation/projects?count=1000", () =>
|
const { data: projects } = await useAsyncData("moderation/projects?count=1000", () =>
|
||||||
useBaseFetch("moderation/projects?count=1000", { internal: true }),
|
useBaseFetch("moderation/projects?count=1000", { internal: true }),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -203,7 +203,13 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { PlusIcon, XIcon, TrashIcon, EditIcon, SaveIcon } from "@modrinth/assets";
|
import { PlusIcon, XIcon, TrashIcon, EditIcon, SaveIcon } from "@modrinth/assets";
|
||||||
import { Checkbox, ConfirmModal, commonSettingsMessages, commonMessages } from "@modrinth/ui";
|
import {
|
||||||
|
Checkbox,
|
||||||
|
ConfirmModal,
|
||||||
|
commonSettingsMessages,
|
||||||
|
commonMessages,
|
||||||
|
useRelativeTime,
|
||||||
|
} from "@modrinth/ui";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
hasScope,
|
hasScope,
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { XIcon } from "@modrinth/assets";
|
import { XIcon } from "@modrinth/assets";
|
||||||
import { commonMessages, commonSettingsMessages } from "@modrinth/ui";
|
import { commonMessages, commonSettingsMessages, useRelativeTime } from "@modrinth/ui";
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
middleware: "auth",
|
middleware: "auth",
|
||||||
|
|||||||
@@ -360,6 +360,7 @@ import {
|
|||||||
ContentPageHeader,
|
ContentPageHeader,
|
||||||
commonMessages,
|
commonMessages,
|
||||||
NewModal,
|
NewModal,
|
||||||
|
useRelativeTime,
|
||||||
} from "@modrinth/ui";
|
} from "@modrinth/ui";
|
||||||
import { isStaff } from "~/helpers/users.js";
|
import { isStaff } from "~/helpers/users.js";
|
||||||
import NavTabs from "~/components/ui/NavTabs.vue";
|
import NavTabs from "~/components/ui/NavTabs.vue";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
export * from './src/components/index'
|
export * from './src/components'
|
||||||
export { commonMessages, commonSettingsMessages } from './src/utils/common-messages'
|
export * from './src/utils'
|
||||||
export * from './src/utils/search'
|
export * from './src/composables'
|
||||||
export { GAME_MODES } from './src/utils/game-modes'
|
|
||||||
|
|||||||
@@ -16,9 +16,9 @@
|
|||||||
"eslint": "^8.57.0",
|
"eslint": "^8.57.0",
|
||||||
"eslint-config-custom": "workspace:*",
|
"eslint-config-custom": "workspace:*",
|
||||||
"tsconfig": "workspace:*",
|
"tsconfig": "workspace:*",
|
||||||
|
"typescript": "^5.4.5",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.13",
|
||||||
"vue-router": "4.3.0",
|
"vue-router": "4.3.0"
|
||||||
"typescript": "^5.4.5"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/commands": "^6.3.2",
|
"@codemirror/commands": "^6.3.2",
|
||||||
@@ -29,6 +29,7 @@
|
|||||||
"@modrinth/assets": "workspace:*",
|
"@modrinth/assets": "workspace:*",
|
||||||
"@modrinth/utils": "workspace:*",
|
"@modrinth/utils": "workspace:*",
|
||||||
"@types/markdown-it": "^14.1.1",
|
"@types/markdown-it": "^14.1.1",
|
||||||
|
"@vintl/how-ago": "^3.0.1",
|
||||||
"apexcharts": "^3.44.0",
|
"apexcharts": "^3.44.0",
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
"floating-vue": "^5.2.2",
|
"floating-vue": "^5.2.2",
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ import EnvironmentIndicator from './EnvironmentIndicator.vue'
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { useRelativeTime } from '../../composables'
|
||||||
|
|
||||||
dayjs.extend(relativeTime)
|
dayjs.extend(relativeTime)
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
@@ -191,6 +193,10 @@ export default defineComponent({
|
|||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
setup(_) {
|
||||||
|
const formatRelativeTime = useRelativeTime()
|
||||||
|
return { formatRelativeTime }
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
toColor() {
|
toColor() {
|
||||||
let color = this.color
|
let color = this.color
|
||||||
@@ -205,13 +211,13 @@ export default defineComponent({
|
|||||||
return dayjs(this.createdAt).format('MMMM D, YYYY [at] h:mm:ss A')
|
return dayjs(this.createdAt).format('MMMM D, YYYY [at] h:mm:ss A')
|
||||||
},
|
},
|
||||||
sinceCreation() {
|
sinceCreation() {
|
||||||
return dayjs(this.createdAt).fromNow()
|
return this.formatRelativeTime(this.createdAt)
|
||||||
},
|
},
|
||||||
updatedDate() {
|
updatedDate() {
|
||||||
return dayjs(this.updatedAt).format('MMMM D, YYYY [at] h:mm:ss A')
|
return dayjs(this.updatedAt).format('MMMM D, YYYY [at] h:mm:ss A')
|
||||||
},
|
},
|
||||||
sinceUpdated() {
|
sinceUpdated() {
|
||||||
return dayjs(this.updatedAt).fromNow()
|
return this.formatRelativeTime(this.updatedAt)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -48,8 +48,10 @@ import dayjs from 'dayjs'
|
|||||||
import { useVIntl, defineMessages } from '@vintl/vintl'
|
import { useVIntl, defineMessages } from '@vintl/vintl'
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
import AutoLink from '../base/AutoLink.vue'
|
import AutoLink from '../base/AutoLink.vue'
|
||||||
|
import { useRelativeTime } from '../../composables'
|
||||||
|
|
||||||
const { formatMessage } = useVIntl()
|
const { formatMessage } = useVIntl()
|
||||||
|
const formatRelativeTime = useRelativeTime()
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
@@ -70,7 +72,7 @@ const recent = computed(() => props.entry.date.isAfter(currentDate.value.subtrac
|
|||||||
const future = computed(() => props.entry.date.isAfter(currentDate.value))
|
const future = computed(() => props.entry.date.isAfter(currentDate.value))
|
||||||
const dateTooltip = computed(() => props.entry.date.format('MMMM D, YYYY [at] h:mm A'))
|
const dateTooltip = computed(() => props.entry.date.format('MMMM D, YYYY [at] h:mm A'))
|
||||||
|
|
||||||
const relativeDate = computed(() => props.entry.date.fromNow())
|
const relativeDate = computed(() => formatRelativeTime(props.entry.date.toISOString()))
|
||||||
const longDate = computed(() => props.entry.date.format('MMMM D, YYYY'))
|
const longDate = computed(() => props.entry.date.format('MMMM D, YYYY'))
|
||||||
const versionName = computed(() => props.entry.version ?? longDate.value)
|
const versionName = computed(() => props.entry.version ?? longDate.value)
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
<HistoryIcon class="shrink-0" />
|
<HistoryIcon class="shrink-0" />
|
||||||
<span>
|
<span>
|
||||||
<span class="text-secondary">Updated</span>
|
<span class="text-secondary">Updated</span>
|
||||||
{{ dayjs(project.date_modified ?? project.updated).fromNow() }}
|
{{ formatRelativeTime(project.date_modified ?? project.updated) }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -67,10 +67,9 @@
|
|||||||
import { TagsIcon, DownloadIcon, HeartIcon, HistoryIcon } from '@modrinth/assets'
|
import { TagsIcon, DownloadIcon, HeartIcon, HistoryIcon } from '@modrinth/assets'
|
||||||
import Avatar from '../base/Avatar.vue'
|
import Avatar from '../base/Avatar.vue'
|
||||||
import { formatNumber, formatCategory } from '@modrinth/utils'
|
import { formatNumber, formatCategory } from '@modrinth/utils'
|
||||||
import dayjs from 'dayjs'
|
import { useRelativeTime } from '../../composables'
|
||||||
import relativeTime from 'dayjs/plugin/relativeTime'
|
|
||||||
|
|
||||||
dayjs.extend(relativeTime)
|
const formatRelativeTime = useRelativeTime()
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
project: {
|
project: {
|
||||||
|
|||||||
@@ -132,7 +132,7 @@
|
|||||||
class="z-[1] flex cursor-help items-center gap-1 text-nowrap font-medium xl:self-center"
|
class="z-[1] flex cursor-help items-center gap-1 text-nowrap font-medium xl:self-center"
|
||||||
>
|
>
|
||||||
<CalendarIcon class="xl:hidden" />
|
<CalendarIcon class="xl:hidden" />
|
||||||
{{ dayjs(version.date_published).fromNow() }}
|
{{ formatRelativeTime(version.date_published) }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="pointer-events-none z-[1] flex items-center gap-1 font-medium xl:self-center"
|
class="pointer-events-none z-[1] flex items-center gap-1 font-medium xl:self-center"
|
||||||
@@ -185,11 +185,12 @@ import { Pagination, VersionChannelIndicator, VersionFilterControl } from '../in
|
|||||||
import { useVIntl } from '@vintl/vintl'
|
import { useVIntl } from '@vintl/vintl'
|
||||||
import { type Ref, ref, computed } from 'vue'
|
import { type Ref, ref, computed } from 'vue'
|
||||||
import { useRouter, useRoute } from 'vue-router'
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
import dayjs from 'dayjs'
|
|
||||||
import AutoLink from '../base/AutoLink.vue'
|
import AutoLink from '../base/AutoLink.vue'
|
||||||
import TagItem from '../base/TagItem.vue'
|
import TagItem from '../base/TagItem.vue'
|
||||||
|
import { useRelativeTime } from '../../composables'
|
||||||
|
|
||||||
const { formatMessage } = useVIntl()
|
const { formatMessage } = useVIntl()
|
||||||
|
const formatRelativeTime = useRelativeTime()
|
||||||
|
|
||||||
type VersionWithDisplayUrlEnding = Version & {
|
type VersionWithDisplayUrlEnding = Version & {
|
||||||
displayUrlEnding: string
|
displayUrlEnding: string
|
||||||
|
|||||||
@@ -68,8 +68,10 @@ import { BookTextIcon, CalendarIcon, ScaleIcon, VersionIcon, ExternalIcon } from
|
|||||||
import { useVIntl, defineMessages } from '@vintl/vintl'
|
import { useVIntl, defineMessages } from '@vintl/vintl'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
|
import { useRelativeTime } from '../../composables'
|
||||||
|
|
||||||
const { formatMessage } = useVIntl()
|
const { formatMessage } = useVIntl()
|
||||||
|
const formatRelativeTime = useRelativeTime()
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
project: {
|
project: {
|
||||||
@@ -89,16 +91,16 @@ const props = defineProps<{
|
|||||||
}>()
|
}>()
|
||||||
|
|
||||||
const createdDate = computed(() =>
|
const createdDate = computed(() =>
|
||||||
props.project.published ? dayjs(props.project.published).fromNow() : 'unknown',
|
props.project.published ? formatRelativeTime(props.project.published) : 'unknown',
|
||||||
)
|
)
|
||||||
const submittedDate = computed(() =>
|
const submittedDate = computed(() =>
|
||||||
props.project.queued ? dayjs(props.project.queued).fromNow() : 'unknown',
|
props.project.queued ? formatRelativeTime(props.project.queued) : 'unknown',
|
||||||
)
|
)
|
||||||
const publishedDate = computed(() =>
|
const publishedDate = computed(() =>
|
||||||
props.project.approved ? dayjs(props.project.approved).fromNow() : 'unknown',
|
props.project.approved ? formatRelativeTime(props.project.approved) : 'unknown',
|
||||||
)
|
)
|
||||||
const updatedDate = computed(() =>
|
const updatedDate = computed(() =>
|
||||||
props.project.updated ? dayjs(props.project.updated).fromNow() : 'unknown',
|
props.project.updated ? formatRelativeTime(props.project.updated) : 'unknown',
|
||||||
)
|
)
|
||||||
|
|
||||||
const licenseIdDisplay = computed(() => {
|
const licenseIdDisplay = computed(() => {
|
||||||
|
|||||||
23
packages/ui/src/composables/how-ago.ts
Normal file
23
packages/ui/src/composables/how-ago.ts
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import { createFormatter, type FormatOptions, type Formatter } from '@vintl/how-ago'
|
||||||
|
import type { IntlController } from '@vintl/vintl/controller'
|
||||||
|
import { useVIntl } from '@vintl/vintl'
|
||||||
|
import { computed } from 'vue'
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
|
const formatters = new WeakMap<IntlController<any>, Formatter>()
|
||||||
|
|
||||||
|
export function useRelativeTime(): Formatter {
|
||||||
|
const vintl = useVIntl()
|
||||||
|
|
||||||
|
let formatter = formatters.get(vintl)
|
||||||
|
|
||||||
|
if (formatter == null) {
|
||||||
|
const formatterRef = computed(() => createFormatter(vintl.intl))
|
||||||
|
const defaultOptions: FormatOptions = { roundingMode: 'halfExpand' as const }
|
||||||
|
|
||||||
|
formatter = (value, options) => formatterRef.value(value, { ...options, ...defaultOptions })
|
||||||
|
formatters.set(vintl, formatter)
|
||||||
|
}
|
||||||
|
|
||||||
|
return formatter
|
||||||
|
}
|
||||||
1
packages/ui/src/composables/index.ts
Normal file
1
packages/ui/src/composables/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export * from './how-ago'
|
||||||
4
packages/ui/src/utils/index.ts
Normal file
4
packages/ui/src/utils/index.ts
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
export * from './common-messages'
|
||||||
|
export * from './game-modes'
|
||||||
|
export * from './notices'
|
||||||
|
export * from './search'
|
||||||
140
pnpm-lock.yaml
generated
140
pnpm-lock.yaml
generated
@@ -82,7 +82,7 @@ importers:
|
|||||||
version: 1.11.11
|
version: 1.11.11
|
||||||
floating-vue:
|
floating-vue:
|
||||||
specifier: ^5.2.2
|
specifier: ^5.2.2
|
||||||
version: 5.2.2(@nuxt/kit@3.14.1592(magicast@0.3.5))(vue@3.5.13(typescript@5.5.4))
|
version: 5.2.2(@nuxt/kit@3.14.1592(magicast@0.3.5)(rollup@4.34.9))(vue@3.5.13(typescript@5.5.4))
|
||||||
ofetch:
|
ofetch:
|
||||||
specifier: ^1.3.4
|
specifier: ^1.3.4
|
||||||
version: 1.4.1
|
version: 1.4.1
|
||||||
@@ -420,6 +420,9 @@ importers:
|
|||||||
'@types/markdown-it':
|
'@types/markdown-it':
|
||||||
specifier: ^14.1.1
|
specifier: ^14.1.1
|
||||||
version: 14.1.1
|
version: 14.1.1
|
||||||
|
'@vintl/how-ago':
|
||||||
|
specifier: ^3.0.1
|
||||||
|
version: 3.0.1(@formatjs/intl@2.10.4(typescript@5.5.4))
|
||||||
apexcharts:
|
apexcharts:
|
||||||
specifier: ^3.44.0
|
specifier: ^3.44.0
|
||||||
version: 3.49.2
|
version: 3.49.2
|
||||||
@@ -9139,34 +9142,6 @@ snapshots:
|
|||||||
- supports-color
|
- supports-color
|
||||||
- typescript
|
- typescript
|
||||||
|
|
||||||
'@nuxt/kit@3.14.1592(magicast@0.3.5)':
|
|
||||||
dependencies:
|
|
||||||
'@nuxt/schema': 3.14.1592(magicast@0.3.5)
|
|
||||||
c12: 2.0.1(magicast@0.3.5)
|
|
||||||
consola: 3.2.3
|
|
||||||
defu: 6.1.4
|
|
||||||
destr: 2.0.3
|
|
||||||
globby: 14.0.2
|
|
||||||
hash-sum: 2.0.0
|
|
||||||
ignore: 6.0.2
|
|
||||||
jiti: 2.4.1
|
|
||||||
klona: 2.0.6
|
|
||||||
knitwork: 1.1.0
|
|
||||||
mlly: 1.7.3
|
|
||||||
pathe: 1.1.2
|
|
||||||
pkg-types: 1.2.1
|
|
||||||
scule: 1.3.0
|
|
||||||
semver: 7.7.1
|
|
||||||
ufo: 1.5.4
|
|
||||||
unctx: 2.3.1
|
|
||||||
unimport: 3.14.4
|
|
||||||
untyped: 1.5.1
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- magicast
|
|
||||||
- rollup
|
|
||||||
- supports-color
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@nuxt/kit@3.14.1592(magicast@0.3.5)(rollup@3.29.4)':
|
'@nuxt/kit@3.14.1592(magicast@0.3.5)(rollup@3.29.4)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@nuxt/schema': 3.14.1592(magicast@0.3.5)(rollup@3.29.4)
|
'@nuxt/schema': 3.14.1592(magicast@0.3.5)(rollup@3.29.4)
|
||||||
@@ -9222,20 +9197,27 @@ snapshots:
|
|||||||
- rollup
|
- rollup
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@nuxt/schema@3.14.1592(magicast@0.3.5)':
|
'@nuxt/kit@3.14.1592(magicast@0.3.5)(rollup@4.34.9)':
|
||||||
dependencies:
|
dependencies:
|
||||||
|
'@nuxt/schema': 3.14.1592(magicast@0.3.5)(rollup@4.34.9)
|
||||||
c12: 2.0.1(magicast@0.3.5)
|
c12: 2.0.1(magicast@0.3.5)
|
||||||
compatx: 0.1.8
|
|
||||||
consola: 3.2.3
|
consola: 3.2.3
|
||||||
defu: 6.1.4
|
defu: 6.1.4
|
||||||
hookable: 5.5.3
|
destr: 2.0.3
|
||||||
|
globby: 14.0.2
|
||||||
|
hash-sum: 2.0.0
|
||||||
|
ignore: 6.0.2
|
||||||
|
jiti: 2.4.1
|
||||||
|
klona: 2.0.6
|
||||||
|
knitwork: 1.1.0
|
||||||
|
mlly: 1.7.3
|
||||||
pathe: 1.1.2
|
pathe: 1.1.2
|
||||||
pkg-types: 1.2.1
|
pkg-types: 1.2.1
|
||||||
scule: 1.3.0
|
scule: 1.3.0
|
||||||
std-env: 3.8.0
|
semver: 7.7.1
|
||||||
ufo: 1.5.4
|
ufo: 1.5.4
|
||||||
uncrypto: 0.1.3
|
unctx: 2.3.1
|
||||||
unimport: 3.14.4
|
unimport: 3.14.4(rollup@4.34.9)
|
||||||
untyped: 1.5.1
|
untyped: 1.5.1
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- magicast
|
- magicast
|
||||||
@@ -9284,6 +9266,27 @@ snapshots:
|
|||||||
- rollup
|
- rollup
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
|
'@nuxt/schema@3.14.1592(magicast@0.3.5)(rollup@4.34.9)':
|
||||||
|
dependencies:
|
||||||
|
c12: 2.0.1(magicast@0.3.5)
|
||||||
|
compatx: 0.1.8
|
||||||
|
consola: 3.2.3
|
||||||
|
defu: 6.1.4
|
||||||
|
hookable: 5.5.3
|
||||||
|
pathe: 1.1.2
|
||||||
|
pkg-types: 1.2.1
|
||||||
|
scule: 1.3.0
|
||||||
|
std-env: 3.8.0
|
||||||
|
ufo: 1.5.4
|
||||||
|
uncrypto: 0.1.3
|
||||||
|
unimport: 3.14.4(rollup@4.34.9)
|
||||||
|
untyped: 1.5.1
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- magicast
|
||||||
|
- rollup
|
||||||
|
- supports-color
|
||||||
|
optional: true
|
||||||
|
|
||||||
'@nuxt/telemetry@2.6.0(magicast@0.3.5)(rollup@4.28.1)':
|
'@nuxt/telemetry@2.6.0(magicast@0.3.5)(rollup@4.28.1)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.28.1)
|
'@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.28.1)
|
||||||
@@ -9370,7 +9373,7 @@ snapshots:
|
|||||||
|
|
||||||
'@nuxtjs/eslint-config-typescript@12.1.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4)':
|
'@nuxtjs/eslint-config-typescript@12.1.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@nuxtjs/eslint-config': 12.0.0(@typescript-eslint/parser@6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint-plugin-import@2.29.1)(eslint@9.13.0(jiti@2.4.1)))(eslint@9.13.0(jiti@2.4.1))
|
'@nuxtjs/eslint-config': 12.0.0(@typescript-eslint/parser@6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@9.13.0(jiti@2.4.1))
|
||||||
'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4)
|
'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4)
|
||||||
'@typescript-eslint/parser': 6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4)
|
'@typescript-eslint/parser': 6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4)
|
||||||
eslint: 9.13.0(jiti@2.4.1)
|
eslint: 9.13.0(jiti@2.4.1)
|
||||||
@@ -9383,10 +9386,10 @@ snapshots:
|
|||||||
- supports-color
|
- supports-color
|
||||||
- typescript
|
- typescript
|
||||||
|
|
||||||
'@nuxtjs/eslint-config@12.0.0(@typescript-eslint/parser@6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint-plugin-import@2.29.1)(eslint@9.13.0(jiti@2.4.1)))(eslint@9.13.0(jiti@2.4.1))':
|
'@nuxtjs/eslint-config@12.0.0(@typescript-eslint/parser@6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@9.13.0(jiti@2.4.1))':
|
||||||
dependencies:
|
dependencies:
|
||||||
eslint: 9.13.0(jiti@2.4.1)
|
eslint: 9.13.0(jiti@2.4.1)
|
||||||
eslint-config-standard: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@9.13.0(jiti@2.4.1)))(eslint-plugin-n@15.7.0(eslint@9.13.0(jiti@2.4.1)))(eslint-plugin-promise@6.4.0(eslint@9.13.0(jiti@2.4.1)))(eslint@9.13.0(jiti@2.4.1))
|
eslint-config-standard: 17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@15.7.0(eslint@9.13.0(jiti@2.4.1)))(eslint-plugin-promise@6.4.0(eslint@9.13.0(jiti@2.4.1)))(eslint@9.13.0(jiti@2.4.1))
|
||||||
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@9.13.0(jiti@2.4.1))
|
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@9.13.0(jiti@2.4.1))
|
||||||
eslint-plugin-n: 15.7.0(eslint@9.13.0(jiti@2.4.1))
|
eslint-plugin-n: 15.7.0(eslint@9.13.0(jiti@2.4.1))
|
||||||
eslint-plugin-node: 11.1.0(eslint@9.13.0(jiti@2.4.1))
|
eslint-plugin-node: 11.1.0(eslint@9.13.0(jiti@2.4.1))
|
||||||
@@ -9626,6 +9629,15 @@ snapshots:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
rollup: 4.28.1
|
rollup: 4.28.1
|
||||||
|
|
||||||
|
'@rollup/pluginutils@5.1.3(rollup@4.34.9)':
|
||||||
|
dependencies:
|
||||||
|
'@types/estree': 1.0.6
|
||||||
|
estree-walker: 2.0.2
|
||||||
|
picomatch: 4.0.2
|
||||||
|
optionalDependencies:
|
||||||
|
rollup: 4.34.9
|
||||||
|
optional: true
|
||||||
|
|
||||||
'@rollup/pluginutils@5.1.4(rollup@4.34.9)':
|
'@rollup/pluginutils@5.1.4(rollup@4.34.9)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/estree': 1.0.6
|
'@types/estree': 1.0.6
|
||||||
@@ -11956,10 +11968,10 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
eslint: 9.13.0(jiti@2.4.1)
|
eslint: 9.13.0(jiti@2.4.1)
|
||||||
|
|
||||||
eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@9.13.0(jiti@2.4.1)))(eslint-plugin-n@15.7.0(eslint@9.13.0(jiti@2.4.1)))(eslint-plugin-promise@6.4.0(eslint@9.13.0(jiti@2.4.1)))(eslint@9.13.0(jiti@2.4.1)):
|
eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@15.7.0(eslint@9.13.0(jiti@2.4.1)))(eslint-plugin-promise@6.4.0(eslint@9.13.0(jiti@2.4.1)))(eslint@9.13.0(jiti@2.4.1)):
|
||||||
dependencies:
|
dependencies:
|
||||||
eslint: 9.13.0(jiti@2.4.1)
|
eslint: 9.13.0(jiti@2.4.1)
|
||||||
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@9.13.0(jiti@2.4.1))
|
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.16.1(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint@9.13.0(jiti@2.4.1))
|
||||||
eslint-plugin-n: 15.7.0(eslint@9.13.0(jiti@2.4.1))
|
eslint-plugin-n: 15.7.0(eslint@9.13.0(jiti@2.4.1))
|
||||||
eslint-plugin-promise: 6.4.0(eslint@9.13.0(jiti@2.4.1))
|
eslint-plugin-promise: 6.4.0(eslint@9.13.0(jiti@2.4.1))
|
||||||
|
|
||||||
@@ -11985,7 +11997,7 @@ snapshots:
|
|||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@9.4.0)
|
||||||
enhanced-resolve: 5.17.1
|
enhanced-resolve: 5.17.1
|
||||||
eslint: 9.13.0(jiti@2.4.1)
|
eslint: 9.13.0(jiti@2.4.1)
|
||||||
eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint-plugin-import@2.29.1)(eslint@9.13.0(jiti@2.4.1)))(eslint@9.13.0(jiti@2.4.1))
|
eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@9.13.0(jiti@2.4.1))
|
||||||
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.16.1(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint@9.13.0(jiti@2.4.1))
|
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.16.1(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint@9.13.0(jiti@2.4.1))
|
||||||
fast-glob: 3.3.2
|
fast-glob: 3.3.2
|
||||||
get-tsconfig: 4.7.5
|
get-tsconfig: 4.7.5
|
||||||
@@ -11997,7 +12009,7 @@ snapshots:
|
|||||||
- eslint-import-resolver-webpack
|
- eslint-import-resolver-webpack
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
eslint-module-utils@2.8.1(@typescript-eslint/parser@6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint-plugin-import@2.29.1)(eslint@9.13.0(jiti@2.4.1)))(eslint@9.13.0(jiti@2.4.1)):
|
eslint-module-utils@2.8.1(@typescript-eslint/parser@6.21.0(eslint@9.13.0(jiti@2.4.1))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@9.13.0(jiti@2.4.1)):
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 3.2.7
|
debug: 3.2.7
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
@@ -12579,13 +12591,13 @@ snapshots:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.28.1)
|
'@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.28.1)
|
||||||
|
|
||||||
floating-vue@5.2.2(@nuxt/kit@3.14.1592(magicast@0.3.5))(vue@3.5.13(typescript@5.5.4)):
|
floating-vue@5.2.2(@nuxt/kit@3.14.1592(magicast@0.3.5)(rollup@4.34.9))(vue@3.5.13(typescript@5.5.4)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@floating-ui/dom': 1.1.1
|
'@floating-ui/dom': 1.1.1
|
||||||
vue: 3.5.13(typescript@5.5.4)
|
vue: 3.5.13(typescript@5.5.4)
|
||||||
vue-resize: 2.0.0-alpha.1(vue@3.5.13(typescript@5.5.4))
|
vue-resize: 2.0.0-alpha.1(vue@3.5.13(typescript@5.5.4))
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@nuxt/kit': 3.14.1592(magicast@0.3.5)
|
'@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.34.9)
|
||||||
|
|
||||||
for-each@0.3.3:
|
for-each@0.3.3:
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -16017,26 +16029,6 @@ snapshots:
|
|||||||
trough: 2.2.0
|
trough: 2.2.0
|
||||||
vfile: 6.0.3
|
vfile: 6.0.3
|
||||||
|
|
||||||
unimport@3.14.4:
|
|
||||||
dependencies:
|
|
||||||
'@rollup/pluginutils': 5.1.3(rollup@4.28.1)
|
|
||||||
acorn: 8.14.0
|
|
||||||
escape-string-regexp: 5.0.0
|
|
||||||
estree-walker: 3.0.3
|
|
||||||
local-pkg: 0.5.1
|
|
||||||
magic-string: 0.30.14
|
|
||||||
mlly: 1.7.3
|
|
||||||
pathe: 1.1.2
|
|
||||||
picomatch: 4.0.2
|
|
||||||
pkg-types: 1.2.1
|
|
||||||
scule: 1.3.0
|
|
||||||
strip-literal: 2.1.1
|
|
||||||
tinyglobby: 0.2.10
|
|
||||||
unplugin: 1.16.0
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- rollup
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
unimport@3.14.4(rollup@3.29.4):
|
unimport@3.14.4(rollup@3.29.4):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rollup/pluginutils': 5.1.3(rollup@3.29.4)
|
'@rollup/pluginutils': 5.1.3(rollup@3.29.4)
|
||||||
@@ -16076,6 +16068,26 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- rollup
|
- rollup
|
||||||
|
|
||||||
|
unimport@3.14.4(rollup@4.34.9):
|
||||||
|
dependencies:
|
||||||
|
'@rollup/pluginutils': 5.1.3(rollup@4.34.9)
|
||||||
|
acorn: 8.14.0
|
||||||
|
escape-string-regexp: 5.0.0
|
||||||
|
estree-walker: 3.0.3
|
||||||
|
local-pkg: 0.5.1
|
||||||
|
magic-string: 0.30.14
|
||||||
|
mlly: 1.7.3
|
||||||
|
pathe: 1.1.2
|
||||||
|
picomatch: 4.0.2
|
||||||
|
pkg-types: 1.2.1
|
||||||
|
scule: 1.3.0
|
||||||
|
strip-literal: 2.1.1
|
||||||
|
tinyglobby: 0.2.10
|
||||||
|
unplugin: 1.16.0
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- rollup
|
||||||
|
optional: true
|
||||||
|
|
||||||
unist-util-find-after@5.0.0:
|
unist-util-find-after@5.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/unist': 3.0.3
|
'@types/unist': 3.0.3
|
||||||
|
|||||||
Reference in New Issue
Block a user