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

@@ -1,7 +1,7 @@
import { ref } from 'vue';
import { DriveFile } from 'misskey-js/built/entities';
import * as os from '@/os';
import { stream } from '@/stream';
import { useStream } from '@/stream';
import { i18n } from '@/i18n';
import { defaultStore } from '@/store';
import { uploadFile } from '@/scripts/upload';
@@ -51,7 +51,7 @@ export function chooseFileFromUrl(): Promise<DriveFile> {
const marker = Math.random().toString(); // TODO: UUIDとか使う
const connection = stream.useChannel('main');
const connection = useStream().useChannel('main');
connection.on('urlUploadFinished', urlResponse => {
if (urlResponse.marker === marker) {
res(urlResponse.file);