mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-10-19 09:22:12 +00:00
fix folder styling
This commit is contained in:
1 parent
3ef2bf135a
commit
a5c1f6ad33
3 files changed
+19
-3
No files matched your search
@@ -124,6 +124,7 @@
|
||||
path={folder}
|
||||
name={folderName(folder)}
|
||||
kind="root"
|
||||
class="h-7"
|
||||
onOpenFolder={() =>
|
||||
trees && (trees.root.get('root.folder').current = true)}
|
||||
/>
|
||||
@@ -145,3 +146,18 @@
|
||||
</ScrollArea>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<style lang="postcss">
|
||||
@reference "../../../app.css";
|
||||
|
||||
/* a selected file, and a selected folder with its chevron: the whole row of its node */
|
||||
[data-explorer] :global([data-kind='file'][aria-selected='true']),
|
||||
[data-explorer] :global([data-slot='button']:has([aria-selected='true'])) {
|
||||
@apply bg-accent;
|
||||
}
|
||||
|
||||
/* the folder where what is dragged would go */
|
||||
[data-explorer] :global([data-slot='button']:has([data-drop-target])) {
|
||||
@apply ring-1 ring-primary bg-accent/60;
|
||||
}
|
||||
</style>
|
||||
@@ -252,9 +252,8 @@
|
||||
data-kind={kind}
|
||||
title={path}
|
||||
draggable={kind !== 'root' && !editing}
|
||||
class="flex flex-row items-center gap-1.5 min-w-0 rounded-md {selected
|
||||
? 'bg-accent'
|
||||
: ''} {target ? 'ring-1 ring-primary bg-accent/60' : ''} {className}"
|
||||
data-drop-target={target || undefined}
|
||||
class="flex flex-row items-center gap-1.5 min-w-0 rounded-md {className}"
|
||||
{style}
|
||||
{onclick}
|
||||
{ondblclick}
|
||||
|
||||
@@ -136,6 +136,7 @@
|
||||
path={entry.path}
|
||||
name={entry.name}
|
||||
kind="folder"
|
||||
class="h-7"
|
||||
onOpenFolder={() => nodes[entry.path]?.openNode()}
|
||||
/>
|
||||
{/snippet}
|
||||
|
||||
Reference in new issue
Block a user