fix: resolve PR 877 issues - route params, artifact paths, and build configs

Fix route parameter name in use-initial-theme hook (communityAddress -> boardIdentifier), correct release workflow artifact paths (dist -> out/make), add BUILD_ARCH env var for Linux arm64 builds, fix macOS app name dev check, and update capacitor webDir to match vite output.
This commit is contained in:
plebeius
2026-01-30 14:33:45 +08:00
parent d4f16c707f
commit 50ee10cbc9
4 changed files with 23 additions and 20 deletions
+7 -4
View File
@@ -3,11 +3,12 @@ import { useLocation, useParams } from 'react-router-dom';
import useThemeStore from '../stores/use-theme-store';
import { useDirectories } from './use-directories';
import { isAllView, isHomeView, isNotFoundView, isPendingPostView, isSubscriptionsView, isModView } from '../lib/utils/view-utils';
import { getSubplebbitAddress } from '../lib/utils/route-utils';
import { useAccountComment } from '@plebbit/plebbit-react-hooks';
const useInitialTheme = (pendingPostSubplebbitAddress?: string) => {
const location = useLocation();
const { communityAddress: paramsSubplebbitAddress, accountCommentIndex } = useParams<{ communityAddress: string; accountCommentIndex?: string }>();
const { boardIdentifier, accountCommentIndex } = useParams<{ boardIdentifier: string; accountCommentIndex?: string }>();
const commentIndex = accountCommentIndex ? parseInt(accountCommentIndex) : undefined;
const pendingPost = useAccountComment({ commentIndex });
// Subscribe to the actual themes data, not just functions
@@ -21,13 +22,15 @@ const useInitialTheme = (pendingPostSubplebbitAddress?: string) => {
const isInModView = isModView(location.pathname);
const isInPendingPostView = isPendingPostView(location.pathname, params);
const paramsSubplebbitAddress = boardIdentifier ? getSubplebbitAddress(boardIdentifier, directories) : undefined;
const initialTheme = useMemo(() => {
let theme = 'yotsuba';
if (isInPendingPostView) {
const communityAddress = pendingPostSubplebbitAddress || pendingPost?.communityAddress;
if (communityAddress) {
const community = directories.find((s) => s.address === communityAddress);
const subplebbitAddress = pendingPostSubplebbitAddress || pendingPost?.subplebbitAddress;
if (subplebbitAddress) {
const community = directories.find((s) => s.address === subplebbitAddress);
if (community?.nsfw) {
theme = themes.nsfw || 'yotsuba';
} else {