mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
refactor(ui): rename topbar to boardsbar and add desktop footer for board, thread, and catalog
This commit is contained in:
@@ -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 @@
|
||||
export { MobileBoardButtons, DesktopBoardButtons } from './board-buttons';
|
||||
export { MobileBoardButtons, DesktopBoardButtons, PostPageStats, ReturnButton, CatalogButton, UpdateButton, AutoButton, TopButton } from './board-buttons';
|
||||
|
||||
Reference in New Issue
Block a user