mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-14 22:08:45 +00:00
사소한 리팩토링 2
This commit is contained in:
@@ -114,7 +114,7 @@ export const uploadFile = async (
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const hashStream = createHash("sha256");
|
const hashStream = createHash("sha256");
|
||||||
const [_, hash] = await Promise.all([
|
const [, hash] = await Promise.all([
|
||||||
pipeline(
|
pipeline(
|
||||||
encContentStream,
|
encContentStream,
|
||||||
async function* (source) {
|
async function* (source) {
|
||||||
@@ -127,7 +127,7 @@ export const uploadFile = async (
|
|||||||
),
|
),
|
||||||
encContentHash,
|
encContentHash,
|
||||||
]);
|
]);
|
||||||
if (hashStream.digest("base64") != hash) {
|
if (hashStream.digest("base64") !== hash) {
|
||||||
throw new Error("Invalid checksum");
|
throw new Error("Invalid checksum");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,6 @@
|
|||||||
let { children } = $props();
|
let { children } = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<AdaptiveDiv class="flex min-h-screen flex-grow flex-col">
|
<AdaptiveDiv class="flex min-h-screen flex-col">
|
||||||
{@render children()}
|
{@render children()}
|
||||||
</AdaptiveDiv>
|
</AdaptiveDiv>
|
||||||
|
|||||||
@@ -21,10 +21,12 @@
|
|||||||
<div class="sticky bottom-0 h-20 flex-shrink-0 rounded-t-2xl border-t border-gray-300 bg-white">
|
<div class="sticky bottom-0 h-20 flex-shrink-0 rounded-t-2xl border-t border-gray-300 bg-white">
|
||||||
<AdaptiveDiv class="flex justify-evenly px-4 py-2">
|
<AdaptiveDiv class="flex justify-evenly px-4 py-2">
|
||||||
{#each pages as { path, label, icon: Icon }}
|
{#each pages as { path, label, icon: Icon }}
|
||||||
{@const textColor = !page.url.pathname.startsWith(path) ? "text-gray-600" : ""}
|
|
||||||
<button
|
<button
|
||||||
onclick={() => goto(path)}
|
onclick={() => goto(path)}
|
||||||
class="w-16 active:rounded-xl active:bg-gray-100 {textColor}"
|
class={[
|
||||||
|
"w-16 active:rounded-xl active:bg-gray-100",
|
||||||
|
!page.url.pathname.startsWith(path) && "text-gray-600",
|
||||||
|
]}
|
||||||
>
|
>
|
||||||
<div class="flex flex-col items-center gap-y-1 p-1 transition active:scale-95">
|
<div class="flex flex-col items-center gap-y-1 p-1 transition active:scale-95">
|
||||||
<Icon class="text-xl" />
|
<Icon class="text-xl" />
|
||||||
|
|||||||
Reference in New Issue
Block a user