Cleanup and zip handling
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { catalog } from '$lib/catalog/test';
|
||||
import { catalog } from '$lib/catalog';
|
||||
import CatalogItem from './CatalogItem.svelte';
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { currentManga } from '$lib/catalog';
|
||||
import type { Volume } from '$lib/upload';
|
||||
import type { Volume } from '$lib/types';
|
||||
export let manga: Volume[];
|
||||
const { volumeName, files, mokuroData } = manga[0];
|
||||
|
||||
|
||||
@@ -1,18 +1,5 @@
|
||||
<script lang="ts">
|
||||
type Block = {
|
||||
box: number[];
|
||||
vertical: boolean;
|
||||
fontSize: number;
|
||||
lines: string[];
|
||||
};
|
||||
|
||||
type Page = {
|
||||
version?: string;
|
||||
img_width: number;
|
||||
img_height: number;
|
||||
blocks: Block[];
|
||||
imgPath: string;
|
||||
};
|
||||
import type { Page } from '$lib/types';
|
||||
|
||||
export let page: Page;
|
||||
|
||||
@@ -28,7 +15,7 @@
|
||||
|
||||
$: textBoxes = page.blocks.map((block) => {
|
||||
const { img_height, img_width } = page;
|
||||
const { box, fontSize, lines, vertical } = block;
|
||||
const { box, font_size, lines, vertical } = block;
|
||||
|
||||
let [_xmin, _ymin, _xmax, _ymax] = box;
|
||||
|
||||
@@ -46,7 +33,7 @@
|
||||
top: `${ymin}px`,
|
||||
width: `${width}px`,
|
||||
height: `${height}px`,
|
||||
fontSize: `${fontSize}px`,
|
||||
fontSize: `${font_size}px`,
|
||||
writingMode: vertical ? 'vertical-rl' : 'horizontal-tb',
|
||||
lines
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores';
|
||||
import { currentVolume } from '$lib/catalog';
|
||||
import type { Volume } from '$lib/upload';
|
||||
import type { Volume } from '$lib/types';
|
||||
|
||||
export let volume: Volume;
|
||||
const { volumeName, files } = volume;
|
||||
|
||||
Reference in New Issue
Block a user