refactor(mod queue): rename routes from /queue to /modqueue

This commit is contained in:
plebeius
2026-02-09 17:42:23 +08:00
parent 1704686a6f
commit 41b7fee439
4 changed files with 11 additions and 11 deletions
+4 -4
View File
@@ -170,16 +170,16 @@ const App = () => (
<Route path='/mod/catalog/:timeFilterName?' element={null} /> <Route path='/mod/catalog/:timeFilterName?' element={null} />
<Route path='/mod/catalog/:timeFilterName?/settings' element={null} /> <Route path='/mod/catalog/:timeFilterName?/settings' element={null} />
<Route path='/mod/queue' element={<ModQueueView />} /> <Route path='/mod/modqueue' element={<ModQueueView />} />
<Route path='/mod/queue/settings' element={<ModQueueView />} /> <Route path='/mod/modqueue/settings' element={<ModQueueView />} />
<Route path='/:boardIdentifier' element={null} /> <Route path='/:boardIdentifier' element={null} />
<Route path='/:boardIdentifier/settings' element={null} /> <Route path='/:boardIdentifier/settings' element={null} />
<Route path='/:boardIdentifier/catalog' element={null} /> <Route path='/:boardIdentifier/catalog' element={null} />
<Route path='/:boardIdentifier/catalog/settings' element={null} /> <Route path='/:boardIdentifier/catalog/settings' element={null} />
<Route path='/:boardIdentifier/queue' element={<ModQueueView />} /> <Route path='/:boardIdentifier/modqueue' element={<ModQueueView />} />
<Route path='/:boardIdentifier/queue/settings' element={<ModQueueView />} /> <Route path='/:boardIdentifier/modqueue/settings' element={<ModQueueView />} />
<Route path='/:boardIdentifier/thread/:commentCid' element={<Post />} /> <Route path='/:boardIdentifier/thread/:commentCid' element={<Post />} />
<Route path='/:boardIdentifier/thread/:commentCid/settings' element={<Post />} /> <Route path='/:boardIdentifier/thread/:commentCid/settings' element={<Post />} />
+3 -3
View File
@@ -106,7 +106,7 @@ export const isFeedRoute = (pathname: string): boolean => {
if (normalizedPath.includes('/thread/')) return false; if (normalizedPath.includes('/thread/')) return false;
if (normalizedPath.startsWith('/pending/')) return false; if (normalizedPath.startsWith('/pending/')) return false;
if (normalizedPath.includes('/queue')) return false; if (normalizedPath.includes('/modqueue')) return false;
const pathWithoutSettings = normalizedPath.replace(/\/settings$/, ''); const pathWithoutSettings = normalizedPath.replace(/\/settings$/, '');
@@ -140,7 +140,7 @@ export const isPendingPostRoute = (pathname: string): boolean => {
export const isModQueueRoute = (pathname: string): boolean => { export const isModQueueRoute = (pathname: string): boolean => {
const normalizedPath = pathname.replace(/\/settings$/, ''); const normalizedPath = pathname.replace(/\/settings$/, '');
return normalizedPath.includes('/queue'); return normalizedPath.includes('/modqueue');
}; };
export const getFeedCacheKey = (pathname: string): string | null => { export const getFeedCacheKey = (pathname: string): string | null => {
@@ -156,7 +156,7 @@ export const getFeedCacheKey = (pathname: string): string | null => {
return null; return null;
} }
if (normalizedPath.includes('/queue')) { if (normalizedPath.includes('/modqueue')) {
return null; return null;
} }
+1 -1
View File
@@ -60,7 +60,7 @@ export const isModView = (pathname: string): boolean => {
}; };
export const isModQueueView = (pathname: string): boolean => { export const isModQueueView = (pathname: string): boolean => {
return pathname.includes('/queue'); return pathname.includes('/modqueue');
}; };
export const isPendingPostView = (pathname: string, params: ParamsType): boolean => { export const isPendingPostView = (pathname: string, params: ParamsType): boolean => {
+3 -3
View File
@@ -547,7 +547,7 @@ const ModQueueButtonContent = ({ feed, alertThresholdSeconds, boardIdentifier, i
}, [statusMap]); }, [statusMap]);
const totalCount = normalCount + urgentCount; const totalCount = normalCount + urgentCount;
const to = boardIdentifier ? `/${boardIdentifier}/queue` : '/mod/queue'; const to = boardIdentifier ? `/${boardIdentifier}/modqueue` : '/mod/modqueue';
const buttonContent = ( const buttonContent = (
<button className='button'> <button className='button'>
@@ -678,7 +678,7 @@ export const ModQueueView = ({ boardIdentifier: propBoardIdentifier }: ModQueueV
return [resolvedAddress]; return [resolvedAddress];
} }
// Always require a board filter when viewing /mod/queue (no boardIdentifier) // Always require a board filter when viewing /mod/modqueue (no boardIdentifier)
if (selectedBoardFilter) { if (selectedBoardFilter) {
return [selectedBoardFilter]; return [selectedBoardFilter];
} }
@@ -708,7 +708,7 @@ export const ModQueueView = ({ boardIdentifier: propBoardIdentifier }: ModQueueV
setResetFunction(reset); setResetFunction(reset);
}, [reset, setResetFunction]); }, [reset, setResetFunction]);
// Auto-select first board if viewing /mod/queue without a boardIdentifier and no filter is set // Auto-select first board if viewing /mod/modqueue without a boardIdentifier and no filter is set
useEffect(() => { useEffect(() => {
if (!resolvedAddress && !selectedBoardFilter && accountSubplebbitAddresses.length > 0) { if (!resolvedAddress && !selectedBoardFilter && accountSubplebbitAddresses.length > 0) {
const { setSelectedBoardFilter } = useModQueueStore.getState(); const { setSelectedBoardFilter } = useModQueueStore.getState();