Move Components to new Directory
This commit is contained in:
parent
4eef07de01
commit
8da05a33cb
19 changed files with 20 additions and 23 deletions
|
@ -1,2 +0,0 @@
|
|||
export const apiBaseUrl = 'https://wip.chellaris.net/api';
|
||||
export const MACHINE_GROUP_ID = 12;
|
2
src/lib/components_custom/consts.ts
Normal file
2
src/lib/components_custom/consts.ts
Normal file
|
@ -0,0 +1,2 @@
|
|||
export const apiBaseUrl = 'https://www.chellaris.net/api';
|
||||
export const MACHINE_GROUP_ID = 12;
|
|
@ -5,7 +5,7 @@
|
|||
import { browser } from '$app/environment';
|
||||
import { writable } from 'svelte/store';
|
||||
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 Header from './Header.svelte';
|
||||
import Settings from './Settings.svelte';
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
<script lang="ts">
|
||||
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 { getModalStore } from "@skeletonlabs/skeleton";
|
||||
import { fade, slide } from "svelte/transition";
|
||||
|
||||
const modalStore = getModalStore();
|
||||
|
||||
let showAuthSaved = false;
|
||||
let showPlaceholder = true;
|
||||
|
||||
|
@ -32,7 +29,7 @@
|
|||
const handleSubmit = () => {
|
||||
console.log("submitted ", gameGroupSettings);
|
||||
document.cookie = "authToken=" + authToken;
|
||||
modalStore.close();
|
||||
// somehow close the modal
|
||||
}
|
||||
|
||||
let gameGroupSettings: [] = [];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { apiBaseUrl } from "$lib/components/consts";
|
||||
import { apiBaseUrl } from "$lib/components_custom/consts";
|
||||
import { redirect } from "@sveltejs/kit";
|
||||
|
||||
export async function load({ cookies }) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts">
|
||||
import { browser } from '$app/environment';
|
||||
import LoadingSpinnerLocal from '$lib/components/LoadingSpinnerLocal.svelte';
|
||||
import { apiBaseUrl } from '$lib/components/consts';
|
||||
import LoadingSpinnerLocal from '$lib/components_custom/LoadingSpinnerLocal.svelte';
|
||||
import { apiBaseUrl } from '$lib/components_custom/consts';
|
||||
import AuthTokenStore from '$lib/stores/AuthTokenStore';
|
||||
import AdminSelectedEmpireStore from '$lib/stores/admin-page/EmpireStore';
|
||||
import AdminSelectedGameStore from '$lib/stores/admin-page/GameStore';
|
||||
|
|
|
@ -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 AdminSelectedGameStore from "$lib/stores/admin-page/GameStore";
|
||||
import type { ChellarisGameInfo } from "$lib/types/chellaris";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts">
|
||||
import DropDown from '$lib/components/DropDown.svelte';
|
||||
import DropDownElement from '$lib/components/DropDownElement.svelte';
|
||||
import { MACHINE_GROUP_ID, apiBaseUrl } from '$lib/components/consts';
|
||||
import DropDown from '$lib/components_custom/DropDown.svelte';
|
||||
import DropDownElement from '$lib/components_custom/DropDownElement.svelte';
|
||||
import { MACHINE_GROUP_ID, apiBaseUrl } from '$lib/components_custom/consts';
|
||||
import { LeanChellarisDataStore } from '$lib/stores/ChellarisData';
|
||||
import type { ChellarisEmpire, ChellarisGameGroup } from '$lib/types/chellaris';
|
||||
import type { EmpireEthic } from '$lib/types/stellaris';
|
||||
|
|
|
@ -4,7 +4,7 @@ import SelectedGameGroupsStore, { type SelectedChellarisGroups } from "$lib/stor
|
|||
import GraphsTabStore from '$lib/stores/GraphsTab';
|
||||
import type { LayoutLoad } from "../../../../.svelte-kit/types/src/routes";
|
||||
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 }) => {
|
||||
let store: string | null;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts">
|
||||
import DropDown from '$lib/components/DropDown.svelte';
|
||||
import DropDownElement from '$lib/components/DropDownElement.svelte';
|
||||
import DropDown from '$lib/components_custom/DropDown.svelte';
|
||||
import DropDownElement from '$lib/components_custom/DropDownElement.svelte';
|
||||
import SelectedGameGroupsStore from '$lib/stores/GameGroupFilter';
|
||||
import SelectedGameStore from '$lib/stores/GameFilter';
|
||||
import ChellarisDataStore from '$lib/stores/ChellarisData';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts">
|
||||
import DropDown from '$lib/components/DropDown.svelte';
|
||||
import DropDownElement from '$lib/components/DropDownElement.svelte';
|
||||
import DropDown from '$lib/components_custom/DropDown.svelte';
|
||||
import DropDownElement from '$lib/components_custom/DropDownElement.svelte';
|
||||
import SelectedGameStore from '$lib/stores/GameFilter';
|
||||
import ChellarisDataStore from '$lib/stores/ChellarisData';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import type { ChellarisGameGroup, ChellarisInfo, ChellarisEmpire, ChellarisGame } from '$lib/types/chellaris';
|
||||
import ChellarisDataStore from '$lib/stores/ChellarisData';
|
||||
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];
|
||||
$: selectedGameGroupData = $SelectedGameGroupsStore[$SelectedGameStore];
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import EthicsBar from './EthicsBar.svelte';
|
||||
import PopsPie from './PopsPie.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 { fade } from 'svelte/transition';
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
export const load: PageLoad = async ({ fetch }) => {
|
||||
|
|
Reference in a new issue