mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
upgrade to cordis v3 (#733)
Co-authored-by: panda <panda_dtdyy@outlook.com>
This commit is contained in:
1 parent
498cd57016
commit
a56b1650be
33 files changed
+301
-262
No files matched your search
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import VjNotification from 'vj/components/notification';
|
||||
import selectUser from 'vj/components/selectUser';
|
||||
import { Context, ctx, Service } from 'vj/context';
|
||||
import { ctx, Service } from 'vj/context';
|
||||
import { NamedPage } from 'vj/misc/Page';
|
||||
import { api, gql, loadReactRedux } from 'vj/utils';
|
||||
|
||||
@@ -12,7 +12,7 @@ class MessagePadService extends Service {
|
||||
super(ctx, 'messagepad', true);
|
||||
}
|
||||
}
|
||||
Context.service('messagepad', MessagePadService);
|
||||
|
||||
declare module '../context' {
|
||||
interface Context {
|
||||
messagepad: MessagePadService;
|
||||
@@ -43,6 +43,7 @@ const page = new NamedPage('home_messages', () => {
|
||||
|
||||
reduxStore = store;
|
||||
(window as any).store = reduxStore;
|
||||
ctx.provide('messagepad');
|
||||
ctx.messagepad = new MessagePadService(store, WebSocket);
|
||||
|
||||
const sock = new WebSocket(`${UiContext.ws_prefix}home/messages-conn`);
|
||||
|
||||
Reference in new issue
Block a user