Mistivia преди 1 месец
родител
ревизия
2ebdfe109b

+ 0 - 14
src/App.svelte

@@ -1,14 +0,0 @@
-<script lang="ts">
-
-import LeftPanel from './components/LeftPanel.svelte';
-import RightPanel from './components/RightPanel.svelte';
-import MainPanel from './components/MainPanel.svelte';
-import Loading from './components/Loading.svelte';
-
-</script>
-
-<LeftPanel />
-<MainPanel />
-<RightPanel />
-<Loading />
-

+ 14 - 0
src/app.svelte

@@ -0,0 +1,14 @@
+<script lang="ts">
+
+import LeftPanel from './components/left_panel.svelte';
+import RightPanel from './components/right_panel.svelte';
+import MainPanel from './components/main_panel.svelte';
+import Loading from './components/loading.svelte';
+
+</script>
+
+<LeftPanel />
+<MainPanel />
+<RightPanel />
+<Loading />
+

+ 0 - 0
src/data/cardDb.js → src/card_db.js


+ 1 - 3
src/components/CardThumb.svelte → src/components/card_thumb.svelte

@@ -1,6 +1,6 @@
 <script lang="js">
 
-    import {setLeftPanelCard} from '../control/left_panel';
+    import { setLeftPanelCard } from '../left_panel';
     import { cardImageUrl } from '../utils';
 
     let {id, area, idx} = $props();
@@ -30,6 +30,4 @@
 
 <style>
 
-
-
 </style>

+ 1 - 1
src/components/LeftPanel.svelte → src/components/left_panel.svelte

@@ -3,7 +3,7 @@
     import {
         leftPanelCardId,
         leftPanelCardDesc,
-    } from '../control/left_panel';
+    } from '../left_panel';
 
     import { cardImageUrl } from '../utils';
 

+ 1 - 1
src/components/Loading.svelte → src/components/loading.svelte

@@ -1,5 +1,5 @@
 <script>
-    import { isLoading } from '../control/loading';
+    import { isLoading } from '../loading';
 </script>
 
 {#if $isLoading}

+ 2 - 2
src/components/MainPanel.svelte → src/components/main_panel.svelte

@@ -1,6 +1,6 @@
 <script lang="js">
-    import CardThumb from './CardThumb.svelte';
-    import { deck, setDeck, deckOps } from '../control/deck';
+    import CardThumb from './card_thumb.svelte';
+    import { deck, setDeck, deckOps } from '../deck';
     import {
         parseYdk,
         genYdk,

+ 3 - 3
src/components/RightPanel.svelte → src/components/right_panel.svelte

@@ -1,7 +1,7 @@
 <script lang="js">
-    import CardThumb from './CardThumb.svelte';
-    import { changeInput, showingCards, onPrevPage, onNextPage } from '../control/search'
-    import { deckOps } from '../control/deck';
+    import CardThumb from './card_thumb.svelte';
+    import { changeInput, showingCards, onPrevPage, onNextPage } from '../search'
+    import { deckOps } from '../deck';
 
     function onChange(event) {
         changeInput(event.target.value);

+ 2 - 2
src/control/deck.js → src/deck.js

@@ -1,6 +1,6 @@
 import { writable } from "svelte/store";
-import { parseYdke } from '../utils';
-import { getCardDb, getAltId } from '../data/cardDb';
+import { parseYdke } from './utils';
+import { getCardDb, getAltId } from './card_db';
 
 let deck = writable({main: [], extra: [], side: []});
 let deckState = {main: [], extra: [], side: []};

+ 0 - 0
src/control/left_panel.js → src/left_panel.js


+ 1 - 1
src/control/loading.js → src/loading.js

@@ -1,7 +1,7 @@
 import { writable } from 'svelte/store';
 import { initSearch } from './search';
 import { initDeck } from './deck';
-import { setCardDb, setAltId } from '../data/cardDb';
+import { setCardDb, setAltId } from './card_db';
 
 let isLoading = writable(true);
 

+ 1 - 1
src/main.ts

@@ -1,5 +1,5 @@
 import { mount } from 'svelte'
-import App from './App.svelte'
+import App from './app.svelte'
 
 const app = mount(App, {
   target: document.getElementById('app')!,

+ 1 - 1
src/control/search.js → src/search.js

@@ -1,5 +1,5 @@
 import { writable } from 'svelte/store';
-import { getCardDb} from '../data/cardDb';
+import { getCardDb } from './card_db';
 
 let showingCards = writable([]);
 let resultCards = [];