refactor(frontend): boot分割したり副作用減らしたりとか

#10838
This commit is contained in:
syuilo
2023-05-15 19:08:46 +09:00
parent a7ee4aabcb
commit 23f106a0c1
26 changed files with 628 additions and 573 deletions

View File

@@ -33,9 +33,9 @@
import { markRaw, onMounted, onUnmounted, ref } from 'vue';
import XChart from './overview.queue.chart.vue';
import number from '@/filters/number';
import { stream } from '@/stream';
import { useStream } from '@/stream';
const connection = markRaw(stream.useChannel('queueStats'));
const connection = markRaw(useStream().useChannel('queueStats'));
const activeSincePrevTick = ref(0);
const active = ref(0);

View File

@@ -72,7 +72,7 @@ import XRetention from './overview.retention.vue';
import XModerators from './overview.moderators.vue';
import XHeatmap from './overview.heatmap.vue';
import * as os from '@/os';
import { stream } from '@/stream';
import { useStream } from '@/stream';
import { i18n } from '@/i18n';
import { definePageMetadata } from '@/scripts/page-metadata';
import MkFoldableSection from '@/components/MkFoldableSection.vue';
@@ -87,7 +87,7 @@ let federationSubActive = $ref<number | null>(null);
let federationSubActiveDiff = $ref<number | null>(null);
let newUsers = $ref(null);
let activeInstances = $shallowRef(null);
const queueStatsConnection = markRaw(stream.useChannel('queueStats'));
const queueStatsConnection = markRaw(useStream().useChannel('queueStats'));
const now = new Date();
const filesPagination = {
endpoint: 'admin/drive/files' as const,

View File

@@ -47,11 +47,11 @@ import { markRaw, onMounted, onUnmounted, ref } from 'vue';
import XChart from './queue.chart.chart.vue';
import number from '@/filters/number';
import * as os from '@/os';
import { stream } from '@/stream';
import { useStream } from '@/stream';
import { i18n } from '@/i18n';
import MkFolder from '@/components/MkFolder.vue';
const connection = markRaw(stream.useChannel('queueStats'));
const connection = markRaw(useStream().useChannel('queueStats'));
const activeSincePrevTick = ref(0);
const active = ref(0);

View File

@@ -40,7 +40,7 @@ import MkInfo from '@/components/MkInfo.vue';
import * as os from '@/os';
import { ColdDeviceStorage, defaultStore } from '@/store';
import { unisonReload } from '@/scripts/unison-reload';
import { stream } from '@/stream';
import { useStream } from '@/stream';
import { $i } from '@/account';
import { i18n } from '@/i18n';
import { version, host } from '@/config';
@@ -125,7 +125,7 @@ type Profile = {
};
};
const connection = $i && stream.useChannel('main');
const connection = $i && useStream().useChannel('main');
let profiles = $ref<Record<string, Profile> | null>(null);