Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

Commit a88593f

Browse files
authored
Modrinth Servers February Release: Bug Fix Round 1 (modrinth#3267)
* chore(pyroservers): attempt better error propogation Signed-off-by: Evan Song <[email protected]> * chore(pyroservers): introduce deferred modules * fix(pyroservers): synchronize server icon processing Signed-off-by: Evan Song <[email protected]> * refactor: server action buttons Signed-off-by: Evan Song <[email protected]> * chore: bring back skeleton * fix(startup): populate values on refresh Signed-off-by: Evan Song <[email protected]> * chore: properly refresh network Signed-off-by: Evan Song <[email protected]> * fix: do not open backup settings modal if fetch failed * fix(platform): only clear selected loader version if selecting a different loader Signed-off-by: Evan Song <[email protected]> * feat: parse links in console log * fix: attempt to mitigate power button state flash Signed-off-by: Evan Song <[email protected]> * Revert "fix: attempt to mitigate power button state flash" This reverts commit 3ba5c0b. * refactor: error accumulation builder in PyroServersFetch Signed-off-by: Evan Song <[email protected]> * fix: sentence case Signed-off-by: Evan Song <[email protected]> * fix(files): await deferred fs Signed-off-by: Evan Song <[email protected]> * fix: startup border Signed-off-by: Evan Song <[email protected]> * fix: prevent suspended server errors from being overwritten Signed-off-by: Evan Song <[email protected]> * fix: add server id copy button to suspended server listing Signed-off-by: Evan Song <[email protected]> * fix: refresh behavior Signed-off-by: Evan Song <[email protected]> * fix: behavior of server icon in options Signed-off-by: Evan Song <[email protected]> * chore: clean Signed-off-by: Evan Song <[email protected]> * chore: clean Signed-off-by: Evan Song <[email protected]> * fix: prevent error inspector failures from destroying the page Signed-off-by: Evan Song <[email protected]> * chore: clean Signed-off-by: Evan Song <[email protected]> * chore: remove nexttick wrapper Signed-off-by: Evan Song <[email protected]> * fix: ensure file edit gets initted due to deferred module Signed-off-by: Evan Song <[email protected]> * refactor: prevent module errors from breaking the layout * chore: clean Signed-off-by: Evan Song <[email protected]> --------- Signed-off-by: Evan Song <[email protected]>
1 parent 6c4548a commit a88593f

File tree

19 files changed

+1174
-616
lines changed

19 files changed

+1174
-616
lines changed

apps/frontend/src/components/ui/servers/BackupSettingsModal.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ const fetchSettings = async () => {
106106
initialSettings.value = settings as { interval: number; enabled: boolean };
107107
autoBackupEnabled.value = settings?.enabled ?? false;
108108
autoBackupInterval.value = settings?.interval || 6;
109+
return true;
109110
} catch (error) {
110111
console.error("Error fetching backup settings:", error);
111112
addNotification({
@@ -114,6 +115,7 @@ const fetchSettings = async () => {
114115
text: "Failed to load backup settings",
115116
type: "error",
116117
});
118+
return false;
117119
} finally {
118120
isLoadingSettings.value = false;
119121
}
@@ -155,8 +157,10 @@ const saveSettings = async () => {
155157
156158
defineExpose({
157159
show: async () => {
158-
await fetchSettings();
159-
modal.value?.show();
160+
const success = await fetchSettings();
161+
if (success) {
162+
modal.value?.show();
163+
}
160164
},
161165
});
162166
</script>
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<template>
2+
<div
3+
aria-hidden="true"
4+
style="font-variant-numeric: tabular-nums"
5+
class="pointer-events-none h-full w-full select-none"
6+
>
7+
<div class="flex flex-col gap-6">
8+
<div class="flex flex-row items-center gap-6">
9+
<div
10+
class="relative max-h-[156px] min-h-[156px] w-full overflow-hidden rounded-2xl bg-bg-raised p-8"
11+
>
12+
<div class="relative z-10 -ml-3 w-fit rounded-xl px-3 py-1">
13+
<div class="-mb-0.5 mt-0.5 flex flex-row items-center gap-2">
14+
<h2 class="m-0 -ml-0.5 text-3xl font-extrabold text-contrast">0.00%</h2>
15+
<h3 class="relative z-10 text-sm font-normal text-secondary">/ 100%</h3>
16+
</div>
17+
<h3 class="relative z-10 text-base font-normal text-secondary">CPU usage</h3>
18+
</div>
19+
<CPUIcon class="absolute right-10 top-10" />
20+
</div>
21+
<div
22+
class="relative max-h-[156px] min-h-[156px] w-full overflow-hidden rounded-2xl bg-bg-raised p-8"
23+
>
24+
<div class="relative z-10 -ml-3 w-fit rounded-xl px-3 py-1">
25+
<div class="-mb-0.5 mt-0.5 flex flex-row items-center gap-2">
26+
<h2 class="m-0 -ml-0.5 text-3xl font-extrabold text-contrast">0.00%</h2>
27+
<h3 class="relative z-10 text-sm font-normal text-secondary">/ 100%</h3>
28+
</div>
29+
<h3 class="relative z-10 text-base font-normal text-secondary">Memory usage</h3>
30+
</div>
31+
<DBIcon class="absolute right-10 top-10" />
32+
</div>
33+
<div
34+
class="relative isolate min-h-[156px] w-full overflow-hidden rounded-2xl bg-bg-raised p-8 transition-transform duration-100 hover:scale-105 active:scale-100"
35+
>
36+
<div class="flex flex-row items-center gap-2">
37+
<h2 class="m-0 -ml-0.5 mt-1 text-3xl font-extrabold text-contrast">0 B</h2>
38+
</div>
39+
<h3 class="relative z-10 text-base font-normal text-secondary">Storage usage</h3>
40+
<FolderOpenIcon class="absolute right-10 top-10 size-8" />
41+
</div>
42+
</div>
43+
44+
<div
45+
class="relative flex h-full w-full flex-col gap-3 overflow-hidden rounded-2xl bg-bg-raised p-8"
46+
>
47+
<div class="experimental-styles-within flex flex-row items-center">
48+
<div class="flex flex-row items-center gap-4">
49+
<h2 class="m-0 text-3xl font-extrabold text-contrast">Console</h2>
50+
</div>
51+
</div>
52+
<div class="relative w-full">
53+
<input type="text" placeholder="Search logs" class="h-12 !w-full !pl-10 !pr-48" />
54+
<SearchIcon class="absolute left-4 top-1/2 -translate-y-1/2" />
55+
</div>
56+
<div
57+
class="console relative h-full min-h-[516px] w-full overflow-hidden rounded-xl bg-bg text-sm"
58+
></div>
59+
</div>
60+
</div>
61+
</div>
62+
</template>
63+
64+
<script setup lang="ts">
65+
import { CPUIcon, DBIcon, FolderOpenIcon, SearchIcon } from "@modrinth/assets";
66+
</script>
67+
68+
<style scoped>
69+
html.light-mode .console {
70+
background: var(--color-bg);
71+
}
72+
73+
html.dark-mode .console {
74+
background: black;
75+
}
76+
77+
html.oled-mode .console {
78+
background: black;
79+
}
80+
</style>

0 commit comments

Comments
 (0)