Compare commits
12 commits
4dd60b7365
...
531df4cafa
Author | SHA1 | Date | |
---|---|---|---|
|
531df4cafa | ||
|
62f843b4dc | ||
|
b0a53b7fa1 | ||
|
9934daeb4d | ||
|
d4a0a080b5 | ||
|
bc4e3b0f72 | ||
|
ac760265da | ||
|
98b0ccf032 | ||
|
90f06c511a | ||
|
e7aad03279 | ||
|
1c6b0aa0d7 | ||
|
3e1b9ff53d |
3011
package-lock.json
generated
3011
package-lock.json
generated
File diff suppressed because it is too large
Load diff
26
package.json
26
package.json
|
@ -19,7 +19,7 @@
|
||||||
"@szhsin/react-menu": "~4.1.0",
|
"@szhsin/react-menu": "~4.1.0",
|
||||||
"@uidotdev/usehooks": "~2.4.1",
|
"@uidotdev/usehooks": "~2.4.1",
|
||||||
"compare-versions": "~6.1.0",
|
"compare-versions": "~6.1.0",
|
||||||
"dayjs": "~1.11.10",
|
"dayjs": "~1.11.11",
|
||||||
"dayjs-twitter": "~0.5.0",
|
"dayjs-twitter": "~0.5.0",
|
||||||
"fast-blurhash": "~1.1.2",
|
"fast-blurhash": "~1.1.2",
|
||||||
"fast-equals": "~5.0.1",
|
"fast-equals": "~5.0.1",
|
||||||
|
@ -28,18 +28,18 @@
|
||||||
"idb-keyval": "~6.2.1",
|
"idb-keyval": "~6.2.1",
|
||||||
"just-debounce-it": "~3.2.0",
|
"just-debounce-it": "~3.2.0",
|
||||||
"lz-string": "~1.5.0",
|
"lz-string": "~1.5.0",
|
||||||
"masto": "~6.7.2",
|
"masto": "~6.7.7",
|
||||||
"moize": "~6.1.6",
|
"moize": "~6.1.6",
|
||||||
"p-retry": "~6.2.0",
|
"p-retry": "~6.2.0",
|
||||||
"p-throttle": "~6.1.0",
|
"p-throttle": "~6.1.0",
|
||||||
"preact": "~10.20.2",
|
"preact": "~10.21.0",
|
||||||
"punycode": "~2.3.1",
|
"punycode": "~2.3.1",
|
||||||
"react-hotkeys-hook": "~4.5.0",
|
"react-hotkeys-hook": "~4.5.0",
|
||||||
"react-intersection-observer": "~9.8.2",
|
"react-intersection-observer": "~9.10.2",
|
||||||
"react-quick-pinch-zoom": "~5.1.0",
|
"react-quick-pinch-zoom": "~5.1.0",
|
||||||
"react-router-dom": "6.6.2",
|
"react-router-dom": "6.6.2",
|
||||||
"string-length": "6.0.0",
|
"string-length": "6.0.0",
|
||||||
"swiped-events": "~1.1.9",
|
"swiped-events": "~1.2.0",
|
||||||
"toastify-js": "~1.12.0",
|
"toastify-js": "~1.12.0",
|
||||||
"uid": "~2.0.2",
|
"uid": "~2.0.2",
|
||||||
"use-debounce": "~10.0.0",
|
"use-debounce": "~10.0.0",
|
||||||
|
@ -51,18 +51,18 @@
|
||||||
"@preact/preset-vite": "~2.8.2",
|
"@preact/preset-vite": "~2.8.2",
|
||||||
"@trivago/prettier-plugin-sort-imports": "~4.3.0",
|
"@trivago/prettier-plugin-sort-imports": "~4.3.0",
|
||||||
"postcss": "~8.4.38",
|
"postcss": "~8.4.38",
|
||||||
"postcss-dark-theme-class": "~1.2.3",
|
"postcss-dark-theme-class": "~1.3.0",
|
||||||
"postcss-preset-env": "~9.5.8",
|
"postcss-preset-env": "~9.5.11",
|
||||||
"twitter-text": "~3.1.0",
|
"twitter-text": "~3.1.0",
|
||||||
"vite": "~5.2.10",
|
"vite": "~5.2.11",
|
||||||
"vite-plugin-generate-file": "~0.1.1",
|
"vite-plugin-generate-file": "~0.1.1",
|
||||||
"vite-plugin-html-config": "~1.0.11",
|
"vite-plugin-html-config": "~1.0.11",
|
||||||
"vite-plugin-pwa": "~0.19.8",
|
"vite-plugin-pwa": "~0.20.0",
|
||||||
"vite-plugin-remove-console": "~2.2.0",
|
"vite-plugin-remove-console": "~2.2.0",
|
||||||
"workbox-cacheable-response": "~7.0.0",
|
"workbox-cacheable-response": "~7.1.0",
|
||||||
"workbox-expiration": "~7.0.0",
|
"workbox-expiration": "~7.1.0",
|
||||||
"workbox-routing": "~7.0.0",
|
"workbox-routing": "~7.1.0",
|
||||||
"workbox-strategies": "~7.0.0"
|
"workbox-strategies": "~7.1.0"
|
||||||
},
|
},
|
||||||
"postcss": {
|
"postcss": {
|
||||||
"plugins": {
|
"plugins": {
|
||||||
|
|
|
@ -62,7 +62,7 @@ const iconsRoute = new Route(
|
||||||
cacheName: 'icons',
|
cacheName: 'icons',
|
||||||
plugins: [
|
plugins: [
|
||||||
new ExpirationPlugin({
|
new ExpirationPlugin({
|
||||||
maxEntries: 50,
|
maxEntries: 300,
|
||||||
maxAgeSeconds: 3 * 24 * 60 * 60, // 3 days
|
maxAgeSeconds: 3 * 24 * 60 * 60, // 3 days
|
||||||
purgeOnQuotaError: true,
|
purgeOnQuotaError: true,
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -1967,6 +1967,10 @@ body > .szh-menu-container {
|
||||||
.szh-menu
|
.szh-menu
|
||||||
.szh-menu__item.danger:not(.szh-menu__item--disabled).szh-menu__item--hover {
|
.szh-menu__item.danger:not(.szh-menu__item--disabled).szh-menu__item--hover {
|
||||||
background-color: var(--red-text-color);
|
background-color: var(--red-text-color);
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
background-color: var(--red-color);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.szh-menu
|
.szh-menu
|
||||||
.szh-menu__item:not(.szh-menu__item--disabled):not(
|
.szh-menu__item:not(.szh-menu__item--disabled):not(
|
||||||
|
|
|
@ -186,6 +186,7 @@ function AccountInfo({
|
||||||
memorial,
|
memorial,
|
||||||
moved,
|
moved,
|
||||||
roles,
|
roles,
|
||||||
|
hideCollections,
|
||||||
} = info || {};
|
} = info || {};
|
||||||
let headerIsAvatar = false;
|
let headerIsAvatar = false;
|
||||||
let { header, headerStatic } = info || {};
|
let { header, headerStatic } = info || {};
|
||||||
|
@ -677,6 +678,9 @@ function AccountInfo({
|
||||||
excludeRelationshipAttrs: isSelf
|
excludeRelationshipAttrs: isSelf
|
||||||
? ['followedBy']
|
? ['followedBy']
|
||||||
: [],
|
: [],
|
||||||
|
blankCopy: hideCollections
|
||||||
|
? 'This user has chosen to not make this information available.'
|
||||||
|
: undefined,
|
||||||
};
|
};
|
||||||
}, 0);
|
}, 0);
|
||||||
}}
|
}}
|
||||||
|
@ -712,6 +716,9 @@ function AccountInfo({
|
||||||
fetchAccounts: fetchFollowing,
|
fetchAccounts: fetchFollowing,
|
||||||
instance,
|
instance,
|
||||||
excludeRelationshipAttrs: isSelf ? ['following'] : [],
|
excludeRelationshipAttrs: isSelf ? ['following'] : [],
|
||||||
|
blankCopy: hideCollections
|
||||||
|
? 'This user has chosen to not make this information available.'
|
||||||
|
: undefined,
|
||||||
};
|
};
|
||||||
}, 0);
|
}, 0);
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -17,6 +17,21 @@
|
||||||
);
|
);
|
||||||
filter: saturate(0.5);
|
filter: saturate(0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:is(a) {
|
||||||
|
pointer-events: auto;
|
||||||
|
display: block;
|
||||||
|
text-decoration: none;
|
||||||
|
color: inherit;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border-color: var(--outline-hover-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
> * {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.accounts-list {
|
.accounts-list {
|
||||||
|
|
|
@ -11,6 +11,7 @@ import useLocationChange from '../utils/useLocationChange';
|
||||||
|
|
||||||
import AccountBlock from './account-block';
|
import AccountBlock from './account-block';
|
||||||
import Icon from './icon';
|
import Icon from './icon';
|
||||||
|
import Link from './link';
|
||||||
import Loader from './loader';
|
import Loader from './loader';
|
||||||
import Status from './status';
|
import Status from './status';
|
||||||
|
|
||||||
|
@ -19,6 +20,7 @@ export default function GenericAccounts({
|
||||||
excludeRelationshipAttrs = [],
|
excludeRelationshipAttrs = [],
|
||||||
postID,
|
postID,
|
||||||
onClose = () => {},
|
onClose = () => {},
|
||||||
|
blankCopy = 'Nothing to show',
|
||||||
}) {
|
}) {
|
||||||
const { masto, instance: currentInstance } = api();
|
const { masto, instance: currentInstance } = api();
|
||||||
const isCurrentInstance = instance ? instance === currentInstance : true;
|
const isCurrentInstance = instance ? instance === currentInstance : true;
|
||||||
|
@ -143,9 +145,12 @@ export default function GenericAccounts({
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
{post && (
|
{post && (
|
||||||
<div class="post-preview">
|
<Link
|
||||||
|
to={`/${instance || currentInstance}/s/${post.id}`}
|
||||||
|
class="post-preview"
|
||||||
|
>
|
||||||
<Status status={post} size="s" readOnly />
|
<Status status={post} size="s" readOnly />
|
||||||
</div>
|
</Link>
|
||||||
)}
|
)}
|
||||||
{accounts.length > 0 ? (
|
{accounts.length > 0 ? (
|
||||||
<>
|
<>
|
||||||
|
@ -217,7 +222,7 @@ export default function GenericAccounts({
|
||||||
) : uiState === 'error' ? (
|
) : uiState === 'error' ? (
|
||||||
<p class="ui-state">Error loading accounts</p>
|
<p class="ui-state">Error loading accounts</p>
|
||||||
) : (
|
) : (
|
||||||
<p class="ui-state insignificant">Nothing to show</p>
|
<p class="ui-state insignificant">{blankCopy}</p>
|
||||||
)}
|
)}
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -166,7 +166,7 @@ function Media({
|
||||||
[to],
|
[to],
|
||||||
);
|
);
|
||||||
|
|
||||||
const remoteMediaURLObj = remoteMediaURL ? new URL(remoteMediaURL) : null;
|
const remoteMediaURLObj = remoteMediaURL ? getURLObj(remoteMediaURL) : null;
|
||||||
const isVideoMaybe =
|
const isVideoMaybe =
|
||||||
type === 'unknown' &&
|
type === 'unknown' &&
|
||||||
remoteMediaURLObj &&
|
remoteMediaURLObj &&
|
||||||
|
@ -618,4 +618,13 @@ function Media({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getURLObj(url) {
|
||||||
|
try {
|
||||||
|
// Fake base URL if url doesn't have https:// prefix
|
||||||
|
return new URL(url, location.origin);
|
||||||
|
} catch (e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export default Media;
|
export default Media;
|
||||||
|
|
|
@ -28,6 +28,7 @@ const NOTIFICATION_ICONS = {
|
||||||
'admin.signup': 'account-edit',
|
'admin.signup': 'account-edit',
|
||||||
'admin.report': 'account-warning',
|
'admin.report': 'account-warning',
|
||||||
severed_relationships: 'heart-break',
|
severed_relationships: 'heart-break',
|
||||||
|
moderation_warning: 'alert',
|
||||||
emoji_reaction: 'emoji2',
|
emoji_reaction: 'emoji2',
|
||||||
'pleroma:emoji_reaction': 'emoji2',
|
'pleroma:emoji_reaction': 'emoji2',
|
||||||
};
|
};
|
||||||
|
@ -45,6 +46,8 @@ poll = A poll you have voted in or created has ended
|
||||||
update = A status you interacted with has been edited
|
update = A status you interacted with has been edited
|
||||||
admin.sign_up = Someone signed up (optionally sent to admins)
|
admin.sign_up = Someone signed up (optionally sent to admins)
|
||||||
admin.report = A new report has been filed
|
admin.report = A new report has been filed
|
||||||
|
severed_relationships = Severed relationships
|
||||||
|
moderation_warning = Moderation warning
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function emojiText(emoji, emoji_url) {
|
function emojiText(emoji, emoji_url) {
|
||||||
|
@ -91,6 +94,7 @@ const contentText = {
|
||||||
Lost connections with <i>{name}</i>.
|
Lost connections with <i>{name}</i>.
|
||||||
</>
|
</>
|
||||||
),
|
),
|
||||||
|
moderation_warning: <b>Moderation warning</b>,
|
||||||
emoji_reaction: emojiText,
|
emoji_reaction: emojiText,
|
||||||
'pleroma:emoji_reaction': emojiText,
|
'pleroma:emoji_reaction': emojiText,
|
||||||
};
|
};
|
||||||
|
@ -117,6 +121,17 @@ const SEVERED_RELATIONSHIPS_TEXT = {
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const MODERATION_WARNING_TEXT = {
|
||||||
|
none: 'Your account has received a moderation warning.',
|
||||||
|
disable: 'Your account has been disabled.',
|
||||||
|
mark_statuses_as_sensitive:
|
||||||
|
'Some of your posts have been marked as sensitive.',
|
||||||
|
delete_statuses: 'Some of your posts have been deleted.',
|
||||||
|
sensitive: 'Your posts will be marked as sensitive from now on.',
|
||||||
|
silence: 'Your account has been limited.',
|
||||||
|
suspend: 'Your account has been suspended.',
|
||||||
|
};
|
||||||
|
|
||||||
const AVATARS_LIMIT = 50;
|
const AVATARS_LIMIT = 50;
|
||||||
|
|
||||||
function Notification({
|
function Notification({
|
||||||
|
@ -125,8 +140,16 @@ function Notification({
|
||||||
isStatic,
|
isStatic,
|
||||||
disableContextMenu,
|
disableContextMenu,
|
||||||
}) {
|
}) {
|
||||||
const { id, status, account, report, event, _accounts, _statuses } =
|
const {
|
||||||
notification;
|
id,
|
||||||
|
status,
|
||||||
|
account,
|
||||||
|
report,
|
||||||
|
event,
|
||||||
|
moderation_warning,
|
||||||
|
_accounts,
|
||||||
|
_statuses,
|
||||||
|
} = notification;
|
||||||
let { type } = notification;
|
let { type } = notification;
|
||||||
|
|
||||||
// status = Attached when type of the notification is favourite, reblog, status, mention, poll, or update
|
// status = Attached when type of the notification is favourite, reblog, status, mention, poll, or update
|
||||||
|
@ -314,6 +337,20 @@ function Notification({
|
||||||
.
|
.
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
{type === 'moderation_warning' && !!moderation_warning && (
|
||||||
|
<div>
|
||||||
|
{MODERATION_WARNING_TEXT[moderation_warning.action]}
|
||||||
|
<br />
|
||||||
|
<a
|
||||||
|
href={`/disputes/strikes/${moderation_warning.id}`}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
Learn more <Icon icon="external" size="s" />
|
||||||
|
</a>
|
||||||
|
.
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{_accounts?.length > 1 && (
|
{_accounts?.length > 1 && (
|
||||||
|
|
|
@ -569,8 +569,15 @@
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
||||||
|
&.horizontal {
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.status-filtered-badge.badge-meta {
|
.status-filtered-badge:not(.horizontal).badge-meta {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -584,10 +591,10 @@
|
||||||
border-color: var(--text-color);
|
border-color: var(--text-color);
|
||||||
background: var(--bg-color);
|
background: var(--bg-color);
|
||||||
}
|
}
|
||||||
.status-filtered-badge.badge-meta > span:first-child {
|
.status-filtered-badge:not(.horizontal).badge-meta > span:first-child {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.status-filtered-badge.badge-meta > span + span {
|
.status-filtered-badge:not(.horizontal).badge-meta > span + span {
|
||||||
display: block;
|
display: block;
|
||||||
font-size: 9px;
|
font-size: 9px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
@ -601,6 +608,10 @@
|
||||||
left: 0;
|
left: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
.status-filtered-badge.horizontal.badge-meta > span + span {
|
||||||
|
font-weight: normal;
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
.status.large > .container > .content-container {
|
.status.large > .container > .content-container {
|
||||||
margin-left: calc(-50px - 16px);
|
margin-left: calc(-50px - 16px);
|
||||||
|
|
|
@ -303,6 +303,7 @@ function Status({
|
||||||
onMouseEnter: debugHover,
|
onMouseEnter: debugHover,
|
||||||
}}
|
}}
|
||||||
showFollowedTags
|
showFollowedTags
|
||||||
|
quoted={quoted}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -3176,6 +3177,7 @@ function FilteredStatus({
|
||||||
instance,
|
instance,
|
||||||
containerProps = {},
|
containerProps = {},
|
||||||
showFollowedTags,
|
showFollowedTags,
|
||||||
|
quoted,
|
||||||
}) {
|
}) {
|
||||||
const snapStates = useSnapshot(states);
|
const snapStates = useSnapshot(states);
|
||||||
const {
|
const {
|
||||||
|
@ -3220,7 +3222,9 @@ function FilteredStatus({
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
class={
|
class={
|
||||||
isReblog
|
quoted
|
||||||
|
? ''
|
||||||
|
: isReblog
|
||||||
? group
|
? group
|
||||||
? 'status-group'
|
? 'status-group'
|
||||||
: 'status-reblog'
|
: 'status-reblog'
|
||||||
|
@ -3236,7 +3240,11 @@ function FilteredStatus({
|
||||||
}}
|
}}
|
||||||
{...bindLongPressPeek()}
|
{...bindLongPressPeek()}
|
||||||
>
|
>
|
||||||
<article data-state-post-id={ssKey} class="status filtered" tabindex="-1">
|
<article
|
||||||
|
data-state-post-id={ssKey}
|
||||||
|
class={`status filtered ${quoted ? 'status-card' : ''}`}
|
||||||
|
tabindex="-1"
|
||||||
|
>
|
||||||
<b
|
<b
|
||||||
class="status-filtered-badge clickable badge-meta"
|
class="status-filtered-badge clickable badge-meta"
|
||||||
title={filterTitleStr}
|
title={filterTitleStr}
|
||||||
|
|
|
@ -646,7 +646,11 @@ const TimelineItem = memo(
|
||||||
>
|
>
|
||||||
<Link class="status-link timeline-item" to={url}>
|
<Link class="status-link timeline-item" to={url}>
|
||||||
{showCompact ? (
|
{showCompact ? (
|
||||||
<TimelineStatusCompact status={item} instance={instance} />
|
<TimelineStatusCompact
|
||||||
|
status={item}
|
||||||
|
instance={instance}
|
||||||
|
filterContext={filterContext}
|
||||||
|
/>
|
||||||
) : useItemID ? (
|
) : useItemID ? (
|
||||||
<Status
|
<Status
|
||||||
statusID={statusID}
|
statusID={statusID}
|
||||||
|
@ -820,11 +824,12 @@ function StatusCarousel({ title, class: className, children }) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function TimelineStatusCompact({ status, instance }) {
|
function TimelineStatusCompact({ status, instance, filterContext }) {
|
||||||
const snapStates = useSnapshot(states);
|
const snapStates = useSnapshot(states);
|
||||||
const { id, visibility, language } = status;
|
const { id, visibility, language } = status;
|
||||||
const statusPeekText = statusPeek(status);
|
const statusPeekText = statusPeek(status);
|
||||||
const sKey = statusKey(id, instance);
|
const sKey = statusKey(id, instance);
|
||||||
|
const filterInfo = isFiltered(status.filtered, filterContext);
|
||||||
return (
|
return (
|
||||||
<article
|
<article
|
||||||
class={`status compact-thread ${
|
class={`status compact-thread ${
|
||||||
|
@ -850,13 +855,24 @@ function TimelineStatusCompact({ status, instance }) {
|
||||||
lang={language}
|
lang={language}
|
||||||
dir="auto"
|
dir="auto"
|
||||||
>
|
>
|
||||||
{statusPeekText}
|
{!!filterInfo ? (
|
||||||
{status.sensitive && status.spoilerText && (
|
<b
|
||||||
|
class="status-filtered-badge badge-meta horizontal"
|
||||||
|
title={filterInfo?.titlesStr || ''}
|
||||||
|
>
|
||||||
|
<span>Filtered</span>: <span>{filterInfo?.titlesStr || ''}</span>
|
||||||
|
</b>
|
||||||
|
) : (
|
||||||
<>
|
<>
|
||||||
{' '}
|
{statusPeekText}
|
||||||
<span class="spoiler-badge">
|
{status.sensitive && status.spoilerText && (
|
||||||
<Icon icon="eye-close" size="s" />
|
<>
|
||||||
</span>
|
{' '}
|
||||||
|
<span class="spoiler-badge">
|
||||||
|
<Icon icon="eye-close" size="s" />
|
||||||
|
</span>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -102,6 +102,17 @@ function Notifications({ columnMode }) {
|
||||||
// },
|
// },
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
// TEST: Slot in a fake notification to test 'moderation_warning'
|
||||||
|
// notifications.unshift({
|
||||||
|
// id: '123123',
|
||||||
|
// type: 'moderation_warning',
|
||||||
|
// createdAt: new Date().toISOString(),
|
||||||
|
// moderation_warning: {
|
||||||
|
// id: '1231234',
|
||||||
|
// action: 'mark_statuses_as_sensitive',
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
|
||||||
// console.log({ notifications });
|
// console.log({ notifications });
|
||||||
|
|
||||||
const groupedNotifications = groupNotifications(notifications);
|
const groupedNotifications = groupNotifications(notifications);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
const { locale } = Intl.NumberFormat().resolvedOptions();
|
const { locale } = Intl.NumberFormat().resolvedOptions();
|
||||||
const shortenNumber = Intl.NumberFormat(locale, {
|
const shortenNumber = Intl.NumberFormat(locale, {
|
||||||
notation: 'compact',
|
notation: 'compact',
|
||||||
|
roundingMode: 'floor',
|
||||||
}).format;
|
}).format;
|
||||||
export default shortenNumber;
|
export default shortenNumber;
|
||||||
|
|
Loading…
Reference in a new issue