forked from tangled.org/core
this repo has no description

appview: fix file-path overflow in diff view

Changed files
+35 -34
appview
pages
templates
repo
fragments
+35 -34
appview/pages/templates/repo/fragments/diff.html
··· 37 37 <details open> 38 38 <summary class="list-none cursor-pointer sticky top-0"> 39 39 <div id="diff-file-header" class="rounded cursor-pointer bg-white dark:bg-gray-800 flex justify-between"> 40 - <div id="left-side-items" class="p-2 flex gap-2 items-center overflow-x-auto" style="direction: rtl;"> 41 - {{ $markerstyle := "diff-type p-1 mr-1 font-mono text-sm rounded select-none" }} 40 + <div id="left-side-items" class="p-2 flex gap-2 items-center overflow-x-auto"> 41 + <div class="flex gap-1 items-center" style="direction: ltr;"> 42 + {{ $markerstyle := "diff-type p-1 mr-1 font-mono text-sm rounded select-none" }} 43 + {{ if .IsNew }} 44 + <span class="bg-green-100 text-green-700 dark:bg-green-800/50 dark:text-green-400 {{ $markerstyle }}">ADDED</span> 45 + {{ else if .IsDelete }} 46 + <span class="bg-red-100 text-red-700 dark:bg-red-800/50 dark:text-red-400 {{ $markerstyle }}">DELETED</span> 47 + {{ else if .IsCopy }} 48 + <span class="bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 {{ $markerstyle }}">COPIED</span> 49 + {{ else if .IsRename }} 50 + <span class="bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 {{ $markerstyle }}">RENAMED</span> 51 + {{ else }} 52 + <span class="bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 {{ $markerstyle }}">MODIFIED</span> 53 + {{ end }} 42 54 43 - <div class="flex gap-2 items-center" style="direction: ltr;"> 44 - {{ if .IsNew }} 45 - <span class="bg-green-100 text-green-700 dark:bg-green-800/50 dark:text-green-400 {{ $markerstyle }}">ADDED</span> 46 - {{ else if .IsDelete }} 47 - <span class="bg-red-100 text-red-700 dark:bg-red-800/50 dark:text-red-400 {{ $markerstyle }}">DELETED</span> 48 - {{ else if .IsCopy }} 49 - <span class="bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 {{ $markerstyle }}">COPIED</span> 50 - {{ else if .IsRename }} 51 - <span class="bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 {{ $markerstyle }}">RENAMED</span> 52 - {{ else }} 53 - <span class="bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 {{ $markerstyle }}">MODIFIED</span> 54 - {{ end }} 55 + {{ block "statPill" .Stats }} {{ end }} 56 + </div> 55 57 56 - {{ block "statPill" .Stats }} {{ end }} 57 - 58 - {{ if .IsDelete }} 59 - <a class="dark:text-white whitespace-nowrap overflow-x-auto" {{if $this }}href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.Old }}"{{end}}> 60 - {{ .Name.Old }} 61 - </a> 62 - {{ else if (or .IsCopy .IsRename) }} 63 - <a class="dark:text-white whitespace-nowrap overflow-x-auto" {{if $parent}}href="/{{ $repo }}/blob/{{ $parent }}/{{ .Name.Old }}"{{end}}> 64 - {{ .Name.Old }} 65 - </a> 66 - {{ i "arrow-right" "w-4 h-4" }} 67 - <a class="dark:text-white whitespace-nowrap overflow-x-auto" {{if $this}}href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}"{{end}}> 68 - {{ .Name.New }} 69 - </a> 70 - {{ else }} 71 - <a class="dark:text-white whitespace-nowrap overflow-x-auto" {{if $this}}href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}"{{end}}> 72 - {{ .Name.New }} 73 - </a> 74 - {{ end }} 58 + <div class="flex gap-2 items-center overflow-x-auto" style="direction: rtl;"> 59 + {{ if .IsDelete }} 60 + <a class="dark:text-white whitespace-nowrap overflow-x-auto" {{if $this }}href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.Old }}"{{end}}> 61 + {{ .Name.Old }} 62 + </a> 63 + {{ else if (or .IsCopy .IsRename) }} 64 + <a class="dark:text-white whitespace-nowrap overflow-x-auto" {{if $parent}}href="/{{ $repo }}/blob/{{ $parent }}/{{ .Name.Old }}"{{end}}> 65 + {{ .Name.Old }} 66 + </a> 67 + {{ i "arrow-right" "w-4 h-4" }} 68 + <a class="dark:text-white whitespace-nowrap overflow-x-auto" {{if $this}}href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}"{{end}}> 69 + {{ .Name.New }} 70 + </a> 71 + {{ else }} 72 + <a class="dark:text-white whitespace-nowrap overflow-x-auto" {{if $this}}href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}"{{end}}> 73 + {{ .Name.New }} 74 + </a> 75 + {{ end }} 75 76 </div> 76 77 </div> 77 78 ··· 172 173 <span class="rounded p-1 select-none bg-red-100 text-red-700 dark:bg-red-800/50 dark:text-red-400">-{{ .Deletions }}</span> 173 174 {{ end }} 174 175 </div> 175 - {{ end }} 176 + {{ end }}