Add title to created_at label
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
631c94f771
commit
f518a7e5e4
5 changed files with 7 additions and 5 deletions
|
@ -18,6 +18,7 @@ import { useAppSelector, useAppDispatch } from 'soapbox/hooks';
|
||||||
import { isLocal } from 'soapbox/utils/accounts';
|
import { isLocal } from 'soapbox/utils/accounts';
|
||||||
|
|
||||||
import { showProfileHoverCard } from './hover-ref-wrapper';
|
import { showProfileHoverCard } from './hover-ref-wrapper';
|
||||||
|
import { dateFormatOptions } from './relative-timestamp';
|
||||||
import { Card, CardBody, HStack, Icon, Stack, Text } from './ui';
|
import { Card, CardBody, HStack, Icon, Stack, Text } from './ui';
|
||||||
|
|
||||||
import type { Account, PatronUser } from 'soapbox/schemas';
|
import type { Account, PatronUser } from 'soapbox/schemas';
|
||||||
|
@ -128,7 +129,7 @@ export const ProfileHoverCard: React.FC<IProfileHoverCard> = ({ visible = true }
|
||||||
className='h-4 w-4 text-gray-800 dark:text-gray-200'
|
className='h-4 w-4 text-gray-800 dark:text-gray-200'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Text size='sm'>
|
<Text size='sm' title={intl.formatDate(account.created_at, dateFormatOptions)}>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='account.member_since' defaultMessage='Joined {date}' values={{
|
id='account.member_since' defaultMessage='Joined {date}' values={{
|
||||||
date: memberSinceDate,
|
date: memberSinceDate,
|
||||||
|
|
|
@ -16,7 +16,7 @@ const messages = defineMessages({
|
||||||
days_remaining: { id: 'time_remaining.days', defaultMessage: '{number, plural, one {# day} other {# days}} left' },
|
days_remaining: { id: 'time_remaining.days', defaultMessage: '{number, plural, one {# day} other {# days}} left' },
|
||||||
});
|
});
|
||||||
|
|
||||||
const dateFormatOptions: FormatDateOptions = {
|
export const dateFormatOptions: FormatDateOptions = {
|
||||||
hour12: true,
|
hour12: true,
|
||||||
year: 'numeric',
|
year: 'numeric',
|
||||||
month: 'short',
|
month: 'short',
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { defineMessages, useIntl, FormattedMessage } from 'react-intl';
|
||||||
import { usePatronUser } from 'soapbox/api/hooks';
|
import { usePatronUser } from 'soapbox/api/hooks';
|
||||||
import Badge from 'soapbox/components/badge';
|
import Badge from 'soapbox/components/badge';
|
||||||
import Markup from 'soapbox/components/markup';
|
import Markup from 'soapbox/components/markup';
|
||||||
|
import { dateFormatOptions } from 'soapbox/components/relative-timestamp';
|
||||||
import { Icon, HStack, Stack, Text } from 'soapbox/components/ui';
|
import { Icon, HStack, Stack, Text } from 'soapbox/components/ui';
|
||||||
import { useAppSelector, useSoapboxConfig } from 'soapbox/hooks';
|
import { useAppSelector, useSoapboxConfig } from 'soapbox/hooks';
|
||||||
import { isLocal } from 'soapbox/utils/accounts';
|
import { isLocal } from 'soapbox/utils/accounts';
|
||||||
|
@ -184,7 +185,7 @@ const ProfileInfoPanel: React.FC<IProfileInfoPanel> = ({ account, username }) =>
|
||||||
className='h-4 w-4 text-gray-800 dark:text-gray-200'
|
className='h-4 w-4 text-gray-800 dark:text-gray-200'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Text size='sm'>
|
<Text size='sm' title={intl.formatDate(account.created_at, dateFormatOptions)}>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='account.member_since' defaultMessage='Joined {date}' values={{
|
id='account.member_since' defaultMessage='Joined {date}' values={{
|
||||||
date: memberSinceDate,
|
date: memberSinceDate,
|
||||||
|
|
Loading…
Reference in a new issue