mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-02-04 08:06:56 +00:00
모바일 환경에서 SearchBar의 레이아웃이 깨지는 문제 수정
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
|
||||
{#if isOpen && (directoryId || downloadUrl || fileBlob)}
|
||||
<div
|
||||
class="absolute right-2 top-full z-20 min-w-40 space-y-1 rounded-lg bg-white px-1 py-2 shadow-2xl"
|
||||
class="absolute right-2 top-full z-20 min-w-44 space-y-1 rounded-lg bg-white px-1 py-2 shadow-2xl"
|
||||
transition:fly={{ y: -8, duration: 200 }}
|
||||
>
|
||||
<p class="px-3 pt-2 text-sm font-semibold text-gray-600">더보기</p>
|
||||
@@ -57,7 +57,9 @@
|
||||
onclick: () => void,
|
||||
)}
|
||||
<button {onclick} class="rounded-xl active:bg-gray-100">
|
||||
<div class="flex items-center gap-x-3 px-3 py-2 text-gray-700 transition active:scale-95">
|
||||
<div
|
||||
class="flex items-center gap-x-3 px-3 py-2 text-lg text-gray-700 transition active:scale-95"
|
||||
>
|
||||
<Icon />
|
||||
<p class="font-medium">{text}</p>
|
||||
</div>
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
<script lang="ts">
|
||||
import type { ClassValue } from "svelte/elements";
|
||||
|
||||
import IconArrowBack from "~icons/material-symbols/arrow-back";
|
||||
|
||||
interface Props {
|
||||
class?: ClassValue;
|
||||
value: string;
|
||||
}
|
||||
|
||||
let { class: className, value = $bindable() }: Props = $props();
|
||||
let { value = $bindable() }: Props = $props();
|
||||
</script>
|
||||
|
||||
<div class={["sticky top-0 z-10 flex items-center gap-x-2 px-2 py-3 backdrop-blur-2xl", className]}>
|
||||
<div class={"sticky top-0 z-10 flex items-center gap-x-2 px-2 py-3 backdrop-blur-2xl"}>
|
||||
<button
|
||||
onclick={() => history.back()}
|
||||
class="w-[2.3rem] flex-shrink-0 rounded-full p-1 active:bg-black active:bg-opacity-[0.04]"
|
||||
@@ -22,6 +19,6 @@
|
||||
bind:value
|
||||
type="text"
|
||||
placeholder="검색"
|
||||
class="mr-1 h-[2.3rem] flex-grow rounded-lg bg-gray-100 px-3 py-1.5 placeholder-gray-600 focus:outline-none"
|
||||
class="mr-1 h-[2.3rem] min-w-0 flex-grow rounded-lg bg-gray-100 px-3 py-1.5 placeholder-gray-600 focus:outline-none"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import { DirectoryEntryLabel } from "$lib/components/molecules";
|
||||
import { getFileThumbnail } from "$lib/modules/file";
|
||||
import type { CategoryFileInfo } from "$lib/modules/filesystem";
|
||||
import { formatDateTime } from "$lib/utils";
|
||||
import type { SelectedFile } from "./service.svelte";
|
||||
|
||||
import IconClose from "~icons/material-symbols/close";
|
||||
@@ -19,7 +20,7 @@
|
||||
</script>
|
||||
|
||||
<ActionEntryButton
|
||||
class="h-12"
|
||||
class="h-14"
|
||||
onclick={() => onclick(info)}
|
||||
actionButtonIcon={onRemoveClick && IconClose}
|
||||
onActionButtonClick={() => onRemoveClick?.(info)}
|
||||
@@ -28,6 +29,7 @@
|
||||
type="file"
|
||||
thumbnail={$thumbnail}
|
||||
name={info.name}
|
||||
subtext={formatDateTime(info.createdAt ?? info.lastModifiedAt)}
|
||||
isFavorite={info.isFavorite}
|
||||
/>
|
||||
</ActionEntryButton>
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>파일</title>
|
||||
<title>내 파일</title>
|
||||
</svelte:head>
|
||||
|
||||
<input bind:this={fileInput} onchange={uploadFile} type="file" multiple class="hidden" />
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
<title>즐겨찾기</title>
|
||||
</svelte:head>
|
||||
|
||||
<div class="flex h-full flex-col">
|
||||
<TopBar title="즐겨찾기" showBackButton={false}>
|
||||
<button
|
||||
onclick={() => goto("/search?from=favorites")}
|
||||
@@ -52,22 +53,8 @@
|
||||
<IconSearch />
|
||||
</button>
|
||||
</TopBar>
|
||||
<div class="flex h-full flex-col p-4 !pt-0">
|
||||
{#if isLoading}
|
||||
<div class="flex flex-grow items-center justify-center">
|
||||
<p class="text-gray-500">
|
||||
{#if data.favorites.files.length === 0 && data.favorites.directories.length === 0}
|
||||
즐겨찾기한 항목이 없어요.
|
||||
{:else}
|
||||
즐겨찾기 목록을 불러오고 있어요.
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
{:else if entries.length === 0}
|
||||
<div class="flex flex-grow items-center justify-center">
|
||||
<p class="text-gray-500">즐겨찾기한 항목이 없어요.</p>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="flex flex-grow flex-col px-4 pb-4">
|
||||
{#if entries.length > 0}
|
||||
<RowVirtualizer
|
||||
count={entries.length}
|
||||
getItemKey={(index) => `${entries[index]!.type}-${entries[index]!.details.id}`}
|
||||
@@ -91,5 +78,16 @@
|
||||
{/if}
|
||||
{/snippet}
|
||||
</RowVirtualizer>
|
||||
{:else}
|
||||
<div class="flex flex-grow items-center justify-center">
|
||||
<p class="text-gray-500">
|
||||
{#if isLoading}
|
||||
즐겨찾기 목록을 불러오고 있어요.
|
||||
{:else}
|
||||
즐겨찾기한 항목이 없어요.
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import { DirectoryEntryLabel } from "$lib/components/molecules";
|
||||
import { getFileThumbnail } from "$lib/modules/file";
|
||||
import type { SummarizedFileInfo } from "$lib/modules/filesystem";
|
||||
import { formatDateTime } from "$lib/utils";
|
||||
|
||||
import IconClose from "~icons/material-symbols/close";
|
||||
|
||||
@@ -23,5 +24,11 @@
|
||||
actionButtonIcon={IconClose}
|
||||
onActionButtonClick={onRemoveClick}
|
||||
>
|
||||
<DirectoryEntryLabel type="file" thumbnail={$thumbnail} name={info.name} isFavorite />
|
||||
<DirectoryEntryLabel
|
||||
type="file"
|
||||
thumbnail={$thumbnail}
|
||||
name={info.name}
|
||||
subtext={formatDateTime(info.createdAt ?? info.lastModifiedAt)}
|
||||
isFavorite
|
||||
/>
|
||||
</ActionEntryButton>
|
||||
|
||||
Reference in New Issue
Block a user