Tweak file tree

Change file tree icons and text to small. Align icons with Files tab icon.
This commit is contained in:
dnlklmn
2024-01-15 18:28:22 +00:00
committed by Rūdolfs Ošiņš
parent 8e580385f0
commit 68cff4625d
4 changed files with 28 additions and 10 deletions
+16
View File
@@ -34,6 +34,8 @@
| "eye-open"
| "face"
| "file"
| "folder"
| "folder-open"
| "globe"
| "help"
| "home"
@@ -307,6 +309,20 @@
fill-rule="evenodd"
clip-rule="evenodd"
d="M4.5 3.33329C4.5 3.24125 4.57462 3.16663 4.66667 3.16663H8.5898C8.79929 3.16663 9.0011 3.24553 9.15503 3.38762L11.2319 5.30473C11.4028 5.46249 11.5 5.68449 11.5 5.91707V12.6666C11.5 12.7587 11.4254 12.8333 11.3333 12.8333H4.66667C4.57462 12.8333 4.5 12.7587 4.5 12.6666V3.33329ZM4.66667 2.16663C4.02233 2.16663 3.5 2.68896 3.5 3.33329V12.6666C3.5 13.311 4.02233 13.8333 4.66667 13.8333H11.3333C11.9777 13.8333 12.5 13.311 12.5 12.6666V5.91707C12.5 5.40539 12.2862 4.91699 11.9102 4.56993L9.83331 2.65282C9.49466 2.34021 9.05068 2.16663 8.5898 2.16663H4.66667ZM6 4.16663C5.72386 4.16663 5.5 4.39048 5.5 4.66663C5.5 4.94277 5.72386 5.16663 6 5.16663H7.33333C7.60948 5.16663 7.83333 4.94277 7.83333 4.66663C7.83333 4.39048 7.60948 4.16663 7.33333 4.16663H6ZM6 6.83329C5.72386 6.83329 5.5 7.05715 5.5 7.33329C5.5 7.60944 5.72386 7.83329 6 7.83329H10C10.2761 7.83329 10.5 7.60944 10.5 7.33329C10.5 7.05715 10.2761 6.83329 10 6.83329H6ZM6 8.83329C5.72386 8.83329 5.5 9.05715 5.5 9.33329C5.5 9.60943 5.72386 9.83329 6 9.83329H8.66667C8.94281 9.83329 9.16667 9.60943 9.16667 9.33329C9.16667 9.05715 8.94281 8.83329 8.66667 8.83329H6ZM6 10.8333C5.72386 10.8333 5.5 11.0571 5.5 11.3333C5.5 11.6094 5.72386 11.8333 6 11.8333H9.33333C9.60948 11.8333 9.83333 11.6094 9.83333 11.3333C9.83333 11.0571 9.60948 10.8333 9.33333 10.8333H6Z" />
{:else if name === "folder"}
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M14.5 11.875c0 .69-.56 1.25-1.25 1.25H2.75c-.69 0-1.25-.56-1.25-1.25v-8.25c0-.69.56-1.25 1.25-1.25h4.036c.474 0 .907.268 1.119.691l.335.67a.25.25 0 00.224.139h4.786c.69 0 1.25.56 1.25 1.25v6.75zm-12-8.25a.25.25 0 01.25-.25h4.036a.25.25 0 01.224.138l.335.671a1.25 1.25 0 001.119.691h4.786a.25.25 0 01.25.25v1.268a1.99 1.99 0 00-1-.268h-10v-2.5zm0 3.5v4.75c0 .138.112.25.25.25h10.5a.25.25 0 00.25-.25v-3.75a1 1 0 00-1-1h-10z" />
{:else if name === "folder-open"}
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M2.81 3.125a.25.25 0 00-.25.27l.635 8.25c.01.13.119.23.25.23h9.805v1H3.445a1.25 1.25 0 01-1.247-1.154l-.634-8.25A1.25 1.25 0 012.81 2.125h3.976c.474 0 .907.268 1.119.691l.335.67a.25.25 0 00.224.139h3.351a1.25 1.25 0 011.245 1.137l.143 1.568-.996.09-.143-1.568a.25.25 0 00-.249-.227H8.464a1.25 1.25 0 01-1.119-.691l-.335-.67a.25.25 0 00-.224-.139H2.81z" />
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M3.672 6.97a1.25 1.25 0 011.24-1.095h8.238a1.25 1.25 0 011.24 1.405l-.562 4.5a1.25 1.25 0 01-1.24 1.095H3.585a.575.575 0 01-.57-.646l.657-5.259zm1.24-.095a.25.25 0 00-.248.219l-.598 4.781h8.522a.25.25 0 00.248-.219l.563-4.5a.25.25 0 00-.249-.281H4.912z" />
{:else if name === "globe"}
<path
fill-rule="evenodd"
+1 -1
View File
@@ -82,7 +82,7 @@
.column-left {
display: flex;
flex-direction: column;
padding-right: 1.5rem;
padding-right: 0.5rem;
}
.column-right {
+5 -4
View File
@@ -1,5 +1,5 @@
<script lang="ts">
import Icon from "@app/components/Icon.svelte";
import IconSmall from "@app/components/IconSmall.svelte";
export let active: boolean;
export let name: string;
@@ -12,7 +12,7 @@
display: flex;
line-height: 1.5em;
margin: 0.25rem 0;
padding: 0.25rem;
padding: 0.25rem 0.875rem;
width: 100%;
}
@@ -36,7 +36,7 @@
white-space: nowrap;
text-overflow: ellipsis !important;
overflow: hidden;
font-size: var(--font-size-regular);
font-size: var(--font-size-small);
font-weight: var(--font-weight-medium);
}
.icon-container {
@@ -44,6 +44,7 @@
display: flex;
justify-content: center;
align-items: center;
margin-right: 0.125rem;
}
.active .icon-container {
color: var(--color-foreground-match-background);
@@ -52,7 +53,7 @@
<div class="file" class:active>
<div class="icon-container">
<Icon name="file" />
<IconSmall name="file" />
</div>
<span class="name">{name}</span>
</div>
+6 -5
View File
@@ -7,7 +7,7 @@
import Link from "@app/components/Link.svelte";
import File from "./File.svelte";
import Icon from "@app/components/Icon.svelte";
import IconSmall from "@app/components/IconSmall.svelte";
export let baseUrl: BaseUrl;
export let currentPath: string;
@@ -42,7 +42,7 @@
.folder {
display: flex;
cursor: pointer;
padding: 0.25rem;
padding: 0.25rem 0.875rem;
margin: 0.25rem 0;
user-select: none;
line-height: 1.5rem;
@@ -55,7 +55,7 @@
.folder-name {
margin-left: 0.25rem;
font-size: var(--font-size-regular);
font-size: var(--font-size-small);
font-weight: var(--font-weight-medium);
}
@@ -73,6 +73,7 @@
justify-content: center;
align-items: center;
color: var(--color-fill-secondary);
margin-right: 0.125rem;
}
</style>
@@ -80,9 +81,9 @@
<div role="button" tabindex="0" class="folder" on:click={onClick}>
<div class="icon-container">
{#if expanded}
<Icon name="folder-open" />
<IconSmall name="folder-open" />
{:else}
<Icon name="folder" />
<IconSmall name="folder" />
{/if}
</div>
<span class="folder-name">{name}</span>