This commit is contained in:
Kerwin Bryant 2024-12-10 01:16:42 +00:00
parent 678e0a2eeb
commit f5d22f0ee0
2 changed files with 4 additions and 1 deletions

View File

@ -18,7 +18,9 @@
{{else}} {{else}}
<div class="item-directory" title="{{.Name}}"> <div class="item-directory" title="{{.Name}}">
<!-- directory --> <!-- directory -->
{{svg "octicon-chevron-down"}} {{svg "octicon-chevron-right" 16 "tw-hidden"}}
{{svg "octicon-chevron-down" 16}}
{{svg "octicon-file-directory-fill" 16 "text primary tw-hidden"}}
{{svg "octicon-file-directory-open-fill" 16 "text primary"}} {{svg "octicon-file-directory-open-fill" 16 "text primary"}}
<span class="gt-ellipsis">{{.Name}}</span> <span class="gt-ellipsis">{{.Name}}</span>
</div> </div>

View File

@ -51,6 +51,7 @@ export function initDiffFileTree() {
for (const el of document.querySelectorAll<HTMLInputElement>('.file-tree-items .item-directory')) { for (const el of document.querySelectorAll<HTMLInputElement>('.file-tree-items .item-directory')) {
el.addEventListener('click', () => { el.addEventListener('click', () => {
toggleElem(el.nextElementSibling); toggleElem(el.nextElementSibling);
toggleElem(el.querySelectorAll('.svg.octicon-chevron-right, .svg.octicon-chevron-down, .svg.octicon-file-directory-fill, .svg.octicon-file-directory-open-fill'));
}); });
} }
} }