Add toggle for showing hidden files

This commit is contained in:
2023-04-19 18:26:50 +02:00
parent 5803a30b6b
commit 6ae9f06d64
3 changed files with 23 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ import { createEventDispatcher } from "svelte"
let dispatch = createEventDispatcher()
export let state
export let show_hidden = false
const node_icon = node => {
if (node.type === "dir") {
@@ -51,6 +51,7 @@ const node_icon = node => {
href={state.path_root+child.path}
on:click|preventDefault={() => {dispatch("node_click", index)}}
class:selected={child.fm_selected}
class:hidden={child.name.startsWith(".") && !show_hidden}
title={child.name}
>
<div
@@ -105,4 +106,7 @@ const node_icon = node => {
font-size: 22px;
text-align: left;
}
.hidden {
display: none;
}
</style>