Remove some event dispatchers
This commit is contained in:
@@ -1,39 +1,40 @@
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import IconBlock from "layout/IconBlock.svelte";
|
||||
import { fs_thumbnail_url } from "lib/FilesystemAPI.svelte";
|
||||
import { fs_thumbnail_url, FSNode } from "lib/FilesystemAPI.svelte";
|
||||
import TextBlock from "layout/TextBlock.svelte"
|
||||
import { formatDataVolume, formatDate } from "util/Formatting";
|
||||
import type { FSNavigator } from "filesystem/FSNavigator";
|
||||
|
||||
let dispatch = createEventDispatcher()
|
||||
|
||||
let { nav, children }: {
|
||||
nav: FSNavigator;
|
||||
children?: import('svelte').Snippet;
|
||||
let {
|
||||
node,
|
||||
open_details,
|
||||
children,
|
||||
}: {
|
||||
node: FSNode
|
||||
open_details: () => void
|
||||
children?: import('svelte').Snippet
|
||||
} = $props();
|
||||
</script>
|
||||
|
||||
{@render children?.()}
|
||||
|
||||
<h1>{$nav.base.name}</h1>
|
||||
<h1>{node.name}</h1>
|
||||
|
||||
<IconBlock icon_href={fs_thumbnail_url($nav.base.path, 256, 256)}>
|
||||
Type: {$nav.base.file_type}<br/>
|
||||
Size: {formatDataVolume($nav.base.file_size, 3)}<br/>
|
||||
Upload date: {formatDate($nav.base.created, true, true, false)}
|
||||
<IconBlock icon_href={fs_thumbnail_url(node.path, 256, 256)}>
|
||||
Type: {node.file_type}<br/>
|
||||
Size: {formatDataVolume(node.file_size, 3)}<br/>
|
||||
Upload date: {formatDate(node.created, true, true, false)}
|
||||
<hr/>
|
||||
<button class="button_highlight" onclick={() => {dispatch("download")}}>
|
||||
<button class="button_highlight" onclick={() => node.download()}>
|
||||
<i class="icon">download</i>
|
||||
<span>Download</span>
|
||||
</button>
|
||||
<button onclick={() => {dispatch("details")}}>
|
||||
<button onclick={() => open_details()}>
|
||||
<i class="icon">help</i>
|
||||
<span>Details</span>
|
||||
</button>
|
||||
</IconBlock>
|
||||
|
||||
{#if $nav.base.name === ".search_index.gz"}
|
||||
{#if node.name === ".search_index.gz"}
|
||||
<TextBlock>
|
||||
<p>
|
||||
Congratulations! You have found the search index. One of the
|
||||
|
Reference in New Issue
Block a user