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,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'
>