enhance: pizzaxでstreamingのuser storage updateイベントを監視して更新 (#8095)
* wip * wip? * ? * streamingのuser storage updateイベントを監視して更新 * 必要な時以外はストレージを更新しない * fix? * wip * fix * fix
This commit is contained in:
@ -49,6 +49,7 @@
|
||||
import { defineComponent, markRaw } from 'vue';
|
||||
import define from './define';
|
||||
import * as os from '@/os';
|
||||
import { stream } from '@/stream';
|
||||
import number from '@/filters/number';
|
||||
import * as sound from '@/scripts/sound';
|
||||
|
||||
@ -70,7 +71,7 @@ export default defineComponent({
|
||||
extends: widget,
|
||||
data() {
|
||||
return {
|
||||
connection: markRaw(os.stream.useChannel('queueStats')),
|
||||
connection: markRaw(stream.useChannel('queueStats')),
|
||||
inbox: {
|
||||
activeSincePrevTick: 0,
|
||||
active: 0,
|
||||
|
@ -20,6 +20,7 @@ import MkContainer from '@/components/ui/container.vue';
|
||||
import define from './define';
|
||||
import { getStaticImageUrl } from '@/scripts/get-static-image-url';
|
||||
import * as os from '@/os';
|
||||
import { stream } from '@/stream';
|
||||
|
||||
const widget = define({
|
||||
name: 'photos',
|
||||
@ -48,7 +49,7 @@ export default defineComponent({
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.connection = markRaw(os.stream.useChannel('main'));
|
||||
this.connection = markRaw(stream.useChannel('main'));
|
||||
|
||||
this.connection.on('driveFileCreated', this.onDriveFileCreated);
|
||||
|
||||
|
@ -23,6 +23,7 @@ import XCpu from './cpu.vue';
|
||||
import XMemory from './mem.vue';
|
||||
import XDisk from './disk.vue';
|
||||
import * as os from '@/os';
|
||||
import { stream } from '@/stream';
|
||||
|
||||
const widget = define({
|
||||
name: 'serverMetric',
|
||||
@ -63,7 +64,7 @@ export default defineComponent({
|
||||
os.api('server-info', {}).then(res => {
|
||||
this.meta = res;
|
||||
});
|
||||
this.connection = markRaw(os.stream.useChannel('serverStats'));
|
||||
this.connection = markRaw(stream.useChannel('serverStats'));
|
||||
},
|
||||
unmounted() {
|
||||
this.connection.dispose();
|
||||
|
Reference in New Issue
Block a user