diff --git a/josh-proxy/src/bin/josh-proxy.rs b/josh-proxy/src/bin/josh-proxy.rs index c50462dba..b7b0e0cd9 100644 --- a/josh-proxy/src/bin/josh-proxy.rs +++ b/josh-proxy/src/bin/josh-proxy.rs @@ -377,6 +377,8 @@ async fn handle_ui_request( || resource_path == "/select" || resource_path == "/browse" || resource_path == "/view" + || resource_path == "/diff" + || resource_path == "/change" || resource_path == "/history"; let resolve_path = if is_app_route { diff --git a/josh-ui/src/App.scss b/josh-ui/src/App.scss index 5ca6d4ab5..e2d145b3f 100644 --- a/josh-ui/src/App.scss +++ b/josh-ui/src/App.scss @@ -20,7 +20,6 @@ $color-link-visited-hover: #ffffaa; &:hover { color: $color-link-hover; - text-decoration: underline; } &:visited { @@ -132,19 +131,48 @@ nav { } } -.commit-list-entry { +.file-browser-list-entry { @include ui-link-clickable; padding: .4em .4em; &:hover { background: $color-background-highlight; } +} + +.commit-list-entry-dir { + @include ui-link-clickable; + &:hover { + background: $color-background-highlight; + } +} + +.commit-list-entry-browse { + @include ui-link-clickable; + &:hover { + background: $color-background-highlight; + } +} + + +.commit-list-entry { + padding: .4em .4em; span.hash { margin: 0 0.7em 0 0; color: $color-highlight; font-weight: bolder; } + span.authorEmail { + margin: 0 0.7em 0 0; + color: $color-highlight; + font-weight: bolder; + } + span.summary { + display: block; + margin: 0 0.7em 0 0; + font-weight: bolder; + } } .ui-button { diff --git a/josh-ui/src/App.tsx b/josh-ui/src/App.tsx index 31dcb43d8..8b6cf9a88 100644 --- a/josh-ui/src/App.tsx +++ b/josh-ui/src/App.tsx @@ -19,6 +19,8 @@ import {RepoSelector} from './RepoSelector'; import {NavigateCallback, NavigateTarget, NavigateTargetType} from "./Navigation"; import {match} from "ts-pattern"; import {FileViewer} from "./FileViewer"; +import {DiffViewer} from "./DiffViewer"; +import {ChangeViewer} from "./ChangeViewer"; import {HistoryList} from "./History"; import {Breadcrumbs} from "./Breadcrumbs"; import {DEFAULT_FILTER} from "./Josh"; @@ -42,7 +44,9 @@ function useNavigateCallback(): NavigateCallback { const pathname = match(targetType) .with(NavigateTargetType.History, () => '/history') .with(NavigateTargetType.Directory, () => '/browse') + .with(NavigateTargetType.Change, () => '/change') .with(NavigateTargetType.File, () => '/view') + .with(NavigateTargetType.Diff, () => '/diff') .run() navigate({ @@ -152,6 +156,27 @@ function Browse() { } +function ChangeView() { + const param = useStrictGetSearchParam() + + useEffect(() => { + document.title = `/${param('path')} - ${param('repo')} - Josh` + }); + + return