Make toolbar and main menu collapsible

This commit is contained in:
2025-11-03 19:15:57 +01:00
parent 4de6331551
commit d422c147b0
7 changed files with 127 additions and 83 deletions

View File

@@ -21,6 +21,8 @@ let {
let share_dialog: ShareDialog = $state()
let link_copied = $state(false)
let toolbar_expanded = $state(false)
export const copy_link = () => {
const share_url = fs_share_url($nav.path)
if (share_url === "") {
@@ -35,8 +37,9 @@ export const copy_link = () => {
</script>
<div class="toolbar">
<div class="grid">
<FileStats nav={nav}/>
<FileStats nav={nav} bind:expanded={toolbar_expanded}/>
<div class="grid" class:hide={!toolbar_expanded}>
<div class="button_row">
<button onclick={() => {nav.open_sibling(-1)}}>
@@ -99,6 +102,9 @@ export const copy_link = () => {
<ShareDialog nav={nav} bind:this={share_dialog}/>
<style>
.hide {
display: none !important;
}
.toolbar {
flex: 0 0 auto;
overflow-x: hidden;