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
+19
View File
@@ -14,6 +14,8 @@ interface ReplyModalState {
quoteInsertSelectedText: string | null;
closeModal: () => void;
openReplyModal: (parentCid: string, parentNumber: number | undefined, postCid: string, threadNumber: number | undefined, subplebbitAddress: string) => void;
/** Open reply modal with empty textarea, no prefilled quote. Use for "Post a Reply" footer button. */
openReplyModalEmpty: (postCid: string, threadNumber: number | undefined, subplebbitAddress: string) => void;
}
const getQuotedSelection = () => {
@@ -87,6 +89,23 @@ const useReplyModalStore = create<ReplyModalState>((set, get) => ({
scrollY,
});
},
openReplyModalEmpty: (postCid, threadNumber, subplebbitAddress) => {
useSelectedTextStore.getState().resetSelectedText();
const isMobile = window.innerWidth <= 768;
const scrollY = isMobile ? window.scrollY : 0;
set({
activeCid: postCid,
parentNumber: null,
threadNumber: threadNumber ?? null,
threadCid: postCid,
showReplyModal: true,
subplebbitAddress,
scrollY,
quoteInsertNumber: null,
quoteInsertSelectedText: null,
});
},
}));
export default useReplyModalStore;