mirror of
https://github.com/9ParsonsB/Pulsar.git
synced 2025-07-04 01:23:42 -04:00
Add Shipyard & Fix ShipLocker
Update File handling Update Journal handling Update README.md
This commit is contained in:
@ -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 });
|
||||
|
@ -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 });
|
||||
|
@ -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 });
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user