mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-15 19:30:38 +08:00
Display a top and bottom border in the file tree when overflowing
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user