refactor: org name changed from bitsocialhq to bitsocialnet

This commit is contained in:
plebeius
2026-03-09 17:01:35 +08:00
parent 3b341922c4
commit 417482060d
150 changed files with 209 additions and 209 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ const testState = vi.hoisted(() => ({
useThemeMock: vi.fn(),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useAccount: () => testState.account,
useAccountComment: ({ commentIndex }: { commentIndex?: number }) => (typeof commentIndex === 'number' ? testState.accountComments[commentIndex] : undefined),
useSubplebbit: ({ subplebbitAddress }: { subplebbitAddress?: string }) => (subplebbitAddress ? testState.subplebbits[subplebbitAddress] : undefined),
+1 -1
View File
@@ -1,6 +1,6 @@
import { lazy, Suspense, useEffect } from 'react';
import { Navigate, Outlet, Route, Routes, useLocation, useParams } from 'react-router-dom';
import { useAccount, useAccountComment, useSubplebbit } from '@bitsocialhq/bitsocial-react-hooks';
import { useAccount, useAccountComment, useSubplebbit } from '@bitsocialnet/bitsocial-react-hooks';
import { initSnow, removeSnow } from './lib/snow';
import { isAllView, isCatalogView, isModView, isSubscriptionsView } from './lib/utils/view-utils';
import { preloadThemeAssets } from './lib/utils/preload-utils';
@@ -1,7 +1,7 @@
import type { BlotterEntry } from '../../lib/utils/blotter-utils';
import styles from './blotter-message.module.css';
const RELEASES_BASE = 'https://github.com/bitsocialhq/5chan/releases/tag/v';
const RELEASES_BASE = 'https://github.com/bitsocialnet/5chan/releases/tag/v';
function normalizeMessage(text: string): string {
return text.replace(/subplebbit/gi, 'board').replace(/plebchan/gi, '5chan');
@@ -70,7 +70,7 @@ vi.mock('react-router-dom', async () => {
};
});
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useAccountComment: () => testState.accountComment,
useComment: ({ commentCid }: { commentCid?: string }) => (commentCid ? testState.commentsByCid[commentCid] : undefined),
useSubscribe: () => ({
@@ -1,6 +1,6 @@
import { useTranslation } from 'react-i18next';
import { Link, useLocation, useNavigate, useParams } from 'react-router-dom';
import { useAccountComment, useComment, useSubscribe } from '@bitsocialhq/bitsocial-react-hooks';
import { useAccountComment, useComment, useSubscribe } from '@bitsocialnet/bitsocial-react-hooks';
import { isAllView, isCatalogView, isModView, isModQueueView, isPendingPostView, isPostPageView, isSubscriptionsView } from '../../lib/utils/view-utils';
import { usePostPageNumber } from '../../hooks/use-post-page-number';
import { useDirectories, useDirectoryByAddress } from '../../hooks/use-directories';
@@ -49,11 +49,11 @@ vi.mock('react-router-dom', async () => {
};
});
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useAccountComment: () => testState.accountComment,
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks/dist/stores/accounts', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks/dist/stores/accounts', () => ({
default: (selector: (state: { activeAccountId?: string; accounts: Record<string, { subscriptions?: string[] }> }) => unknown) =>
selector({
accounts: {
@@ -65,7 +65,7 @@ vi.mock('@bitsocialhq/bitsocial-react-hooks/dist/stores/accounts', () => ({
}),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks/dist/stores/subplebbits', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks/dist/stores/subplebbits', () => ({
default: (selector: (state: { subplebbits: typeof testState.subplebbits }) => unknown) =>
selector({
subplebbits: testState.subplebbits,
+3 -3
View File
@@ -1,9 +1,9 @@
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useLocation, useParams, useNavigate } from 'react-router-dom';
import { useAccountComment } from '@bitsocialhq/bitsocial-react-hooks';
import useAccountsStore from '@bitsocialhq/bitsocial-react-hooks/dist/stores/accounts';
import useSubplebbitsStore from '@bitsocialhq/bitsocial-react-hooks/dist/stores/subplebbits';
import { useAccountComment } from '@bitsocialnet/bitsocial-react-hooks';
import useAccountsStore from '@bitsocialnet/bitsocial-react-hooks/dist/stores/accounts';
import useSubplebbitsStore from '@bitsocialnet/bitsocial-react-hooks/dist/stores/subplebbits';
import getShortAddress from '../../lib/get-short-address';
import { useStableSubplebbit } from '../../hooks/use-stable-subplebbit';
import { isAllView, isSubscriptionsView, isModView } from '../../lib/utils/view-utils';
@@ -1,5 +1,5 @@
import { useMemo } from 'react';
import useSubplebbitsStore from '@bitsocialhq/bitsocial-react-hooks/dist/stores/subplebbits';
import useSubplebbitsStore from '@bitsocialnet/bitsocial-react-hooks/dist/stores/subplebbits';
import { normalizeBoardAddress, useDirectoryByAddress } from '../../hooks/use-directories';
import useIsSubplebbitOffline from '../../hooks/use-is-subplebbit-offline';
import { useResolvedSubplebbitAddress } from '../../hooks/use-resolved-subplebbit-address';
@@ -1,6 +1,6 @@
import { useState, useMemo } from 'react';
import { Link, useLocation } from 'react-router-dom';
import { useAccount } from '@bitsocialhq/bitsocial-react-hooks';
import { useAccount } from '@bitsocialnet/bitsocial-react-hooks';
import useBoardsBarEditModalStore from '../../stores/use-boards-bar-edit-modal-store';
import useBoardsBarVisibilityStore from '../../stores/use-boards-bar-visibility-store';
import { getAllBoardCodes } from '../../constants/board-codes';
@@ -52,11 +52,11 @@ vi.mock('react-router-dom', async () => {
};
});
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useAccountComment: () => testState.accountComment,
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks/dist/stores/accounts', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks/dist/stores/accounts', () => ({
default: (selector: (state: { activeAccountId: string; accounts: Record<string, { subscriptions: string[] }> }) => unknown) =>
selector({
activeAccountId: 'account-1',
+2 -2
View File
@@ -2,8 +2,8 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { Link, useLocation, useNavigate, useParams } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import getShortAddress from '../../lib/get-short-address';
import { useAccountComment } from '@bitsocialhq/bitsocial-react-hooks';
import useAccountsStore from '@bitsocialhq/bitsocial-react-hooks/dist/stores/accounts';
import { useAccountComment } from '@bitsocialnet/bitsocial-react-hooks';
import useAccountsStore from '@bitsocialnet/bitsocial-react-hooks/dist/stores/accounts';
import { isAllView, isCatalogView, isModView, isSubscriptionsView } from '../../lib/utils/view-utils';
import { useAccountSubplebbitAddresses } from '../../hooks/use-account-subplebbit-addresses';
import { useDirectories, useDirectoriesMetadata, DirectoryCommunity } from '../../hooks/use-directories';
@@ -62,13 +62,13 @@ vi.mock('react-i18next', () => ({
}),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useReplies: ({ comment }: { comment?: TestComment }) => ({
replies: comment ? testState.replies : [],
}),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks/dist/lib/localforage-lru/index.js', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks/dist/lib/localforage-lru/index.js', () => ({
default: {
createInstance: () => ({
entries: vi.fn().mockResolvedValue([]),
+1 -1
View File
@@ -3,7 +3,7 @@ import { createPortal } from 'react-dom';
import { useTranslation } from 'react-i18next';
import { Link, useLocation, useParams } from 'react-router-dom';
import { useFloating, offset, size, Placement } from '@floating-ui/react';
import { Comment, useReplies } from '@bitsocialhq/bitsocial-react-hooks';
import { Comment, useReplies } from '@bitsocialnet/bitsocial-react-hooks';
import getShortAddress from '../../lib/get-short-address';
import { shouldShowSnow } from '../../lib/snow';
import { getHasThumbnail } from '../../lib/utils/media-utils';
@@ -35,7 +35,7 @@ vi.mock('react-i18next', () => ({
}),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useAccount: () => testState.account,
useComment: ({ commentCid }: { commentCid?: string }) => (commentCid ? testState.commentsByCid[commentCid] : undefined),
}));
@@ -1,6 +1,6 @@
import { useRef, useState, useEffect, useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import { Challenge as ChallengeType, useAccount, useComment } from '@bitsocialhq/bitsocial-react-hooks';
import { Challenge as ChallengeType, useAccount, useComment } from '@bitsocialnet/bitsocial-react-hooks';
import { getPublicationPreview, getPublicationType, getVotePreview } from '../../lib/utils/challenge-utils';
import useIsMobile from '../../hooks/use-is-mobile';
import useChallengesStore from '../../stores/use-challenges-store';
@@ -83,11 +83,11 @@ vi.mock('react-router-dom', async () => {
};
});
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useComment: ({ commentCid }: { commentCid?: string }) => (commentCid ? testState.commentsByCid[commentCid] : undefined),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks/dist/stores/subplebbits-pages', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks/dist/stores/subplebbits-pages', () => ({
default: (selector: (state: { comments: Record<string, TestComment> }) => unknown) =>
selector({
comments: testState.commentsByCid,
@@ -1,8 +1,8 @@
import { Fragment, useMemo, useState } from 'react';
import { useLocation, useParams } from 'react-router-dom';
import { Trans, useTranslation } from 'react-i18next';
import { Comment, useComment } from '@bitsocialhq/bitsocial-react-hooks';
import useSubplebbitsPagesStore from '@bitsocialhq/bitsocial-react-hooks/dist/stores/subplebbits-pages';
import { Comment, useComment } from '@bitsocialnet/bitsocial-react-hooks';
import useSubplebbitsPagesStore from '@bitsocialnet/bitsocial-react-hooks/dist/stores/subplebbits-pages';
import usePostNumberStore from '../../stores/use-post-number-store';
import getShortAddress from '../../lib/get-short-address';
import { getFormattedDate, getFormattedTimeAgo } from '../../lib/utils/time-utils';
@@ -37,7 +37,7 @@ const CreateBoardModal = () => {
<h3>Creating Your Board</h3>
<p>
Create a board using the CLI:
<a href='https://github.com/bitsocialhq/bitsocial-cli' target='_blank' rel='noopener noreferrer'>
<a href='https://github.com/bitsocialnet/bitsocial-cli' target='_blank' rel='noopener noreferrer'>
bitsocial-cli
</a>
. <strong>Build a following:</strong> Users can subscribe to your board via the &quot;[Subscribe]&quot; button, which adds it to their top bar. You can gain
@@ -49,7 +49,7 @@ const CreateBoardModal = () => {
<h3>Submitting to a Directory</h3>
<p>
Open a PR editing{' '}
<a href='https://github.com/bitsocialhq/lists/blob/master/5chan-directories.json' target='_blank' rel='noopener noreferrer'>
<a href='https://github.com/bitsocialnet/lists/blob/master/5chan-directories.json' target='_blank' rel='noopener noreferrer'>
5chan-directories.json
</a>{' '}
with your board&apos;s title, address, and NSFW status. Devs will review and merge if approved. 99% uptime is required.
@@ -44,7 +44,7 @@ const DirectoryModal = () => {
<h3>Creating Your Board</h3>
<p>
<strong>Anyone can create a board</strong> using the official CLI:{' '}
<a href='https://github.com/bitsocialhq/bitsocial-cli' target='_blank' rel='noopener noreferrer'>
<a href='https://github.com/bitsocialnet/bitsocial-cli' target='_blank' rel='noopener noreferrer'>
bitsocial-cli
</a>
. Users can access it anytime via the search bar, direct links, or by subscribing with the &quot;[Subscribe]&quot; button
@@ -57,7 +57,7 @@ const DirectoryModal = () => {
<h3>Directory Submission</h3>
<p>
To submit your board, open a PR editing{' '}
<a href='https://github.com/bitsocialhq/lists/blob/master/5chan-directories.json' target='_blank' rel='noopener noreferrer'>
<a href='https://github.com/bitsocialnet/lists/blob/master/5chan-directories.json' target='_blank' rel='noopener noreferrer'>
5chan-directories.json
</a>{' '}
with your board&apos;s title, address, and NSFW status. Requirements: 99% uptime (they&apos;re P2P nodes), active, well-moderated, and relevant to the
@@ -71,7 +71,7 @@ vi.mock('@floating-ui/react', () => ({
useRole: () => ({}),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useAccount: () => testState.account,
usePublishCommentEdit: (options: Record<string, any>) => {
testState.authorOptions = options;
+1 -1
View File
@@ -8,7 +8,7 @@ import {
usePublishCommentEdit,
usePublishCommentModeration,
PublishCommentModerationOptions,
} from '@bitsocialhq/bitsocial-react-hooks';
} from '@bitsocialnet/bitsocial-react-hooks';
import styles from './edit-menu.module.css';
import { alertChallengeVerificationFailed } from '../../lib/utils/challenge-utils';
import useChallengesStore from '../../stores/use-challenges-store';
@@ -30,7 +30,7 @@ vi.mock('react-i18next', () => ({
}),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useComment: () => testState.post,
}));
+1 -1
View File
@@ -1,6 +1,6 @@
import { useTranslation } from 'react-i18next';
import { useLocation, useParams } from 'react-router-dom';
import { useComment } from '@bitsocialhq/bitsocial-react-hooks';
import { useComment } from '@bitsocialnet/bitsocial-react-hooks';
import BoardsBar from '../boards-bar';
import SiteLegalMeta from '../site-legal-meta';
import StyleSelector from '../style-selector/style-selector';
@@ -53,11 +53,11 @@ vi.mock('@floating-ui/react', () => ({
}),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useComment: ({ commentCid }: { commentCid?: string }) => (commentCid ? testState.comments[commentCid] : undefined),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks/dist/stores/subplebbits-pages', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks/dist/stores/subplebbits-pages', () => ({
default: (selector: (state: { comments: typeof testState.comments }) => unknown) =>
selector({
comments: testState.comments,
+2 -2
View File
@@ -12,8 +12,8 @@ import { canEmbed } from '../embed';
import { is5chanLink, transform5chanLinkToInternal, isValidCrossboardPattern } from '../../lib/utils/url-utils';
import { isUnavailableQuoteTarget } from '../../lib/utils/quote-link-utils';
import usePostNumberStore from '../../stores/use-post-number-store';
import useSubplebbitsPagesStore from '@bitsocialhq/bitsocial-react-hooks/dist/stores/subplebbits-pages';
import { useComment } from '@bitsocialhq/bitsocial-react-hooks';
import useSubplebbitsPagesStore from '@bitsocialnet/bitsocial-react-hooks/dist/stores/subplebbits-pages';
import { useComment } from '@bitsocialnet/bitsocial-react-hooks';
import ReplyQuotePreview from '../reply-quote-preview';
const safeParseUrl = (href: string): URL | null => {
+2 -2
View File
@@ -2,7 +2,7 @@ import { useEffect, useRef, useState, useCallback } from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { Link, useLocation, useNavigationType, useParams } from 'react-router-dom';
import { Virtuoso, VirtuosoHandle, StateSnapshot } from 'react-virtuoso';
import { Comment, deleteComment, useEditedComment, useReplies, useAccount, useAccountComment } from '@bitsocialhq/bitsocial-react-hooks';
import { Comment, deleteComment, useEditedComment, useReplies, useAccount, useAccountComment } from '@bitsocialnet/bitsocial-react-hooks';
import getShortAddress from '../../lib/get-short-address';
import styles from '../../views/post/post.module.css';
import { CommentMediaInfo, getDisplayMediaInfoType, getHasThumbnail, getMediaDimensions } from '../../lib/utils/media-utils';
@@ -42,7 +42,7 @@ import useChallengesStore from '../../stores/use-challenges-store';
import useFeedResetStore from '../../stores/use-feed-reset-store';
import usePostNumberStore from '../../stores/use-post-number-store';
import { alertChallengeVerificationFailed } from '../../lib/utils/challenge-utils';
import { usePublishCommentModeration } from '@bitsocialhq/bitsocial-react-hooks';
import { usePublishCommentModeration } from '@bitsocialnet/bitsocial-react-hooks';
import useQuotedByMap from '../../hooks/use-quoted-by-map';
import useProgressiveRender from '../../hooks/use-progressive-render';
import { BOARD_REPLIES_PREVIEW_FETCH_SIZE, BOARD_REPLIES_PREVIEW_VISIBLE_COUNT, REPLIES_PER_PAGE } from '../../lib/constants';
@@ -25,7 +25,7 @@ vi.mock('react-i18next', () => ({
}),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks/dist/lib/localforage-lru/index.js', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks/dist/lib/localforage-lru/index.js', () => ({
default: {
createInstance: () => ({
entries: vi.fn().mockResolvedValue([]),
@@ -60,18 +60,18 @@ vi.mock('react-router-dom', async () => {
};
});
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
setAccount: (account: unknown) => testState.setAccountMock(account),
useAccount: () => testState.account,
useAccountComment: () => testState.accountComment,
useEditedComment: () => ({ editedComment: testState.editedComment }),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks/dist/stores/subplebbits', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks/dist/stores/subplebbits', () => ({
default: (selector: (state: { subplebbits: typeof testState.subplebbits }) => unknown) => selector({ subplebbits: testState.subplebbits }),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks/dist/stores/subplebbits-pages', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks/dist/stores/subplebbits-pages', () => ({
default: (selector: (state: { comments: typeof testState.comments }) => unknown) => selector({ comments: testState.comments }),
}));
+2 -2
View File
@@ -1,9 +1,9 @@
import { useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useLocation, useNavigate, useParams } from 'react-router-dom';
import { Comment, setAccount, useAccount, useAccountComment, useEditedComment } from '@bitsocialhq/bitsocial-react-hooks';
import { Comment, setAccount, useAccount, useAccountComment, useEditedComment } from '@bitsocialnet/bitsocial-react-hooks';
import getShortAddress from '../../lib/get-short-address';
import useSubplebbitsPagesStore from '@bitsocialhq/bitsocial-react-hooks/dist/stores/subplebbits-pages';
import useSubplebbitsPagesStore from '@bitsocialnet/bitsocial-react-hooks/dist/stores/subplebbits-pages';
import { getLinkMediaInfo } from '../../lib/utils/media-utils';
import { isValidURL } from '../../lib/utils/url-utils';
import { isAllView, isCatalogView, isModQueueView, isModView, isPostPageView, isSubscriptionsView } from '../../lib/utils/view-utils';
@@ -28,9 +28,9 @@ vi.mock('react-i18next', () => ({
}),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({}));
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({}));
vi.mock('@bitsocialhq/bitsocial-react-hooks/dist/lib/localforage-lru/index.js', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks/dist/lib/localforage-lru/index.js', () => ({
default: {
createInstance: () => ({
entries: vi.fn().mockResolvedValue([]),
@@ -1,7 +1,7 @@
import { memo, useState } from 'react';
import { createPortal } from 'react-dom';
import { useTranslation } from 'react-i18next';
import type { Comment } from '@bitsocialhq/bitsocial-react-hooks';
import type { Comment } from '@bitsocialnet/bitsocial-react-hooks';
import { autoUpdate, flip, FloatingFocusManager, offset, shift, useClick, useDismiss, useFloating, useId, useInteractions, useRole } from '@floating-ui/react';
import styles from './post-menu-mobile.module.css';
import { getCommentMediaInfo } from '../../../lib/utils/media-utils';
+1 -1
View File
@@ -2,7 +2,7 @@ import { useEffect, useRef, useState, useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import { Link, useLocation, useNavigationType, useParams } from 'react-router-dom';
import { Virtuoso, VirtuosoHandle, StateSnapshot } from 'react-virtuoso';
import { Comment, deleteComment, useEditedComment, useReplies, useAccount, usePublishCommentModeration, useAccountComment } from '@bitsocialhq/bitsocial-react-hooks';
import { Comment, deleteComment, useEditedComment, useReplies, useAccount, usePublishCommentModeration, useAccountComment } from '@bitsocialnet/bitsocial-react-hooks';
import getShortAddress from '../../lib/get-short-address';
import styles from '../../views/post/post.module.css';
import { shouldShowSnow } from '../../lib/snow';
@@ -66,12 +66,12 @@ vi.mock('react-i18next', () => ({
}),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
setAccount: (account: unknown) => testState.setAccountMock(account),
useAccount: () => testState.account,
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks/dist/stores/subplebbits', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks/dist/stores/subplebbits', () => ({
default: <T,>(selector: (state: { subplebbits: typeof testState.subplebbits }) => T) =>
selector({
subplebbits: testState.subplebbits,
+1 -1
View File
@@ -1,7 +1,7 @@
import { useEffect, useRef, useState } from 'react';
import { useLocation, useParams } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import { setAccount, useAccount } from '@bitsocialhq/bitsocial-react-hooks';
import { setAccount, useAccount } from '@bitsocialnet/bitsocial-react-hooks';
import { isValidURL } from '../../lib/utils/url-utils';
import { isAllView, isModView, isSubscriptionsView } from '../../lib/utils/view-utils';
import useSelectedTextStore from '../../stores/use-selected-text-store';
@@ -55,7 +55,7 @@ vi.mock('react-router-dom', async () => {
};
});
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useAccount: () => testState.account,
}));
@@ -1,7 +1,7 @@
import { useEffect, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
import { Link, useLocation, useNavigate } from 'react-router-dom';
import { Comment, useAccount } from '@bitsocialhq/bitsocial-react-hooks';
import { Comment, useAccount } from '@bitsocialnet/bitsocial-react-hooks';
import { useFloating, offset, shift, size, autoUpdate, Placement } from '@floating-ui/react';
import { useDirectories } from '../../hooks/use-directories';
import { getBoardPath } from '../../lib/utils/route-utils';
@@ -28,7 +28,7 @@ vi.mock('react-i18next', () => ({
}),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useAccount: hookMocks.useAccount,
useAccounts: hookMocks.useAccounts,
deleteAccount: hookMocks.deleteAccount,
@@ -1,6 +1,6 @@
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
import { deleteAccount, exportAccount, importAccount, setActiveAccount, useAccount, useAccounts } from '@bitsocialhq/bitsocial-react-hooks';
import { deleteAccount, exportAccount, importAccount, setActiveAccount, useAccount, useAccounts } from '@bitsocialnet/bitsocial-react-hooks';
import styles from './account-settings.module.css';
import { Capacitor } from '@capacitor/core';
import { useLocation, useNavigate } from 'react-router-dom';
@@ -37,7 +37,7 @@ vi.mock('react-i18next', () => ({
}),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
setAccount: (account: unknown) => testState.setAccountMock(account),
useAccount: () => testState.account,
usePlebbitRpcSettings: () => testState.rpcSettings,
@@ -1,5 +1,5 @@
import { memo, RefObject, useRef, useState } from 'react';
import { setAccount, useAccount, usePlebbitRpcSettings } from '@bitsocialhq/bitsocial-react-hooks';
import { setAccount, useAccount, usePlebbitRpcSettings } from '@bitsocialnet/bitsocial-react-hooks';
import { useTranslation } from 'react-i18next';
import styles from './advanced-settings.module.css';
@@ -1,6 +1,6 @@
import { memo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useAccount, setAccount, useResolvedAuthorAddress } from '@bitsocialhq/bitsocial-react-hooks';
import { useAccount, setAccount, useResolvedAuthorAddress } from '@bitsocialnet/bitsocial-react-hooks';
import styles from './crypto-address-setting.module.css';
const withErrorHandling = async <T,>(fn: () => Promise<T>, onError: (e: unknown) => void): Promise<T | undefined> => {
@@ -1,5 +1,5 @@
import { memo, useState } from 'react';
import { Account, setAccount, useAccount } from '@bitsocialhq/bitsocial-react-hooks';
import { Account, setAccount, useAccount } from '@bitsocialnet/bitsocial-react-hooks';
import styles from './crypto-wallets-setting.module.css';
import { Trans, useTranslation } from 'react-i18next';
import capitalize from 'lodash/capitalize';
@@ -14,21 +14,21 @@ const isElectron = window.electronApi?.isElectron === true;
const fetchLatestVersionInfo = async (t: (key: string, opts?: Record<string, unknown>) => string): Promise<void> => {
try {
const packageRes = await fetch('https://raw.githubusercontent.com/bitsocialhq/5chan/master/package.json', { cache: 'no-cache' });
const packageRes = await fetch('https://raw.githubusercontent.com/bitsocialnet/5chan/master/package.json', { cache: 'no-cache' });
const packageData = await packageRes.json();
let updateAvailable = false;
if (packageJson.version !== packageData.version) {
const newVersionText = t('new_stable_version', { newVersion: packageData.version, oldVersion: packageJson.version });
const updateActionText = isElectron
? t('download_latest_desktop', { link: 'https://github.com/bitsocialhq/5chan/releases/latest', interpolation: { escapeValue: false } })
? t('download_latest_desktop', { link: 'https://github.com/bitsocialnet/5chan/releases/latest', interpolation: { escapeValue: false } })
: t('refresh_to_update');
alert(newVersionText + ' ' + updateActionText);
updateAvailable = true;
}
if (commitRef && commitRef.length > 0) {
const commitRes = await fetch('https://api.github.com/repos/bitsocialhq/5chan/commits?per_page=1&sha=development', { cache: 'no-cache' });
const commitRes = await fetch('https://api.github.com/repos/bitsocialnet/5chan/commits?per_page=1&sha=development', { cache: 'no-cache' });
const commitData = await commitRes.json();
const latestCommitHash = commitData[0].sha;
@@ -6,7 +6,7 @@ import { isWebRuntime } from '../../../lib/media-hosting/show-upload-controls';
import styles from '../interface-settings/interface-settings.module.css';
const RADIO_NAME = 'media-hosting-provider';
const RELEASES_URL = 'https://github.com/bitsocialhq/5chan/releases/latest';
const RELEASES_URL = 'https://github.com/bitsocialnet/5chan/releases/latest';
const MediaHostingSettings = () => {
const { t } = useTranslation();
@@ -25,7 +25,7 @@ vi.mock('react-i18next', () => ({
}),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useAccount: () => accountState.value,
useSubscribe: ({ subplebbitAddress }: { subplebbitAddress: string }) =>
subscriptionMocks.byAddress.get(subplebbitAddress) ?? {
@@ -1,4 +1,4 @@
import { setAccount, useAccount, useSubscribe } from '@bitsocialhq/bitsocial-react-hooks';
import { setAccount, useAccount, useSubscribe } from '@bitsocialnet/bitsocial-react-hooks';
import getShortAddress from '../../../lib/get-short-address';
import styles from './subscriptions-setting.module.css';
import { useTranslation } from 'react-i18next';
@@ -12,11 +12,11 @@ const LicenseText = () => <span>5chan is free and open-source software under GPL
const VersionFeedbackContact = () => (
<>
<Version /> {' '}
<a href='https://github.com/bitsocialhq/5chan/issues/new' target='_blank' rel='noopener noreferrer'>
<a href='https://github.com/bitsocialnet/5chan/issues/new' target='_blank' rel='noopener noreferrer'>
Feedback
</a>{' '}
{' '}
<a href='https://github.com/bitsocialhq/5chan/graphs/contributors' target='_blank' rel='noopener noreferrer'>
<a href='https://github.com/bitsocialnet/5chan/graphs/contributors' target='_blank' rel='noopener noreferrer'>
Contact
</a>
</>
+1 -1
View File
@@ -10,7 +10,7 @@ const Version = () => {
return (
<>
<a
href={commitRef ? `https://github.com/bitsocialhq/5chan/commit/${commitRef}` : `https://github.com/bitsocialhq/5chan/releases/tag/v${version}`}
href={commitRef ? `https://github.com/bitsocialnet/5chan/commit/${commitRef}` : `https://github.com/bitsocialnet/5chan/releases/tag/v${version}`}
target='_blank'
rel='noopener noreferrer'
>
+1 -1
View File
@@ -1,6 +1,6 @@
{
"title": "/all/ - All 5chan Directories",
"description": "Each 5chan directory is assigned to a board handpicked by the team, until DAO curation is implemented.\n\nhttps://github.com/bitsocialhq/lists/blob/master/5chan-directories.json",
"description": "Each 5chan directory is assigned to a board handpicked by the team, until DAO curation is implemented.\n\nhttps://github.com/bitsocialnet/lists/blob/master/5chan-directories.json",
"createdAt": 1762179811,
"updatedAt": 1771140295,
"communities": [
+2 -2
View File
@@ -23,12 +23,12 @@ const testState = vi.hoisted(() => ({
subplebbitSnapshot: undefined as unknown,
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useAccount: () => testState.account,
useAccountSubplebbits: () => ({ accountSubplebbits: testState.accountSubplebbits }),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks/dist/lib/utils', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks/dist/lib/utils', () => ({
flattenCommentsPages: () => testState.flattenedReplies,
}));
@@ -18,7 +18,7 @@ const testState = vi.hoisted(() => ({
xhrResponses: new Map<string, { response?: ArrayBuffer; status: number; statusText: string }>(),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks/dist/lib/localforage-lru/index.js', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks/dist/lib/localforage-lru/index.js', () => ({
default: {
createInstance: () => ({
getItem: testState.cacheGetItemMock,
@@ -19,14 +19,14 @@ const testState = vi.hoisted(() => ({
},
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useFeed: (options: Record<string, unknown> | undefined) => {
testState.preloadOptions = options;
return { feed: testState.preloadFeed };
},
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks/dist/stores/feeds', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks/dist/stores/feeds', () => ({
default: (selector: (state: { feedsOptions: Record<string, unknown>; loadedFeeds: Record<string, unknown> }) => unknown) =>
selector({
feedsOptions: testState.feedsOptions,
@@ -16,7 +16,7 @@ const testState = vi.hoisted(() => ({
publishCommentMock: vi.fn(),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
usePublishComment: (options: Record<string, any>) => {
testState.lastPublishOptions = options;
return {
@@ -17,7 +17,7 @@ const testState = vi.hoisted(() => ({
publishCommentMock: vi.fn(),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
usePublishComment: (options: Record<string, any>) => {
testState.lastPublishOptions = options;
return {
@@ -19,7 +19,7 @@ const testState = vi.hoisted(() => ({
subplebbitsStates: {} as Record<string, { clientUrls: string[]; subplebbitAddresses: string[] }>,
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useClientsStates: () => ({
states: testState.clientsStates,
}),
@@ -1,5 +1,5 @@
import { useMemo } from 'react';
import { useAccountSubplebbits } from '@bitsocialhq/bitsocial-react-hooks';
import { useAccountSubplebbits } from '@bitsocialnet/bitsocial-react-hooks';
export const useAccountSubplebbitAddresses = (): string[] => {
const { accountSubplebbits } = useAccountSubplebbits({ onlyIfCached: true });
@@ -1,5 +1,5 @@
import { useMemo } from 'react';
import { useAccountSubplebbits } from '@bitsocialhq/bitsocial-react-hooks';
import { useAccountSubplebbits } from '@bitsocialnet/bitsocial-react-hooks';
import { DirectoryCommunity } from './use-directories';
export const useAccountSubplebbitsWithMetadata = (): DirectoryCommunity[] => {
+1 -1
View File
@@ -1,5 +1,5 @@
import { useMemo } from 'react';
import { useAccount } from '@bitsocialhq/bitsocial-react-hooks';
import { useAccount } from '@bitsocialnet/bitsocial-react-hooks';
import { useSubplebbitField } from './use-stable-subplebbit';
interface AuthorPrivilegesProps {
+1 -1
View File
@@ -1,5 +1,5 @@
import { useMemo } from 'react';
import { useAccountComments, Subplebbit } from '@bitsocialhq/bitsocial-react-hooks';
import { useAccountComments, Subplebbit } from '@bitsocialnet/bitsocial-react-hooks';
const useCatalogFeedRows = (columnCount: number, feed: any, isFeedLoaded: boolean, subplebbit: Subplebbit) => {
const { address } = subplebbit || {};
+2 -2
View File
@@ -1,6 +1,6 @@
import { useMemo } from 'react';
import { Comment } from '@bitsocialhq/bitsocial-react-hooks';
import { flattenCommentsPages } from '@bitsocialhq/bitsocial-react-hooks/dist/lib/utils';
import { Comment } from '@bitsocialnet/bitsocial-react-hooks';
import { flattenCommentsPages } from '@bitsocialnet/bitsocial-react-hooks/dist/lib/utils';
const useCountLinksInReplies = (comment: Comment, firstXReplies?: number) => {
let linkCount = 0;
+1 -1
View File
@@ -42,7 +42,7 @@ interface DirectoriesState {
error: Error | null;
}
const GITHUB_URL = 'https://raw.githubusercontent.com/bitsocialhq/lists/master/5chan-directories.json';
const GITHUB_URL = 'https://raw.githubusercontent.com/bitsocialnet/lists/master/5chan-directories.json';
const LOCALSTORAGE_KEY = '5chan-directories-cache';
const LOCALSTORAGE_TIMESTAMP_KEY = '5chan-directories-cache-timestamp';
const CACHE_MAX_AGE_MS = 60 * 60 * 1000; // 1 hour
+1 -1
View File
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react';
import localForageLru from '@bitsocialhq/bitsocial-react-hooks/dist/lib/localforage-lru/index.js';
import localForageLru from '@bitsocialnet/bitsocial-react-hooks/dist/lib/localforage-lru/index.js';
const gifFrameDb = localForageLru.createInstance({ name: '5chanGifFrames', size: 500 });
const failedUrls = new Set<string>();
+1 -1
View File
@@ -1,6 +1,6 @@
import { useCallback, useMemo } from 'react';
import { create } from 'zustand';
import localForageLru from '@bitsocialhq/bitsocial-react-hooks/dist/lib/localforage-lru/index.js';
import localForageLru from '@bitsocialnet/bitsocial-react-hooks/dist/lib/localforage-lru/index.js';
interface HideStoreState {
hiddenCids: { [key: string]: boolean };
+1 -1
View File
@@ -1,6 +1,6 @@
import { useTranslation } from 'react-i18next';
import { useEffect } from 'react';
import { Subplebbit } from '@bitsocialhq/bitsocial-react-hooks';
import { Subplebbit } from '@bitsocialnet/bitsocial-react-hooks';
import { getFormattedTimeAgo } from '../lib/utils/time-utils';
import useSubplebbitOfflineStore from '../stores/use-subplebbit-offline-store';
import useSubplebbitsLoadingStartTimestamps from '../stores/use-subplebbits-loading-start-timestamps-store';
+1 -1
View File
@@ -1,5 +1,5 @@
import { useMemo, useRef } from 'react';
import { Comment, Subplebbit } from '@bitsocialhq/bitsocial-react-hooks';
import { Comment, Subplebbit } from '@bitsocialnet/bitsocial-react-hooks';
import { getCommentMediaInfo, getHasThumbnail } from '../lib/utils/media-utils';
import useSubplebbitsLoadingStartTimestamps from '../stores/use-subplebbits-loading-start-timestamps-store';
import { useCurrentTime } from './use-current-time';
+2 -2
View File
@@ -1,6 +1,6 @@
import { useMemo } from 'react';
import { useFeed } from '@bitsocialhq/bitsocial-react-hooks';
import useFeedsStore from '@bitsocialhq/bitsocial-react-hooks/dist/stores/feeds';
import { useFeed } from '@bitsocialnet/bitsocial-react-hooks';
import useFeedsStore from '@bitsocialnet/bitsocial-react-hooks/dist/stores/feeds';
import { useDirectoryByAddress } from './use-directories';
import { useBoardFeedPageSize } from './use-board-feed-page-size';
import { findPostPageInFeed, findPostPageInLoadedBoardFeeds, type FeedsOptionsLike, type LoadedFeedsLike } from '../lib/utils/post-page-resolution';
+1 -1
View File
@@ -1,5 +1,5 @@
import { useCallback, useMemo, useRef } from 'react';
import { Comment, usePublishComment } from '@bitsocialhq/bitsocial-react-hooks';
import { Comment, usePublishComment } from '@bitsocialnet/bitsocial-react-hooks';
import usePublishPostStore from '../stores/use-publish-post-store';
import useChallengesStore from '../stores/use-challenges-store';
+1 -1
View File
@@ -1,5 +1,5 @@
import { useCallback, useMemo, useRef } from 'react';
import { Comment, usePublishComment } from '@bitsocialhq/bitsocial-react-hooks';
import { Comment, usePublishComment } from '@bitsocialnet/bitsocial-react-hooks';
import usePublishReplyStore from '../stores/use-publish-reply-store';
import usePostNumberStore from '../stores/use-post-number-store';
import { getQuotedCidsFromContent, mergeQuotedCids } from '../lib/utils/reply-quote-utils';
+1 -1
View File
@@ -1,5 +1,5 @@
import { useCallback, useMemo, useRef } from 'react';
import { Comment } from '@bitsocialhq/bitsocial-react-hooks';
import { Comment } from '@bitsocialnet/bitsocial-react-hooks';
import { QUOTE_NUMBER_REGEX } from '../lib/utils/url-utils';
import usePostNumberStore from '../stores/use-post-number-store';
+1 -1
View File
@@ -1,4 +1,4 @@
import useSubplebbitsStore from '@bitsocialhq/bitsocial-react-hooks/dist/stores/subplebbits';
import useSubplebbitsStore from '@bitsocialnet/bitsocial-react-hooks/dist/stores/subplebbits';
/**
* Shallow compare two objects by keys and values.
+1 -1
View File
@@ -1,5 +1,5 @@
import { useMemo } from 'react';
import { useClientsStates, useSubplebbit, useSubplebbitsStates } from '@bitsocialhq/bitsocial-react-hooks';
import { useClientsStates, useSubplebbit, useSubplebbitsStates } from '@bitsocialnet/bitsocial-react-hooks';
import debounce from 'lodash/debounce';
interface CommentOrSubplebbit {
+1 -1
View File
@@ -1,5 +1,5 @@
import { useEffect } from 'react';
import { useSubplebbitStats } from '@bitsocialhq/bitsocial-react-hooks';
import { useSubplebbitStats } from '@bitsocialnet/bitsocial-react-hooks';
import { create } from 'zustand';
type SubplebbitsStatsState = {
+1 -1
View File
@@ -4,7 +4,7 @@ import { isAllView, isSubscriptionsView, isModView } from '../lib/utils/view-uti
import useThemeStore from '../stores/use-theme-store';
import { useDirectories } from './use-directories';
import { useResolvedSubplebbitAddress } from './use-resolved-subplebbit-address';
import { useAccountComment } from '@bitsocialhq/bitsocial-react-hooks';
import { useAccountComment } from '@bitsocialnet/bitsocial-react-hooks';
import useSpecialThemeStore from '../stores/use-special-theme-store';
import { isChristmas } from '../lib/utils/time-utils';
import { updateFavicon, isSfwBoard } from '../lib/update-favicon';
+1 -1
View File
@@ -11,7 +11,7 @@ const testState = vi.hoisted(() => ({
localForageSetItemMock: vi.fn(),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks/dist/lib/localforage-lru/index.js', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks/dist/lib/localforage-lru/index.js', () => ({
default: {
createInstance: () => ({
getItem: (url: string) => testState.localForageGetItemMock(url),
@@ -5,7 +5,7 @@ const testState = vi.hoisted(() => ({
subplebbits: {} as Record<string, { roles?: Record<string, { role?: string }> }>,
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks/dist/stores/subplebbits', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks/dist/stores/subplebbits', () => ({
default: {
getState: () => ({
subplebbits: testState.subplebbits,
+1 -1
View File
@@ -1,4 +1,4 @@
import { ChallengeVerification } from '@bitsocialhq/bitsocial-react-hooks';
import { ChallengeVerification } from '@bitsocialnet/bitsocial-react-hooks';
import directoriesData from '../../data/5chan-directories.json';
import { getBoardPath } from './route-utils';
+1 -1
View File
@@ -1,4 +1,4 @@
import localForageLru from '@bitsocialhq/bitsocial-react-hooks/dist/lib/localforage-lru/index.js';
import localForageLru from '@bitsocialnet/bitsocial-react-hooks/dist/lib/localforage-lru/index.js';
import { canEmbed } from '../../components/embed';
import memoize from 'memoizee';
import { isValidURL } from './url-utils';
+2 -2
View File
@@ -1,5 +1,5 @@
import type { Comment } from '@bitsocialhq/bitsocial-react-hooks';
import useSubplebbitsStore from '@bitsocialhq/bitsocial-react-hooks/dist/stores/subplebbits';
import type { Comment } from '@bitsocialnet/bitsocial-react-hooks';
import useSubplebbitsStore from '@bitsocialnet/bitsocial-react-hooks/dist/stores/subplebbits';
/**
* Checks if a text matches a pattern according to various pattern matching rules:
+1 -1
View File
@@ -1,4 +1,4 @@
import type { Comment } from '@bitsocialhq/bitsocial-react-hooks';
import type { Comment } from '@bitsocialnet/bitsocial-react-hooks';
export type PostMenuProps = {
cid?: string;
+1 -1
View File
@@ -1,4 +1,4 @@
import type { Comment } from '@bitsocialhq/bitsocial-react-hooks';
import type { Comment } from '@bitsocialnet/bitsocial-react-hooks';
type QuoteTargetAvailability = 'available' | 'unresolved' | 'unavailable';
+1 -1
View File
@@ -5,7 +5,7 @@ const testState = vi.hoisted(() => ({
setItemMock: vi.fn(async () => undefined),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks/dist/lib/localforage-lru/index.js', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks/dist/lib/localforage-lru/index.js', () => ({
default: {
createInstance: () => ({
entries: testState.entriesMock,
+1 -1
View File
@@ -1,6 +1,6 @@
import { create } from 'zustand';
import { persist } from 'zustand/middleware';
import type { Comment } from '@bitsocialhq/bitsocial-react-hooks';
import type { Comment } from '@bitsocialnet/bitsocial-react-hooks';
import { commentMatchesPattern } from '../lib/utils/pattern-utils';
interface FilterItem {
+1 -1
View File
@@ -1,5 +1,5 @@
import { create } from 'zustand';
import { Challenge } from '@bitsocialhq/bitsocial-react-hooks';
import { Challenge } from '@bitsocialnet/bitsocial-react-hooks';
let nextChallengeId = 0;
+1 -1
View File
@@ -1,5 +1,5 @@
import { create } from 'zustand';
import type { Comment } from '@bitsocialhq/bitsocial-react-hooks';
import type { Comment } from '@bitsocialnet/bitsocial-react-hooks';
interface PostNumberState {
// Post numbers are only unique within a subplebbit, so scope by address
+1 -1
View File
@@ -1,4 +1,4 @@
import { ChallengeVerification, Comment, PublishCommentOptions } from '@bitsocialhq/bitsocial-react-hooks';
import { ChallengeVerification, Comment, PublishCommentOptions } from '@bitsocialnet/bitsocial-react-hooks';
import { create } from 'zustand';
import { alertChallengeVerificationFailed } from '../lib/utils/challenge-utils';
+1 -1
View File
@@ -1,4 +1,4 @@
import { ChallengeVerification, Comment, PublishCommentOptions } from '@bitsocialhq/bitsocial-react-hooks';
import { ChallengeVerification, Comment, PublishCommentOptions } from '@bitsocialnet/bitsocial-react-hooks';
import { create } from 'zustand';
import { alertChallengeVerificationFailed } from '../lib/utils/challenge-utils';
+1 -1
View File
@@ -1,5 +1,5 @@
import { create, StoreApi } from 'zustand';
import localForageLru from '@bitsocialhq/bitsocial-react-hooks/dist/lib/localforage-lru/index.js';
import localForageLru from '@bitsocialnet/bitsocial-react-hooks/dist/lib/localforage-lru/index.js';
interface ThemeState {
themes: {
@@ -51,7 +51,7 @@ vi.mock('../../../lib/utils/account-editor-utils', () => ({
safeParseAccountJson: (text: string) => testState.safeParseAccountJsonMock(text),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
setAccount: (payload: Record<string, unknown>) => testState.setAccountMock(payload),
useAccount: () => testState.account,
}));
@@ -1,7 +1,7 @@
import { useState, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { useLocation, useNavigate } from 'react-router-dom';
import { setAccount, useAccount } from '@bitsocialhq/bitsocial-react-hooks';
import { setAccount, useAccount } from '@bitsocialnet/bitsocial-react-hooks';
import { buildEditableAccountJson, safeParseAccountJson, buildSavePayload } from '../../lib/utils/account-editor-utils';
import styles from './account-data-editor.module.css';
+1 -1
View File
@@ -63,7 +63,7 @@ vi.mock('react-i18next', () => ({
}),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useAccount: () => testState.account,
useAccountComments: () => ({ accountComments: testState.accountComments }),
useFeed: () => ({
+1 -1
View File
@@ -1,6 +1,6 @@
import { useCallback, useEffect, useMemo, useRef } from 'react';
import { Link, useLocation, useNavigate, useNavigationType, useParams } from 'react-router-dom';
import { Comment, useAccount, useAccountComments, useFeed, useSubplebbit } from '@bitsocialhq/bitsocial-react-hooks';
import { Comment, useAccount, useAccountComments, useFeed, useSubplebbit } from '@bitsocialnet/bitsocial-react-hooks';
import { useSubplebbitField } from '../../hooks/use-stable-subplebbit';
import { Virtuoso, VirtuosoHandle, StateSnapshot } from 'react-virtuoso';
import { useTranslation } from 'react-i18next';
+1 -1
View File
@@ -92,7 +92,7 @@ vi.mock('react-i18next', () => ({
}),
}));
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useAccount: () => testState.account,
useAccountComments: () => ({ accountComments: testState.accountComments }),
useFeed: (options: { filter?: { filter: (comment: TestComment) => boolean } }) => ({
+1 -1
View File
@@ -1,7 +1,7 @@
import { useEffect, useMemo, useRef, useState, useCallback } from 'react';
import { useLocation, useNavigate, useNavigationType, useParams } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import { Comment, useAccount, useFeed, useSubplebbit, useAccountComments } from '@bitsocialhq/bitsocial-react-hooks';
import { Comment, useAccount, useFeed, useSubplebbit, useAccountComments } from '@bitsocialnet/bitsocial-react-hooks';
import { Virtuoso, VirtuosoHandle, StateSnapshot } from 'react-virtuoso';
import useCatalogFeedRows from '../../hooks/use-catalog-feed-rows';
import { useDirectories, useDirectoryByAddress } from '../../hooks/use-directories';
+2 -2
View File
@@ -100,7 +100,7 @@ const FAQ = () => {
<dd>
No. 5chan is a client app for the Bitsocial protocol. This website is just one place to open it the domain could change, disappear, or be blocked
without affecting the Bitsocial network or any boards. We recommend installing the app when your browser offers it, so you keep a local copy that works
independently. You can also <a href='https://github.com/bitsocialhq/5chan/releases/latest'>download the app</a> from GitHub. If you know a board's
independently. You can also <a href='https://github.com/bitsocialnet/5chan/releases/latest'>download the app</a> from GitHub. If you know a board's
address, you can connect from any host or installed copy.
</dd>
<dt id='howaccess'>How do I access the boards?</dt>
@@ -145,7 +145,7 @@ const FAQ = () => {
</dd>
<dt id='uploadimage'>Can I upload an image?</dt>
<dd>
Yes, but only in the Android app, which you can download on <a href='https://github.com/bitsocialhq/5chan/releases/latest'>GitHub</a>. The app is able
Yes, but only in the Android app, which you can download on <a href='https://github.com/bitsocialnet/5chan/releases/latest'>GitHub</a>. The app is able
to automatically upload media to image hosting services, like Imgur or catbox.moe, sharing your IP address with the image hosting service. This is not
possible in the browser, which can't make backend requests.
<br />
+1 -1
View File
@@ -32,7 +32,7 @@ vi.mock('react-router-dom', async () => {
};
});
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useSubplebbits: () => ({ subplebbits: testState.subplebbits }),
}));
+4 -4
View File
@@ -1,7 +1,7 @@
import { useEffect, useMemo, useRef, FormEvent } from 'react';
import { Link, useNavigate } from 'react-router-dom';
import { Trans, useTranslation } from 'react-i18next';
import { useSubplebbits } from '@bitsocialhq/bitsocial-react-hooks';
import { useSubplebbits } from '@bitsocialnet/bitsocial-react-hooks';
import styles from './home.module.css';
import { useDirectories, useDirectoryAddresses } from '../../hooks/use-directories';
import { SubplebbitStatsCollector, useSubplebbitsStatsStore } from '../../hooks/use-subplebbits-stats';
@@ -14,7 +14,7 @@ import DirectoryModal from '../../components/directory-modal';
import { getBoardPath } from '../../lib/utils/route-utils';
import lowerCase from 'lodash/lowerCase';
// https://github.com/bitsocialhq/lists/blob/master/5chan-directories.json
// https://github.com/bitsocialnet/lists/blob/master/5chan-directories.json
const SearchBar = () => {
const searchInputRef = useRef<HTMLInputElement>(null);
@@ -71,7 +71,7 @@ const InfoBox = () => {
i18nKey='no_global_rules_info'
shouldUnescape={true}
components={{
1: <a key='releases-link' href='https://github.com/bitsocialhq/5chan/releases/latest' target='_blank' rel='noopener noreferrer' />,
1: <a key='releases-link' href='https://github.com/bitsocialnet/5chan/releases/latest' target='_blank' rel='noopener noreferrer' />,
}}
/>
</div>
@@ -158,7 +158,7 @@ export const Footer = () => {
</a>
</li>
<li>
<a href='https://github.com/bitsocialhq/5chan' target='_blank' rel='noopener noreferrer'>
<a href='https://github.com/bitsocialnet/5chan' target='_blank' rel='noopener noreferrer'>
Source Code
</a>
</li>
@@ -1,7 +1,7 @@
import { memo, useMemo } from 'react';
import { Link } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import { Comment, Subplebbit } from '@bitsocialhq/bitsocial-react-hooks';
import { Comment, Subplebbit } from '@bitsocialnet/bitsocial-react-hooks';
import styles from '../home.module.css';
import usePopularPosts from '../../../hooks/use-popular-posts';
import { useFeedStateString } from '../../../hooks/use-state-string';
+1 -1
View File
@@ -1,7 +1,7 @@
import React, { useMemo, useState, useEffect, useCallback, memo } from 'react';
import { useTranslation } from 'react-i18next';
import { useParams, Link } from 'react-router-dom';
import { useFeed, Comment, usePublishCommentModeration, useEditedComment, useSubplebbit } from '@bitsocialhq/bitsocial-react-hooks';
import { useFeed, Comment, usePublishCommentModeration, useEditedComment, useSubplebbit } from '@bitsocialnet/bitsocial-react-hooks';
import { Virtuoso } from 'react-virtuoso';
import styles from './mod-queue.module.css';
import useModQueueStore from '../../stores/use-mod-queue-store';
@@ -32,7 +32,7 @@ vi.mock('react-router-dom', async () => {
};
});
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useAccountComment: () => testState.post,
useAccountComments: () => ({
accountComments: testState.accountComments,
+1 -1
View File
@@ -1,6 +1,6 @@
import { useEffect } from 'react';
import { useNavigate, useParams } from 'react-router-dom';
import { useAccountComment, useAccountComments } from '@bitsocialhq/bitsocial-react-hooks';
import { useAccountComment, useAccountComments } from '@bitsocialnet/bitsocial-react-hooks';
import { useDirectories } from '../../hooks/use-directories';
import { getBoardPath } from '../../lib/utils/route-utils';
import { Post } from '../post';

Some files were not shown because too many files have changed in this diff Show More