Move Components to new Directory

This commit is contained in:
Neshura 2023-12-06 21:00:13 +01:00
parent 4eef07de01
commit 8da05a33cb
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C
19 changed files with 20 additions and 23 deletions

View file

@ -1,2 +0,0 @@
export const apiBaseUrl = 'https://wip.chellaris.net/api';
export const MACHINE_GROUP_ID = 12;

View file

@ -0,0 +1,2 @@
export const apiBaseUrl = 'https://www.chellaris.net/api';
export const MACHINE_GROUP_ID = 12;

View file

@ -5,7 +5,7 @@
import { browser } from '$app/environment'; import { browser } from '$app/environment';
import { writable } from 'svelte/store'; import { writable } from 'svelte/store';
import { themes } from '$lib/types/themes' import { themes } from '$lib/types/themes'
import { apiBaseUrl } from '$lib/components/consts'; import { apiBaseUrl } from '$lib/components_custom/consts';
import { LeanChellarisDataStore } from '$lib/stores/ChellarisData'; import { LeanChellarisDataStore } from '$lib/stores/ChellarisData';
import Header from './Header.svelte'; import Header from './Header.svelte';
import Settings from './Settings.svelte'; import Settings from './Settings.svelte';

View file

@ -1,12 +1,9 @@
<script lang="ts"> <script lang="ts">
import { browser } from "$app/environment"; import { browser } from "$app/environment";
import Button from "$lib/components/Button.svelte"; import Button from "$lib/components_custom/Button.svelte";
import AuthTokenStore from "$lib/stores/AuthTokenStore"; import AuthTokenStore from "$lib/stores/AuthTokenStore";
import { getModalStore } from "@skeletonlabs/skeleton";
import { fade, slide } from "svelte/transition"; import { fade, slide } from "svelte/transition";
const modalStore = getModalStore();
let showAuthSaved = false; let showAuthSaved = false;
let showPlaceholder = true; let showPlaceholder = true;
@ -32,7 +29,7 @@
const handleSubmit = () => { const handleSubmit = () => {
console.log("submitted ", gameGroupSettings); console.log("submitted ", gameGroupSettings);
document.cookie = "authToken=" + authToken; document.cookie = "authToken=" + authToken;
modalStore.close(); // somehow close the modal
} }
let gameGroupSettings: [] = []; let gameGroupSettings: [] = [];

View file

