2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-07-03 17:13:43 -04:00

Add Shipyard & Fix ShipLocker

Update File handling
Update Journal handling
Update README.md
This commit is contained in:
2024-05-10 22:26:44 +10:00
parent bc958e7679
commit 235cb2401a
17 changed files with 255 additions and 530 deletions

View File

@ -1,14 +1,13 @@
<script lang="ts">
import axios from "axios";
import { useQuery, useQueryClient } from "@sveltestack/svelte-query";
const queryClient = useQueryClient();
const getData = async () => {
const response = await axios.get(
const response = await fetch(
"http://localhost:5000/api/journal/",
);
return response.data;
return response.json()
};
const query = useQuery("journal", getData, { staleTime: Infinity });

View File

@ -1,12 +1,11 @@
<script lang="ts">
import axios from "axios";
import { useQuery, useQueryClient } from "@sveltestack/svelte-query";
const queryClient = useQueryClient();
const getData = async () => {
const response = await axios.get("http://localhost:5000/api/journal/");
return response.data;
const response = await fetch("http://localhost:5000/api/journal/");
return response.json();
};
const query = useQuery("journal", getData, { staleTime: Infinity });

View File

@ -1,14 +1,13 @@
<script lang="ts">
import axios from "axios";
import { useQuery, useQueryClient } from "@sveltestack/svelte-query";
const queryClient = useQueryClient();
const getData = async () => {
const response = await axios.get(
const response = await fetch(
"http://localhost:5000/api/modulesinfo/",
);
return response.data;
return response.json();
};
const query = useQuery("modulesinfo", getData, { staleTime: Infinity });

View File

@ -1,9 +1,7 @@
<script lang="ts">
import * as signalR from "@microsoft/signalr"
import {onMount} from "svelte";
import axios from "axios";
import { useQueryClient } from "@sveltestack/svelte-query";
import { text } from "@sveltejs/kit";
let x: string | null = $state(null);
let textarea = $state("");
@ -38,7 +36,7 @@
let status: Welcome | null = $state(null);
const connection = new signalR.HubConnectionBuilder()
.withUrl("http://172.31.0.111:5000/api/events")
.withUrl("http://localhost:5000/api/events")
.configureLogging(signalR.LogLevel.Information)
.build();
@ -59,8 +57,8 @@
});
const getStatus = async () => {
var response = await axios.get("http://172.31.0.111:5000/api/status/");
status = response.data as Welcome;
const response = await fetch("http://localhost:5000/api/status/");
status = await response.json() as Welcome
textarea = status.event;
};
</script>

View File

@ -10,7 +10,7 @@
<nav>
<ul>
<li><a href="/">Dashboard</a></li>
<li><a href="/settings">Settings</a></li>
<!--<li><a href="/settings">Settings</a></li>-->
</ul>
</nav>
</header>