mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: fix build errors
This commit is contained in:
1 parent
1608b4b9aa
commit
7f96f602ce
11 files changed
+22
-16
No files matched your search
@@ -29,6 +29,7 @@ export const config = {
|
||||
theme: {
|
||||
// eslint-disable-next-line no-template-curly-in-string
|
||||
path: `${UiContext.cdn_prefix}vditor/dist/css/content-theme`,
|
||||
current: 'light',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -44,6 +44,7 @@ const endpoint = url.toString().replace('http', 'ws');
|
||||
|
||||
const initWorkerMode = () => {
|
||||
console.log('Messages: using SharedWorker');
|
||||
// @ts-ignore
|
||||
const worker = new SharedWorker(new URL('./worker?inline', import.meta.url), { name: 'HydroMessagesWorker' });
|
||||
worker.port.start();
|
||||
window.addEventListener('beforeunload', () => {
|
||||
|
||||
@@ -83,9 +83,9 @@ function ExtraFilesConfig() {
|
||||
|
||||
function LangConfig() {
|
||||
const langs = useSelector((state: RootState) => state.config.langs) || [];
|
||||
const prefixes = new Set(Object.keys(LANGS).filter((i) => i.includes('.')).map((i) => i.split('.')[0]));
|
||||
const data = Object.keys(LANGS).filter((i) => !prefixes.has(i))
|
||||
.map((i) => ({ name: LANGS[i].display, _id: i }));
|
||||
const prefixes = new Set(Object.keys(window.LANGS).filter((i) => i.includes('.')).map((i) => i.split('.')[0]));
|
||||
const data = Object.keys(window.LANGS).filter((i) => !prefixes.has(i))
|
||||
.map((i) => ({ name: window.LANGS[i].display, _id: i }));
|
||||
const dispatch = useDispatch();
|
||||
const ref = React.useRef<any>();
|
||||
const selectedKeys = langs.filter((i) => !prefixes.has(i));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Card, NumericInput, Tag } from '@blueprintjs/core';
|
||||
import { parseMemoryMB, parseTimeMS } from '@hydrooj/utils/lib/common';
|
||||
import { SubtaskConfig } from 'hydrooj/src/interface';
|
||||
import type { SubtaskConfig } from 'hydrooj/src/interface';
|
||||
import { isEqual, pick } from 'lodash';
|
||||
import React from 'react';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
|
||||
Reference in new issue
Block a user