mirror of
https://github.com/docmost/docmost.git
synced 2025-11-21 09:31:08 +10:00
updates and fixes
* seo friendly urls * custom client serve-static module * database fixes * fix recent pages * other fixes
This commit is contained in:
@ -18,9 +18,12 @@ import {
|
||||
import { modals } from "@mantine/modals";
|
||||
import { notifications } from "@mantine/notifications";
|
||||
|
||||
function HistoryList() {
|
||||
interface Props {
|
||||
pageId: string;
|
||||
}
|
||||
|
||||
function HistoryList({ pageId }: Props) {
|
||||
const [activeHistoryId, setActiveHistoryId] = useAtom(activeHistoryIdAtom);
|
||||
const { pageId } = useParams();
|
||||
const {
|
||||
data: pageHistoryList,
|
||||
isLoading,
|
||||
|
||||
@ -1,18 +1,22 @@
|
||||
import { ScrollArea } from '@mantine/core';
|
||||
import HistoryList from '@/features/page-history/components/history-list';
|
||||
import classes from './history.module.css';
|
||||
import { useAtom } from 'jotai';
|
||||
import { activeHistoryIdAtom } from '@/features/page-history/atoms/history-atoms';
|
||||
import HistoryView from '@/features/page-history/components/history-view';
|
||||
import { ScrollArea } from "@mantine/core";
|
||||
import HistoryList from "@/features/page-history/components/history-list";
|
||||
import classes from "./history.module.css";
|
||||
import { useAtom } from "jotai";
|
||||
import { activeHistoryIdAtom } from "@/features/page-history/atoms/history-atoms";
|
||||
import HistoryView from "@/features/page-history/components/history-view";
|
||||
|
||||
export default function HistoryModalBody() {
|
||||
interface Props {
|
||||
pageId: string;
|
||||
}
|
||||
|
||||
export default function HistoryModalBody({ pageId }: Props) {
|
||||
const [activeHistoryId] = useAtom(activeHistoryIdAtom);
|
||||
|
||||
return (
|
||||
<div className={classes.sidebarFlex}>
|
||||
<nav className={classes.sidebar}>
|
||||
<div className={classes.sidebarMain}>
|
||||
<HistoryList />
|
||||
<HistoryList pageId={pageId} />
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@ -21,7 +25,6 @@ export default function HistoryModalBody() {
|
||||
{activeHistoryId && <HistoryView historyId={activeHistoryId} />}
|
||||
</div>
|
||||
</ScrollArea>
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@ -1,24 +1,33 @@
|
||||
import { Modal, Text } from '@mantine/core';
|
||||
import { useAtom } from 'jotai';
|
||||
import { historyAtoms } from '@/features/page-history/atoms/history-atoms';
|
||||
import HistoryModalBody from '@/features/page-history/components/history-modal-body';
|
||||
import { Modal, Text } from "@mantine/core";
|
||||
import { useAtom } from "jotai";
|
||||
import { historyAtoms } from "@/features/page-history/atoms/history-atoms";
|
||||
import HistoryModalBody from "@/features/page-history/components/history-modal-body";
|
||||
|
||||
export default function HistoryModal() {
|
||||
interface Props {
|
||||
pageId: string;
|
||||
}
|
||||
export default function HistoryModal({ pageId }: Props) {
|
||||
const [isModalOpen, setModalOpen] = useAtom(historyAtoms);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Modal.Root size={1200} opened={isModalOpen} onClose={() => setModalOpen(false)}>
|
||||
<Modal.Root
|
||||
size={1200}
|
||||
opened={isModalOpen}
|
||||
onClose={() => setModalOpen(false)}
|
||||
>
|
||||
<Modal.Overlay />
|
||||
<Modal.Content style={{ overflow: 'hidden' }}>
|
||||
<Modal.Content style={{ overflow: "hidden" }}>
|
||||
<Modal.Header>
|
||||
<Modal.Title>
|
||||
<Text size="md" fw={500}>Page history</Text>
|
||||
<Text size="md" fw={500}>
|
||||
Page history
|
||||
</Text>
|
||||
</Modal.Title>
|
||||
<Modal.CloseButton />
|
||||
</Modal.Header>
|
||||
<Modal.Body>
|
||||
<HistoryModalBody />
|
||||
<HistoryModalBody pageId={pageId} />
|
||||
</Modal.Body>
|
||||
</Modal.Content>
|
||||
</Modal.Root>
|
||||
|
||||
Reference in New Issue
Block a user