@@ -42,7 +42,7 @@ const Server: Component<{ id: string }> = (p) => {
>
- {server()?.name}
+ {server()?.name}
val);
- if (type !== selected().type || id !== selected().id) {
- history.replaceState(
- { id, type },
- "",
- `${selected().type}/${selected().id}`
- );
- setFirstLoad(false);
+ if (!deployments.get(selected().id)) {
+ const id = deployments.ids()![0];
+ set(id, "deployment");
+ } else {
+ const [type, id] = location.pathname.split("/").filter((val) => val);
+ if (type !== selected().type || id !== selected().id) {
+ history.replaceState(
+ { type, id },
+ "",
+ `${selected().type}/${selected().id}`
+ );
+ setFirstLoad(false);
+ }
}
setFirstLoad(false);
} else if (
@@ -69,7 +74,6 @@ export function useSelected({ servers, builds, deployments }: State) {
"",
`${selected().type}/${selected().id}`
);
- setFirstLoad(false);
}
}
setFirstLoad(false);
@@ -123,8 +127,8 @@ export function useBuilds() {
return useCollection(getBuilds);
}
-export function useDeployments(query?: Parameters[0]) {
- return useCollection(() => getDeployments(query));
+export function useDeployments() {
+ return useCollection(getDeployments);
}
export function useUpdates(query?: Parameters[0]) {
diff --git a/frontend/src/style/colors.scss b/frontend/src/style/colors.scss
index 43730e8e5..901104526 100644
--- a/frontend/src/style/colors.scss
+++ b/frontend/src/style/colors.scss
@@ -1,8 +1,8 @@
$app-color: #fceade;
-$lightgrey: #414852;
-$grey: #2c3137;
-$darkgrey: #1c1f23;
+$lightgrey: #3f454d;
+$grey: #25292e;
+$darkgrey: #16181b;
$lightblue: #1c63cd;
$blue: #184e9f;
diff --git a/frontend/src/style/index.scss b/frontend/src/style/index.scss
index 6bb818775..1913ec479 100644
--- a/frontend/src/style/index.scss
+++ b/frontend/src/style/index.scss
@@ -1,9 +1,18 @@
@use "colors" as c;
@import url("https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@300;400;500&display=swap");
+@import url("https://fonts.googleapis.com/css2?family=Work+Sans&display=swap");
+@import url("https://fonts.googleapis.com/css2?family=Ubuntu+Mono&display=swap");
+@import url("https://fonts.googleapis.com/css2?family=Tajawal&display=swap");
body {
margin: 0;
- font-family: "Chakra Petch", sans-serif;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
+ 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
+ sans-serif;
+ // font-family: "Chakra Petch", sans-serif;
+ // font-family: "Work Sans", sans-serif;
+ // font-family: 'Ubuntu Mono', monospace;
+ // font-family: "Tajawal", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
@@ -82,7 +91,6 @@ input::placeholder {
background-color: rgba(c.$grey, 0.8);
}
-
.grey {
background-color: rgba(c.$grey, 0.8);
}
diff --git a/frontend/src/util/query.ts b/frontend/src/util/query.ts
index 7ea9e1215..f630d31e5 100644
--- a/frontend/src/util/query.ts
+++ b/frontend/src/util/query.ts
@@ -39,24 +39,16 @@ export async function getBuildActionState(buildID: string) {
);
}
-export async function addOwnerToBuild(
- buildID: string,
- username: string
-) {
+export async function addOwnerToBuild(buildID: string, username: string) {
return await client.post(`/api/build/${buildID}/${username}`);
}
-export async function removeOwnerFromBuild(
- buildID: string,
- username: string
-) {
+export async function removeOwnerFromBuild(buildID: string, username: string) {
return await client.delete(`/api/build/${buildID}/${username}`);
}
-export async function getDeployments(query?: { serverID?: string }) {
- return await client.get(
- "/api/deployments" + generateQuery(query)
- );
+export async function getDeployments() {
+ return await client.get("/api/deployments");
}
export async function getDeployment(deploymentID: string) {
@@ -107,7 +99,10 @@ export async function addOwnerToServer(serverID: string, username: string) {
return await client.post(`/api/server/${serverID}/${username}`);
}
-export async function removeOwnerFromServer(serverID: string, username: string) {
+export async function removeOwnerFromServer(
+ serverID: string,
+ username: string
+) {
return await client.delete(`/api/server/${serverID}/${username}`);
}