mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-15 06:18:48 +00:00
디렉터리 페이지에서, 항목이 많을 때 레이아웃이 깨지던 버그 수정
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="relative mt-4 flex items-center justify-between">
|
<div class="sticky top-0 flex items-center justify-between bg-white pt-4">
|
||||||
<button onclick={back} class="rounded-full p-1 active:bg-gray-100">
|
<button onclick={back} class="rounded-full p-1 active:bg-gray-100">
|
||||||
<IconArrowBack class="text-2xl" />
|
<IconArrowBack class="text-2xl" />
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -1,22 +1,36 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { Component } from "svelte";
|
import type { Component } from "svelte";
|
||||||
import type { SvelteHTMLElements } from "svelte/elements";
|
import type { SvelteHTMLElements } from "svelte/elements";
|
||||||
|
import { AdaptiveDiv } from "$lib/components/divs";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
bottom?: string;
|
||||||
icon: Component<SvelteHTMLElements["svg"]>;
|
icon: Component<SvelteHTMLElements["svg"]>;
|
||||||
onclick?: () => void;
|
onclick?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
let { icon: Icon, onclick }: Props = $props();
|
let { bottom = "bottom-20", icon: Icon, onclick }: Props = $props();
|
||||||
</script>
|
|
||||||
|
|
||||||
<button
|
const click = () => {
|
||||||
onclick={() => {
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
onclick?.();
|
onclick?.();
|
||||||
}, 100);
|
}, 100);
|
||||||
}}
|
};
|
||||||
class="absolute bottom-4 right-4 flex h-14 w-14 items-center justify-center rounded-full bg-gray-300 shadow-lg transition active:scale-95 active:bg-gray-400"
|
</script>
|
||||||
>
|
|
||||||
|
<div class="pointer-events-none fixed inset-0">
|
||||||
|
<div class="absolute right-0 w-full {bottom}">
|
||||||
|
<AdaptiveDiv>
|
||||||
|
<div class="relative">
|
||||||
|
<div class="pointer-events-auto absolute bottom-4 right-4">
|
||||||
|
<button
|
||||||
|
onclick={click}
|
||||||
|
class="flex h-14 w-14 items-center justify-center rounded-full bg-gray-300 shadow-lg transition active:scale-95 active:bg-gray-400"
|
||||||
|
>
|
||||||
<Icon class="text-xl" />
|
<Icon class="text-xl" />
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</AdaptiveDiv>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|||||||
@@ -6,8 +6,10 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex h-screen w-full flex-col justify-between">
|
<div class="flex h-screen w-full flex-col justify-between">
|
||||||
|
<div class="flex-grow">
|
||||||
<AdaptiveDiv>
|
<AdaptiveDiv>
|
||||||
{@render children()}
|
{@render children()}
|
||||||
</AdaptiveDiv>
|
</AdaptiveDiv>
|
||||||
|
</div>
|
||||||
<BottomBar />
|
<BottomBar />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -19,14 +19,14 @@
|
|||||||
// TODO: Navigation
|
// TODO: Navigation
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="sticky bottom-0 w-full rounded-t-2xl border-t border-gray-300 bg-white">
|
<div
|
||||||
|
class="sticky bottom-0 h-20 w-full flex-shrink-0 rounded-t-2xl border-t border-gray-300 bg-white"
|
||||||
|
>
|
||||||
<AdaptiveDiv>
|
<AdaptiveDiv>
|
||||||
<div class="flex w-full justify-evenly p-2">
|
<div class="flex w-full justify-evenly p-2">
|
||||||
{#each pages as { path, label, icon: Icon }}
|
{#each pages as { path, label, icon: Icon }}
|
||||||
{@const isCurrent = page.url.pathname.startsWith(path)}
|
{@const textColor = !page.url.pathname.startsWith(path) ? "text-gray-600" : ""}
|
||||||
<button
|
<button class="w-16 active:rounded-xl active:bg-gray-100 {textColor}">
|
||||||
class="w-16 active:rounded-xl active:bg-gray-100 {!isCurrent ? 'text-gray-600' : ''}"
|
|
||||||
>
|
|
||||||
<div class="gap-y flex flex-col items-center gap-y-1 p-1 transition active:scale-95">
|
<div class="gap-y flex flex-col items-center gap-y-1 p-1 transition active:scale-95">
|
||||||
<Icon class="text-xl" fill="0" />
|
<Icon class="text-xl" fill="0" />
|
||||||
<p class="text-sm">{label}</p>
|
<p class="text-sm">{label}</p>
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
<title>파일</title>
|
<title>파일</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<div class="relative flex h-full flex-col px-4">
|
<div class="px-4">
|
||||||
{#if data.id !== "root"}
|
{#if data.id !== "root"}
|
||||||
{#if !metadata}
|
{#if !metadata}
|
||||||
<TopBar />
|
<TopBar />
|
||||||
@@ -69,8 +69,7 @@
|
|||||||
{/await}
|
{/await}
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
<div class="my-4 pb-[4.5rem]">
|
||||||
<div class="mt-4">
|
|
||||||
{#if subDirectories}
|
{#if subDirectories}
|
||||||
{#await subDirectories then subDirectories}
|
{#await subDirectories then subDirectories}
|
||||||
{#each subDirectories as { id, name }}
|
{#each subDirectories as { id, name }}
|
||||||
@@ -79,14 +78,14 @@
|
|||||||
{/await}
|
{/await}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<FloatingButton
|
<FloatingButton
|
||||||
icon={IconAdd}
|
icon={IconAdd}
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
isCreateBottomSheetOpen = true;
|
isCreateBottomSheetOpen = true;
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
|
|
||||||
<CreateBottomSheet
|
<CreateBottomSheet
|
||||||
bind:isOpen={isCreateBottomSheetOpen}
|
bind:isOpen={isCreateBottomSheetOpen}
|
||||||
|
|||||||
Reference in New Issue
Block a user