@ -1,4 +1,4 @@
import { apiBaseUrl } from "$lib/components/consts"; import { apiBaseUrl } from "$lib/components_custom/consts";
import { redirect } from "@sveltejs/kit"; import { redirect } from "@sveltejs/kit";
export async function load({ cookies }) { export async function load({ cookies }) {

View file

@ -1,7 +1,7 @@
<script lang="ts"> <script lang="ts">
import { browser } from '$app/environment'; import { browser } from '$app/environment';
import LoadingSpinnerLocal from '$lib/components/LoadingSpinnerLocal.svelte'; import LoadingSpinnerLocal from '$lib/components_custom/LoadingSpinnerLocal.svelte';
import { apiBaseUrl } from '$lib/components/consts'; import { apiBaseUrl } from '$lib/components_custom/consts';
import AuthTokenStore from '$lib/stores/AuthTokenStore'; import AuthTokenStore from '$lib/stores/AuthTokenStore';
import AdminSelectedEmpireStore from '$lib/stores/admin-page/EmpireStore'; import AdminSelectedEmpireStore from '$lib/stores/admin-page/EmpireStore';
import AdminSelectedGameStore from '$lib/stores/admin-page/GameStore'; import AdminSelectedGameStore from '$lib/stores/admin-page/GameStore';

View file

@ -1,4 +1,4 @@
import { apiBaseUrl } from "$lib/components/consts"; import { apiBaseUrl } from "$lib/components_custom/consts";
import AdminSelectedEmpireStore from "$lib/stores/admin-page/EmpireStore"; import AdminSelectedEmpireStore from "$lib/stores/admin-page/EmpireStore";
import AdminSelectedGameStore from "$lib/stores/admin-page/GameStore"; import AdminSelectedGameStore from "$lib/stores/admin-page/GameStore";
import type { ChellarisGameInfo } from "$lib/types/chellaris"; import type { ChellarisGameInfo } from "$lib/types/chellaris";

View file

@ -1,7 +1,7 @@
<script lang="ts"> <script lang="ts">
import DropDown from '$lib/components/DropDown.svelte'; import DropDown from '$lib/components_custom/DropDown.svelte';
import DropDownElement from '$lib/components/DropDownElement.svelte'; import DropDownElement from '$lib/components_custom/DropDownElement.svelte';
import { MACHINE_GROUP_ID, apiBaseUrl } from '$lib/components/consts'; import { MACHINE_GROUP_ID, apiBaseUrl } from '$lib/components_custom/consts';
import { LeanChellarisDataStore } from '$lib/stores/ChellarisData'; import { LeanChellarisDataStore } from '$lib/stores/ChellarisData';
import type { ChellarisEmpire, ChellarisGameGroup } from '$lib/types/chellaris'; import type { ChellarisEmpire, ChellarisGameGroup } from '$lib/types/chellaris';
import type { EmpireEthic } from '$lib/types/stellaris'; import type { EmpireEthic } from '$lib/types/stellaris';

View file

@ -4,7 +4,7 @@ import SelectedGameGroupsStore, { type SelectedChellarisGroups } from "$lib/stor
import GraphsTabStore from '$lib/stores/GraphsTab'; import GraphsTabStore from '$lib/stores/GraphsTab';
import type { LayoutLoad } from "../../../../.svelte-kit/types/src/routes"; import type { LayoutLoad } from "../../../../.svelte-kit/types/src/routes";
import type { ChellarisInfo } from '$lib/types/chellaris'; import type { ChellarisInfo } from '$lib/types/chellaris';
import { apiBaseUrl } from '$lib/components/consts'; import { apiBaseUrl } from '$lib/components_custom/consts';
export const load: LayoutLoad = async ({ fetch }) => { export const load: LayoutLoad = async ({ fetch }) => {
let store: string | null; let store: string | null;

View file

@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import DropDown from '$lib/components/DropDown.svelte'; import DropDown from '$lib/components_custom/DropDown.svelte';
import DropDownElement from '$lib/components/DropDownElement.svelte'; import DropDownElement from '$lib/components_custom/DropDownElement.svelte';
import SelectedGameGroupsStore from '$lib/stores/GameGroupFilter'; import SelectedGameGroupsStore from '$lib/stores/GameGroupFilter';
import SelectedGameStore from '$lib/stores/GameFilter'; import SelectedGameStore from '$lib/stores/GameFilter';
import ChellarisDataStore from '$lib/stores/ChellarisData'; import ChellarisDataStore from '$lib/stores/ChellarisData';

View file

@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import DropDown from '$lib/components/DropDown.svelte'; import DropDown from '$lib/components_custom/DropDown.svelte';
import DropDownElement from '$lib/components/DropDownElement.svelte'; import DropDownElement from '$lib/components_custom/DropDownElement.svelte';
import SelectedGameStore from '$lib/stores/GameFilter'; import SelectedGameStore from '$lib/stores/GameFilter';
import ChellarisDataStore from '$lib/stores/ChellarisData'; import ChellarisDataStore from '$lib/stores/ChellarisData';

View file

@ -4,7 +4,7 @@
import type { ChellarisGameGroup, ChellarisInfo, ChellarisEmpire, ChellarisGame } from '$lib/types/chellaris'; import type { ChellarisGameGroup, ChellarisInfo, ChellarisEmpire, ChellarisGame } from '$lib/types/chellaris';
import ChellarisDataStore from '$lib/stores/ChellarisData'; import ChellarisDataStore from '$lib/stores/ChellarisData';
import GraphsTabStore from '$lib/stores/GraphsTab'; import GraphsTabStore from '$lib/stores/GraphsTab';
import LoadingSpinner from '$lib/components/LoadingSpinner.svelte'; import LoadingSpinner from '$lib/components_custom/LoadingSpinner.svelte';
$: selectedGame = $ChellarisDataStore.games[$SelectedGameStore]; $: selectedGame = $ChellarisDataStore.games[$SelectedGameStore];
$: selectedGameGroupData = $SelectedGameGroupsStore[$SelectedGameStore]; $: selectedGameGroupData = $SelectedGameGroupsStore[$SelectedGameStore];

View file

@ -3,7 +3,7 @@
import EthicsBar from './EthicsBar.svelte'; import EthicsBar from './EthicsBar.svelte';
import PopsPie from './PopsPie.svelte'; import PopsPie from './PopsPie.svelte';
import EmpireStats from './EmpireStats.svelte'; import EmpireStats from './EmpireStats.svelte';
import LoadingSpinner from '$lib/components/LoadingSpinner.svelte'; import LoadingSpinner from '$lib/components_custom/LoadingSpinner.svelte';
import { navigating } from '$app/stores'; import { navigating } from '$app/stores';
import { fade } from 'svelte/transition'; import { fade } from 'svelte/transition';

View file

@ -1,4 +1,4 @@
import { apiBaseUrl } from "$lib/components/consts"; import { apiBaseUrl } from "$lib/components_custom/consts";
import type { PageLoad } from "../../../../.svelte-kit/types/src/routes"; import type { PageLoad } from "../../../../.svelte-kit/types/src/routes";
export const load: PageLoad = async ({ fetch }) => { export const load: PageLoad = async ({ fetch }) => {