mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-14 18:35:34 +08:00
refactor: treat formatTimeFromNow as helper not signal
This commit is contained in:
parent
2bc5c78d91
commit
c397ed4dda
@ -1,2 +1,3 @@
|
||||
export * from './global'
|
||||
export * from './proxies'
|
||||
export * from './time'
|
||||
|
@ -1,5 +1,4 @@
|
||||
import dayjs from 'dayjs'
|
||||
import { locale } from '~/i18n'
|
||||
import dayjs, { locale } from 'dayjs'
|
||||
|
||||
export const formatTimeFromNow = (time: number | string) =>
|
||||
dayjs(time).locale(locale()).fromNow()
|
@ -37,6 +37,7 @@ import {
|
||||
} from '~/components'
|
||||
import DocumentTitle from '~/components/DocumentTitle'
|
||||
import { CONNECTIONS_TABLE_ACCESSOR_KEY } from '~/constants'
|
||||
import { formatTimeFromNow } from '~/helpers'
|
||||
import { useI18n } from '~/i18n'
|
||||
import {
|
||||
allConnections,
|
||||
@ -45,7 +46,6 @@ import {
|
||||
connectionsTableColumnVisibility,
|
||||
connectionsTableSize,
|
||||
endpoint,
|
||||
formatTimeFromNow,
|
||||
quickFilterRegex,
|
||||
setConnectionsTableColumnOrder,
|
||||
setConnectionsTableColumnVisibility,
|
||||
|
@ -17,12 +17,12 @@ import {
|
||||
import DocumentTitle from '~/components/DocumentTitle'
|
||||
import {
|
||||
filterProxiesByAvailability,
|
||||
formatTimeFromNow,
|
||||
sortProxiesByOrderingType,
|
||||
} from '~/helpers'
|
||||
import { useI18n } from '~/i18n'
|
||||
import {
|
||||
endpoint,
|
||||
formatTimeFromNow,
|
||||
hideUnAvailableProxies,
|
||||
iconHeight,
|
||||
iconMarginRight,
|
||||
|
@ -4,9 +4,9 @@ import { matchSorter } from 'match-sorter'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
import { Button } from '~/components'
|
||||
import DocumentTitle from '~/components/DocumentTitle'
|
||||
import { useStringBooleanMap } from '~/helpers'
|
||||
import { formatTimeFromNow, useStringBooleanMap } from '~/helpers'
|
||||
import { useI18n } from '~/i18n'
|
||||
import { endpoint, formatTimeFromNow, useRules } from '~/signals'
|
||||
import { endpoint, useRules } from '~/signals'
|
||||
import { Rule, RuleProvider } from '~/types'
|
||||
|
||||
enum ActiveTab {
|
||||
|
@ -1,6 +1,5 @@
|
||||
export * from './config'
|
||||
export * from './connections'
|
||||
export * from './global'
|
||||
export * from './proxies'
|
||||
export * from './request'
|
||||
export * from './rules'
|
||||
|
Loading…
Reference in New Issue
Block a user