From 4d241bc03d3ee31baf0a508fea954a63a8670fe9 Mon Sep 17 00:00:00 2001 From: he3als <65787561+he3als@users.noreply.github.com> Date: Fri, 18 Oct 2024 20:18:14 +0100 Subject: [PATCH] fix(frontend): typos --- .../src/components/ui/servers/ServerStats.vue | 10 +++++----- .../manage/[id]/options/preferences.vue | 18 +++++++++--------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/apps/frontend/src/components/ui/servers/ServerStats.vue b/apps/frontend/src/components/ui/servers/ServerStats.vue index 99208752e..03646712d 100644 --- a/apps/frontend/src/components/ui/servers/ServerStats.vue +++ b/apps/frontend/src/components/ui/servers/ServerStats.vue @@ -70,7 +70,7 @@ import WarningIcon from "~/assets/images/utils/issues.svg?component"; const route = useNativeRoute(); const serverId = route.params.id; -const userPrefrences = useStorage(`pyro-server-${serverId}-preferences`, { +const userPreferences = useStorage(`pyro-server-${serverId}-preferences`, { ramAsNumber: false, autoRestart: false, backupWhileRunning: false, @@ -114,7 +114,7 @@ const metrics = ref([ { title: "Memory usage", value: "0%", - max: userPrefrences.value.ramAsNumber + max: userPreferences.value.ramAsNumber ? formatBytes(props.data.current.ram_total_bytes) : "100%", icon: markRaw(DBIcon), @@ -125,7 +125,7 @@ const metrics = ref([ const updateMetrics = () => { console.log(props.data.current.ram_usage_bytes); metrics.value = metrics.value.map((metric, index) => { - if (userPrefrences.value.ramAsNumber && index === 1) { + if (userPreferences.value.ramAsNumber && index === 1) { return { ...metric, value: formatBytes(props.data.current.ram_usage_bytes), @@ -171,7 +171,7 @@ const getPotentialWarning = (metric: (typeof metrics.value)[0]) => { }) .join(" "); let data = metric.data.at(-1) || 0; - if (userPrefrences.value.ramAsNumber) { + if (userPreferences.value.ramAsNumber) { data = (props.data.current.ram_usage_bytes / props.data.current.ram_total_bytes) * 100; } switch (true) { @@ -185,7 +185,7 @@ const getPotentialWarning = (metric: (typeof metrics.value)[0]) => { const generateOptions = (metric: (typeof metrics.value)[0]) => { let color = "var(--color-brand)"; let data = metric.data.at(-1) || 0; - if (userPrefrences.value.ramAsNumber) { + if (userPreferences.value.ramAsNumber) { data = (props.data.current.ram_usage_bytes / props.data.current.ram_total_bytes) * 100; } switch (true) { diff --git a/apps/frontend/src/pages/servers/manage/[id]/options/preferences.vue b/apps/frontend/src/pages/servers/manage/[id]/options/preferences.vue index 7c5373e00..a7ce767f7 100644 --- a/apps/frontend/src/pages/servers/manage/[id]/options/preferences.vue +++ b/apps/frontend/src/pages/servers/manage/[id]/options/preferences.vue @@ -2,12 +2,12 @@