diff --git a/Parlance/ClientApp/src/components/PageHeading.module.css b/Parlance/ClientApp/src/components/PageHeading.module.css index deed3954..9a1fcfa3 100644 --- a/Parlance/ClientApp/src/components/PageHeading.module.css +++ b/Parlance/ClientApp/src/components/PageHeading.module.css @@ -13,4 +13,11 @@ font-weight: bold; text-transform: uppercase; margin: 0; +} + +.level4 { + font-size: 8pt; + font-weight: normal; + text-transform: uppercase; + margin: 0; } \ No newline at end of file diff --git a/Parlance/ClientApp/src/components/PageHeading.tsx b/Parlance/ClientApp/src/components/PageHeading.tsx index 7c700a7f..e71733bb 100644 --- a/Parlance/ClientApp/src/components/PageHeading.tsx +++ b/Parlance/ClientApp/src/components/PageHeading.tsx @@ -2,7 +2,7 @@ import Styles from "./PageHeading.module.css"; import {ReactElement, ReactNode} from "react"; interface PageHeadingProps { - level?: 1 | 2 | 3; + level?: 1 | 2 | 3 | 4; children: ReactNode; className?: string; } @@ -13,6 +13,8 @@ export default function PageHeading(props: PageHeadingProps): ReactElement { return

{props.children}

case 3: return

{props.children}

+ case 4: + return

{props.children}

default: return

{props.children}

} diff --git a/Parlance/ClientApp/src/pages/Projects/Subprojects/Languages/Translation/CommentsDashboard.tsx b/Parlance/ClientApp/src/pages/Projects/Subprojects/Languages/Translation/CommentsDashboard.tsx index 0abf41c5..35c360f3 100644 --- a/Parlance/ClientApp/src/pages/Projects/Subprojects/Languages/Translation/CommentsDashboard.tsx +++ b/Parlance/ClientApp/src/pages/Projects/Subprojects/Languages/Translation/CommentsDashboard.tsx @@ -28,7 +28,7 @@ export function CommentsDashboard() { }, []); const openThread = (thread: Thread) => { - Modal.mount() + Modal.mount() } return
diff --git a/Parlance/ClientApp/src/pages/Projects/Subprojects/Languages/Translation/TranslationEditor/Comments/CommentsModal.tsx b/Parlance/ClientApp/src/pages/Projects/Subprojects/Languages/Translation/TranslationEditor/Comments/CommentsModal.tsx index 6f56389e..22eeed17 100644 --- a/Parlance/ClientApp/src/pages/Projects/Subprojects/Languages/Translation/TranslationEditor/Comments/CommentsModal.tsx +++ b/Parlance/ClientApp/src/pages/Projects/Subprojects/Languages/Translation/TranslationEditor/Comments/CommentsModal.tsx @@ -53,11 +53,12 @@ export function CommentsModal({project, subproject, language, tkey, threads, onU } -export function CommentsThreadModal({thread, onUpdateThreads}: { +export function CommentsThreadModal({thread, onUpdateThreads, showHeader}: { thread: Thread - onUpdateThreads: () => void + onUpdateThreads: () => void, + showHeader?: boolean }) { return Modal.unmount()}> - {}} onReloadThreads={onUpdateThreads} /> + {}} onReloadThreads={onUpdateThreads} showHeader={showHeader} /> } \ No newline at end of file diff --git a/Parlance/ClientApp/src/pages/Projects/Subprojects/Languages/Translation/TranslationEditor/Comments/ThreadView.module.css b/Parlance/ClientApp/src/pages/Projects/Subprojects/Languages/Translation/TranslationEditor/Comments/ThreadView.module.css index 6e2b81bc..678c038f 100644 --- a/Parlance/ClientApp/src/pages/Projects/Subprojects/Languages/Translation/TranslationEditor/Comments/ThreadView.module.css +++ b/Parlance/ClientApp/src/pages/Projects/Subprojects/Languages/Translation/TranslationEditor/Comments/ThreadView.module.css @@ -50,3 +50,8 @@ border-bottom: 1px solid var(--border-color); } + +.headerItem { + padding: 9px; + border-bottom: 1px solid var(--border-color); +} \ No newline at end of file diff --git a/Parlance/ClientApp/src/pages/Projects/Subprojects/Languages/Translation/TranslationEditor/Comments/ThreadView.tsx b/Parlance/ClientApp/src/pages/Projects/Subprojects/Languages/Translation/TranslationEditor/Comments/ThreadView.tsx index 6fc61298..67a55f1c 100644 --- a/Parlance/ClientApp/src/pages/Projects/Subprojects/Languages/Translation/TranslationEditor/Comments/ThreadView.tsx +++ b/Parlance/ClientApp/src/pages/Projects/Subprojects/Languages/Translation/TranslationEditor/Comments/ThreadView.tsx @@ -1,4 +1,4 @@ -import {VerticalLayout} from "../../../../../../../components/Layouts"; +import {HorizontalLayout, VerticalLayout} from "../../../../../../../components/Layouts"; import {useEffect, useState} from "react"; import Fetch from "../../../../../../../helpers/Fetch"; import ThreadReplyArea from "./ThreadReplyArea"; @@ -7,6 +7,11 @@ import Styles from "./ThreadView.module.css"; import moment from "moment"; import {useTranslation} from "react-i18next"; import {Comment, Thread} from "../../../../../../../interfaces/comments"; +import PageHeading from "../../../../../../../components/PageHeading"; +import SmallButton from "../../../../../../../components/SmallButton"; +import {ButtonGroup} from "reactstrap"; +import Modal from "../../../../../../../components/Modal"; +import {useNavigate} from "react-router-dom"; function ThreadComment({data}: { data: Comment @@ -42,10 +47,32 @@ function ThreadEvent({data}: {
} -export default function ThreadView({thread, onCurrentThreadChanged, onReloadThreads}: { +function ThreadHeader({thread}: { + thread: Thread +}) { + const {t} = useTranslation(); + + const goToString = () => { + Modal.unmount(); + window.location.pathname = `/projects/${thread.project}/${thread.subproject}/${thread.language}/translate/${thread.key}`; + } + + return
+ + {t("Original Translation")} +
{thread.sourceTranslation}
+ + {t("Go to string")} + +
+
+} + +export default function ThreadView({thread, onCurrentThreadChanged, onReloadThreads, showHeader}: { thread: Thread, onCurrentThreadChanged: (thread: Thread | null) => void, - onReloadThreads: () => void + onReloadThreads: () => void, + showHeader?: boolean }) { const [threadData, setThreadData] = useState([]); @@ -58,6 +85,7 @@ export default function ThreadView({thread, onCurrentThreadChanged, onReloadThre }, []); return + {showHeader && } {threadData.map((x, i) => x.event ? : )}