ui: replace stupid react-split-pane with allotment

This commit is contained in:
undefined committed 2023-03-01 14:38:43 +08:00
1 parent 6bf35f8f73
commit fe1d964eba
9 files changed
+35 -148

No files matched your search

+1 -3
View File
@@ -8,7 +8,6 @@ export interface Context {
[Context.events]: Events<Context>;
setTimeout: typeof setTimeout;
setInterval: typeof setInterval;
setImmediate: typeof setImmediate;
api: ApiMixin;
}
@@ -37,10 +36,9 @@ const T = <F extends (...args: any[]) => any>(origFunc: F, disposeFunc?) =>
this.caller?.on('dispose', () => (disposeFunc ? disposeFunc(res) : res()));
};
export class ApiMixin extends Service {
static readonly methods = ['addScript', 'setInterval', 'setTimeout', 'setImmediate', 'provideModule', 'inject', 'broadcast'];
static readonly methods = ['setInterval', 'setTimeout'];
setInterval = T(setInterval, clearInterval);
setTimeout = T(setTimeout, clearTimeout);
setImmediate = T(setImmediate, clearImmediate);
constructor(ctx) {
super(ctx, 'api', true);
}