diff --git a/packages/client/src/filters/bytes.ts b/packages/client/src/filters/bytes.ts
index 45cd7bfcc..723625932 100644
--- a/packages/client/src/filters/bytes.ts
+++ b/packages/client/src/filters/bytes.ts
@@ -7,7 +7,7 @@ export default (v, digits = 0) => {
const i = Math.floor(Math.log(v) / Math.log(1024));
return (
(isMinus ? "-" : "") +
- (v / Math.pow(1024, i)).toFixed(digits).replace(/\.0+$/, "") +
+ (v / 1024 ** i).toFixed(digits).replace(/\.0+$/, "") +
sizes[i]
);
};
diff --git a/packages/client/src/pages/_empty_.vue b/packages/client/src/pages/_empty_.vue
index 3dee6cd45..3892edbd3 100644
--- a/packages/client/src/pages/_empty_.vue
+++ b/packages/client/src/pages/_empty_.vue
@@ -2,6 +2,4 @@
-
+
diff --git a/packages/client/src/pages/_error_.vue b/packages/client/src/pages/_error_.vue
index 7bc79fdf3..da7cc266e 100644
--- a/packages/client/src/pages/_error_.vue
+++ b/packages/client/src/pages/_error_.vue
@@ -35,9 +35,8 @@
diff --git a/packages/client/src/pages/admin/overview.queue-chart.vue b/packages/client/src/pages/admin/overview.queue-chart.vue
index 1348bde98..4ed66f545 100644
--- a/packages/client/src/pages/admin/overview.queue-chart.vue
+++ b/packages/client/src/pages/admin/overview.queue-chart.vue
@@ -3,7 +3,7 @@
-
-
diff --git a/packages/client/src/pages/admin/overview.queue.chart.vue b/packages/client/src/pages/admin/overview.queue.chart.vue
index 01a0d0ec0..f39315e3e 100644
--- a/packages/client/src/pages/admin/overview.queue.chart.vue
+++ b/packages/client/src/pages/admin/overview.queue.chart.vue
@@ -3,10 +3,8 @@
-
-
diff --git a/packages/client/src/pages/admin/overview.queue.vue b/packages/client/src/pages/admin/overview.queue.vue
index 1084f2e39..bf6a45ee5 100644
--- a/packages/client/src/pages/admin/overview.queue.vue
+++ b/packages/client/src/pages/admin/overview.queue.vue
@@ -45,9 +45,7 @@
import { markRaw, onMounted, onUnmounted, ref, shallowRef } from "vue";
import XChart from "./overview.queue.chart.vue";
import number from "@/filters/number";
-import * as os from "@/os";
import { stream } from "@/stream";
-import { i18n } from "@/i18n";
const connection = markRaw(stream.useChannel("queueStats"));
@@ -55,10 +53,10 @@ const activeSincePrevTick = ref(0);
const active = ref(0);
const delayed = ref(0);
const waiting = ref(0);
-let chartProcess = shallowRef>();
-let chartActive = shallowRef>();
-let chartDelayed = shallowRef>();
-let chartWaiting = shallowRef>();
+const chartProcess = shallowRef>();
+const chartActive = shallowRef>();
+const chartDelayed = shallowRef>();
+const chartWaiting = shallowRef>();
const props = defineProps<{
domain: string;
@@ -70,10 +68,10 @@ const onStats = (stats) => {
delayed.value = stats[props.domain].delayed;
waiting.value = stats[props.domain].waiting;
- chartProcess.value.pushData(stats[props.domain].activeSincePrevTick);
- chartActive.value.pushData(stats[props.domain].active);
- chartDelayed.value.pushData(stats[props.domain].delayed);
- chartWaiting.value.pushData(stats[props.domain].waiting);
+ chartProcess.value?.pushData(stats[props.domain].activeSincePrevTick);
+ chartActive.value?.pushData(stats[props.domain].active);
+ chartDelayed.value?.pushData(stats[props.domain].delayed);
+ chartWaiting.value?.pushData(stats[props.domain].waiting);
};
const onStatsLog = (statsLog) => {
@@ -89,10 +87,10 @@ const onStatsLog = (statsLog) => {
dataWaiting.push(stats[props.domain].waiting);
}
- chartProcess.value.setData(dataProcess);
- chartActive.value.setData(dataActive);
- chartDelayed.value.setData(dataDelayed);
- chartWaiting.value.setData(dataWaiting);
+ chartProcess.value?.setData(dataProcess);
+ chartActive.value?.setData(dataActive);
+ chartDelayed.value?.setData(dataDelayed);
+ chartWaiting.value?.setData(dataWaiting);
};
onMounted(() => {
diff --git a/packages/client/src/pages/admin/overview.stats.vue b/packages/client/src/pages/admin/overview.stats.vue
index de301b0b9..81d90d93e 100644
--- a/packages/client/src/pages/admin/overview.stats.vue
+++ b/packages/client/src/pages/admin/overview.stats.vue
@@ -94,20 +94,18 @@
-
-
diff --git a/packages/client/src/pages/admin/queue.chart.vue b/packages/client/src/pages/admin/queue.chart.vue
index b220201d3..d26605788 100644
--- a/packages/client/src/pages/admin/queue.chart.vue
+++ b/packages/client/src/pages/admin/queue.chart.vue
@@ -72,10 +72,10 @@ const active = ref(0);
const delayed = ref(0);
const waiting = ref(0);
const jobs = ref([]);
-let chartProcess = ref>();
-let chartActive = ref>();
-let chartDelayed = ref>();
-let chartWaiting = ref>();
+const chartProcess = ref>();
+const chartActive = ref>();
+const chartDelayed = ref>();
+const chartWaiting = ref>();
const props = defineProps<{
domain: string;
diff --git a/packages/client/src/pages/admin/queue.vue b/packages/client/src/pages/admin/queue.vue
index 15a6bdcf0..bba49e505 100644
--- a/packages/client/src/pages/admin/queue.vue
+++ b/packages/client/src/pages/admin/queue.vue
@@ -15,34 +15,13 @@
-
-
diff --git a/packages/client/src/pages/channel-editor.vue b/packages/client/src/pages/channel-editor.vue
index 5492dac29..403a791cd 100644
--- a/packages/client/src/pages/channel-editor.vue
+++ b/packages/client/src/pages/channel-editor.vue
@@ -40,7 +40,7 @@
-
-
diff --git a/packages/client/src/pages/channel.vue b/packages/client/src/pages/channel.vue
index 974c77932..086056f85 100644
--- a/packages/client/src/pages/channel.vue
+++ b/packages/client/src/pages/channel.vue
@@ -101,8 +101,7 @@
diff --git a/packages/client/src/pages/explore.users.vue b/packages/client/src/pages/explore.users.vue
index 07403a2ba..a3ec0e317 100644
--- a/packages/client/src/pages/explore.users.vue
+++ b/packages/client/src/pages/explore.users.vue
@@ -145,20 +145,18 @@ import { computed, watch, ref } from "vue";
import XUserList from "@/components/MkUserList.vue";
import MkFolder from "@/components/MkFolder.vue";
import MkTab from "@/components/MkTab.vue";
-import number from "@/filters/number";
import * as os from "@/os";
import { i18n } from "@/i18n";
import { $i } from "@/account";
-import { instance } from "@/instance";
const props = defineProps<{
tag?: string;
}>();
-let origin = ref("local");
-let tagsEl = ref>();
-let tagsLocal = ref([]);
-let tagsRemote = ref([]);
+const origin = ref("local");
+const tagsEl = ref>();
+const tagsLocal = ref([]);
+const tagsRemote = ref([]);
watch(
() => props.tag,
diff --git a/packages/client/src/pages/explore.vue b/packages/client/src/pages/explore.vue
index d68dd5d6a..b858f8437 100644
--- a/packages/client/src/pages/explore.vue
+++ b/packages/client/src/pages/explore.vue
@@ -50,7 +50,7 @@ import "swiper/scss";
import "swiper/scss/virtual";
const tabs = ["users", "featured"];
-let tab = ref(tabs[0]);
+const tab = ref(tabs[0]);
watch(tab, () => syncSlide(tabs.indexOf(tab.value)));
const headerActions = computed(() => []);
diff --git a/packages/client/src/pages/follow-requests.vue b/packages/client/src/pages/follow-requests.vue
index dd323f7b0..762353b80 100644
--- a/packages/client/src/pages/follow-requests.vue
+++ b/packages/client/src/pages/follow-requests.vue
@@ -109,10 +109,6 @@ function reject(user) {
});
}
-const headerActions = computed(() => []);
-
-const headerTabs = computed(() => []);
-
definePageMetadata(
computed(() => ({
title: i18n.ts.followRequests,
diff --git a/packages/client/src/pages/follow.vue b/packages/client/src/pages/follow.vue
index fe8d642a9..fb771fad5 100644
--- a/packages/client/src/pages/follow.vue
+++ b/packages/client/src/pages/follow.vue
@@ -3,7 +3,6 @@
-
-
diff --git a/packages/client/src/pages/my-antennas/edit.vue b/packages/client/src/pages/my-antennas/edit.vue
index 3b64f3f7a..386d21f3c 100644
--- a/packages/client/src/pages/my-antennas/edit.vue
+++ b/packages/client/src/pages/my-antennas/edit.vue
@@ -9,7 +9,7 @@
-
-
diff --git a/packages/client/src/pages/my-antennas/editor.vue b/packages/client/src/pages/my-antennas/editor.vue
index a9e58807c..01a711b3e 100644
--- a/packages/client/src/pages/my-antennas/editor.vue
+++ b/packages/client/src/pages/my-antennas/editor.vue
@@ -134,24 +134,24 @@ const emit = defineEmits<{
(ev: "deleted"): void;
}>();
-let name: string = ref(props.antenna.name);
-let src: string = ref(props.antenna.src);
-let userListId: any = ref(props.antenna.userListId);
-let userGroupId: any = ref(props.antenna.userGroupId);
-let users: string = ref(props.antenna.users.join("\n"));
-let instances: string = ref(props.antenna.instances.join("\n"));
-let keywords: string = ref(
+const name = ref(props.antenna.name);
+const src = ref(props.antenna.src);
+const userListId = ref(props.antenna.userListId);
+const userGroupId = ref(props.antenna.userGroupId);
+const users = ref(props.antenna.users.join("\n"));
+const instances = ref(props.antenna.instances.join("\n"));
+const keywords = ref(
props.antenna.keywords.map((x) => x.join(" ")).join("\n"),
);
-let excludeKeywords: string = ref(
+const excludeKeywords = ref(
props.antenna.excludeKeywords.map((x) => x.join(" ")).join("\n"),
);
-let caseSensitive: boolean = ref(props.antenna.caseSensitive);
-let withReplies: boolean = ref(props.antenna.withReplies);
-let withFile: boolean = ref(props.antenna.withFile);
-let notify: boolean = ref(props.antenna.notify);
-let userLists: any = ref(null);
-let userGroups: any = ref(null);
+const caseSensitive = ref(props.antenna.caseSensitive);
+const withReplies = ref(props.antenna.withReplies);
+const withFile = ref(props.antenna.withFile);
+const notify = ref(props.antenna.notify);
+const userLists = ref(null);
+const userGroups = ref(null);
watch(
() => src.value,
diff --git a/packages/client/src/pages/my-clips/index.vue b/packages/client/src/pages/my-clips/index.vue
index fdfaf509d..428ac6246 100644
--- a/packages/client/src/pages/my-clips/index.vue
+++ b/packages/client/src/pages/my-clips/index.vue
@@ -40,9 +40,7 @@
-
-
diff --git a/packages/client/src/pages/registry.vue b/packages/client/src/pages/registry.vue
index 1da5a56a7..ad409a26c 100644
--- a/packages/client/src/pages/registry.vue
+++ b/packages/client/src/pages/registry.vue
@@ -24,7 +24,7 @@
-
-
diff --git a/packages/client/src/pages/reset-password.vue b/packages/client/src/pages/reset-password.vue
index 4c8de5cd7..c7983ebe5 100644
--- a/packages/client/src/pages/reset-password.vue
+++ b/packages/client/src/pages/reset-password.vue
@@ -42,7 +42,7 @@ const props = defineProps<{
token?: string;
}>();
-let password = ref("");
+const password = ref("");
async function save() {
await os.apiWithDialog("reset-password", {
@@ -75,5 +75,3 @@ definePageMetadata({
icon: "ph-lock ph-bold ph-lg",
});
-
-
diff --git a/packages/client/src/pages/scratchpad.vue b/packages/client/src/pages/scratchpad.vue
index 91a43f150..a63c7f568 100644
--- a/packages/client/src/pages/scratchpad.vue
+++ b/packages/client/src/pages/scratchpad.vue
@@ -37,7 +37,7 @@
-
-
diff --git a/packages/client/src/pages/settings/preferences-backups.vue b/packages/client/src/pages/settings/preferences-backups.vue
index bb37e9aa5..857c3282f 100644
--- a/packages/client/src/pages/settings/preferences-backups.vue
+++ b/packages/client/src/pages/settings/preferences-backups.vue
@@ -161,7 +161,7 @@ type Profile = {
const connection = $i && stream.useChannel("main");
-let profiles = ref | null>(null);
+const profiles = ref | null>(null);
os.api("i/registry/get-all", { scope }).then((res) => {
profiles.value = res || {};
diff --git a/packages/client/src/pages/settings/privacy.vue b/packages/client/src/pages/settings/privacy.vue
index 0d1392355..291b0be2a 100644
--- a/packages/client/src/pages/settings/privacy.vue
+++ b/packages/client/src/pages/settings/privacy.vue
@@ -142,7 +142,6 @@
-
-
diff --git a/packages/client/src/pages/user/following.vue b/packages/client/src/pages/user/following.vue
index ce4a48ebe..46d234e3a 100644
--- a/packages/client/src/pages/user/following.vue
+++ b/packages/client/src/pages/user/following.vue
@@ -16,15 +16,7 @@
-
-
diff --git a/packages/client/src/pages/verify-email.vue b/packages/client/src/pages/verify-email.vue
index 0b9f25608..46b18b613 100644
--- a/packages/client/src/pages/verify-email.vue
+++ b/packages/client/src/pages/verify-email.vue
@@ -5,7 +5,7 @@