Display a top and bottom border in the file tree when overflowing

This commit is contained in:
Sebastian Martinez
2023-11-08 17:43:11 +01:00
committed by Rūdolfs Ošiņš
parent f44b0f4709
commit ca28fc28b2
+14 -1
View File
@@ -29,6 +29,12 @@
// Whether the mobile file tree is visible.
let mobileFileTree = false;
let treeElement: HTMLElement | undefined = undefined;
let treeOverflow: boolean = false;
$: if (treeElement) {
treeOverflow = treeElement.scrollHeight > treeElement.offsetHeight;
}
const api = new HttpdClient(baseUrl);
@@ -98,6 +104,10 @@
width: 17.5rem;
padding-right: 0.25rem;
}
.source-tree-overflow {
border-bottom: 1px solid var(--color-fill-separator);
border-top: 1px solid var(--color-fill-separator);
}
.sticky {
position: sticky;
top: 2rem;
@@ -174,7 +184,10 @@
<div class="container center-content">
{#if tree.entries.length > 0}
<div class="column-left">
<div class="source-tree sticky">
<div
bind:this={treeElement}
class="source-tree sticky"
class:source-tree-overflow={treeOverflow}>
<TreeComponent
projectId={project.id}
{revision}