Add toggle for showing hidden files
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user