refactor(ui): rename topbar to boardsbar and add desktop footer for board, thread, and catalog

This commit is contained in:
plebeius
2026-02-23 16:47:51 +08:00
parent a7721fc252
commit 4433834c1c
39 changed files with 672 additions and 294 deletions
+17 -5
View File
@@ -32,7 +32,7 @@ interface BoardButtonsProps {
isTopbar?: boolean;
}
const CatalogButton = ({ address, isInAllView, isInSubscriptionsView, isInModView }: BoardButtonsProps) => {
export const CatalogButton = ({ address, isInAllView, isInSubscriptionsView, isInModView }: BoardButtonsProps) => {
const { t } = useTranslation();
const params = useParams();
const directories = useDirectories();
@@ -68,7 +68,7 @@ const SubscribeButton = ({ address }: BoardButtonsProps) => {
);
};
const ReturnButton = ({ address, isInAllView, isInSubscriptionsView, isInModView, isInModQueueView }: BoardButtonsProps) => {
export const ReturnButton = ({ address, isInAllView, isInSubscriptionsView, isInModView, isInModQueueView }: BoardButtonsProps) => {
const { t } = useTranslation();
const params = useParams();
const directories = useDirectories();
@@ -133,7 +133,7 @@ const RefreshButton = () => {
);
};
const UpdateButton = () => {
export const UpdateButton = () => {
const { t } = useTranslation();
const reset = useFeedResetStore((state) => state.reset);
return (
@@ -143,7 +143,7 @@ const UpdateButton = () => {
);
};
const AutoButton = () => {
export const AutoButton = () => {
const { t } = useTranslation();
const isMobile = useIsMobile();
const handleAutoClick = () => {
@@ -181,6 +181,18 @@ const BottomButton = () => {
);
};
export const TopButton = () => {
const { t } = useTranslation();
const handleClick = () => {
window.scrollTo({ top: 0, left: 0, behavior: 'instant' });
};
return (
<button className='button' onClick={handleClick}>
{t('top')}
</button>
);
};
const SortOptions = () => {
const { t } = useTranslation();
const { sortType, setSortType } = useSortingStore();
@@ -442,7 +454,7 @@ export const MobileBoardButtons = () => {
);
};
const PostPageStats = () => {
export const PostPageStats = () => {
const { t } = useTranslation();
const params = useParams();
+1 -1
View File
@@ -1 +1 @@
export { MobileBoardButtons, DesktopBoardButtons } from './board-buttons';
export { MobileBoardButtons, DesktopBoardButtons, PostPageStats, ReturnButton, CatalogButton, UpdateButton, AutoButton, TopButton } from './board-buttons';