mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
bug fixes
This commit is contained in:
11 files changed
+61
-16
No files matched your search
@@ -4,12 +4,12 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "react.yaml",
|
"main": "react.yaml",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@stylistic/eslint-plugin": "^2.8.0",
|
"@stylistic/eslint-plugin": "^2.9.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.8.0",
|
"@typescript-eslint/eslint-plugin": "^8.8.0",
|
||||||
"@typescript-eslint/parser": "^8.8.0",
|
"@typescript-eslint/parser": "^8.8.0",
|
||||||
"eslint-config-airbnb": "^19.0.4",
|
"eslint-config-airbnb": "^19.0.4",
|
||||||
"eslint-plugin-github": "^5.0.2",
|
"eslint-plugin-github": "^5.0.2",
|
||||||
"eslint-plugin-import": "2.30.0",
|
"eslint-plugin-import": "2.31.0",
|
||||||
"eslint-plugin-jsx-a11y": "^6.10.0",
|
"eslint-plugin-jsx-a11y": "^6.10.0",
|
||||||
"eslint-plugin-react": "^7.37.1",
|
"eslint-plugin-react": "^7.37.1",
|
||||||
"eslint-plugin-react-hooks": "^4.6.2",
|
"eslint-plugin-react-hooks": "^4.6.2",
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
"@types/koa": "^2.15.0",
|
"@types/koa": "^2.15.0",
|
||||||
"@types/koa-compress": "^4.0.6",
|
"@types/koa-compress": "^4.0.6",
|
||||||
"@types/koa-router": "^7.4.8",
|
"@types/koa-router": "^7.4.8",
|
||||||
"@types/lodash": "^4.17.9",
|
"@types/lodash": "^4.17.10",
|
||||||
"@types/saslprep": "^1.0.3",
|
"@types/saslprep": "^1.0.3",
|
||||||
"@types/ws": "^8.5.12"
|
"@types/ws": "^8.5.12"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,6 +62,7 @@
|
|||||||
"wtfnode": "^0.9.3"
|
"wtfnode": "^0.9.3"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
|
"cosmokit": "1.6.3",
|
||||||
"monaco-editor": "0.50.0"
|
"monaco-editor": "0.50.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -235,6 +235,7 @@ Domain {0} not found.: 그룹 {0} 없음
|
|||||||
Domain ID cannot be changed once the domain is created.: 그룹 ID는 수정할 수 없습니다.
|
Domain ID cannot be changed once the domain is created.: 그룹 ID는 수정할 수 없습니다.
|
||||||
Domain ID: 그룹 ID
|
Domain ID: 그룹 ID
|
||||||
Domain Settings: 그룹 설정
|
Domain Settings: 그룹 설정
|
||||||
|
domain_create: 그룹 생성
|
||||||
domain_dashboard: 그룹 게시판
|
domain_dashboard: 그룹 게시판
|
||||||
domain_discussion: 그룹 토론
|
domain_discussion: 그룹 토론
|
||||||
domain_edit: 그룹 수정
|
domain_edit: 그룹 수정
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ Domain {0} already exists.: 域 {0} 已經存在。
|
|||||||
Domain {0} is bulit-in and cannot be modified.: 域 {0} 為內建,不可修改。
|
Domain {0} is bulit-in and cannot be modified.: 域 {0} 為內建,不可修改。
|
||||||
Domain {0} not found.: 域 {0} 不存在。
|
Domain {0} not found.: 域 {0} 不存在。
|
||||||
Domain ID cannot be changed once the domain is created.: 在創建後不能更改 ID。
|
Domain ID cannot be changed once the domain is created.: 在創建後不能更改 ID。
|
||||||
|
domain_create: 創建域
|
||||||
domain_main: 首頁
|
domain_main: 首頁
|
||||||
Don't have an account?: 還沒有賬戶?
|
Don't have an account?: 還沒有賬戶?
|
||||||
Done: 已結束
|
Done: 已結束
|
||||||
|
|||||||
@@ -12,10 +12,10 @@
|
|||||||
},
|
},
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-s3": "3.664.0",
|
"@aws-sdk/client-s3": "3.665.0",
|
||||||
"@aws-sdk/lib-storage": "3.664.0",
|
"@aws-sdk/lib-storage": "3.665.0",
|
||||||
"@aws-sdk/s3-presigned-post": "3.664.0",
|
"@aws-sdk/s3-presigned-post": "3.665.0",
|
||||||
"@aws-sdk/s3-request-presigner": "3.664.0",
|
"@aws-sdk/s3-request-presigner": "3.665.0",
|
||||||
"@graphql-tools/schema": "^10.0.6",
|
"@graphql-tools/schema": "^10.0.6",
|
||||||
"@hydrooj/framework": "workspace:^",
|
"@hydrooj/framework": "workspace:^",
|
||||||
"@hydrooj/utils": "workspace:^",
|
"@hydrooj/utils": "workspace:^",
|
||||||
|
|||||||
@@ -87,6 +87,8 @@ export function register(cli: CAC) {
|
|||||||
src: _src,
|
src: _src,
|
||||||
lastUpdate: Date.now(),
|
lastUpdate: Date.now(),
|
||||||
}));
|
}));
|
||||||
|
logger.success(`Successfully installed ${_src}.`);
|
||||||
|
logger.info('Please restart Hydro to apply changes.');
|
||||||
});
|
});
|
||||||
cli.command('uninstall [package]').action(async (name) => {
|
cli.command('uninstall [package]').action(async (name) => {
|
||||||
if (!name) {
|
if (!name) {
|
||||||
|
|||||||
@@ -60,9 +60,14 @@ declare module '../../context' {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let scratchpad: ScratchpadService;
|
||||||
|
|
||||||
export default function ScratchpadContainer() {
|
export default function ScratchpadContainer() {
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
ctx.set('scratchpad', new ScratchpadService(store));
|
if (!scratchpad) {
|
||||||
|
scratchpad = new ScratchpadService(store);
|
||||||
|
ctx.set('scratchpad', scratchpad);
|
||||||
|
}
|
||||||
const [, updateState] = React.useState<any>();
|
const [, updateState] = React.useState<any>();
|
||||||
const forceUpdate = React.useCallback(() => updateState({}), []);
|
const forceUpdate = React.useCallback(() => updateState({}), []);
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ export default async function load(name: string) {
|
|||||||
if (lazyModules[name]) return lazyModules[name];
|
if (lazyModules[name]) return lazyModules[name];
|
||||||
const tag = document.createElement('script');
|
const tag = document.createElement('script');
|
||||||
tag.src = `/lazy/${window.lazyloadMetadata[`${name}.lazy.js`]}/${name}.lazy.js`;
|
tag.src = `/lazy/${window.lazyloadMetadata[`${name}.lazy.js`]}/${name}.lazy.js`;
|
||||||
|
console.log('loading module: ', name);
|
||||||
lazyModules[name] = new Promise((resolve, reject) => {
|
lazyModules[name] = new Promise((resolve, reject) => {
|
||||||
tag.onerror = reject;
|
tag.onerror = reject;
|
||||||
const timeout = setTimeout(reject, 30000);
|
const timeout = setTimeout(reject, 30000);
|
||||||
@@ -19,16 +20,50 @@ export default async function load(name: string) {
|
|||||||
document.body.appendChild(tag);
|
document.body.appendChild(tag);
|
||||||
return lazyModules[name];
|
return lazyModules[name];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const val: Record<string, any> = {};
|
||||||
|
/** @deprecated */
|
||||||
|
async function legacyLoadExternalModule(target: string) {
|
||||||
|
if (val[target]) return val[target];
|
||||||
|
const ele = document.createElement('script');
|
||||||
|
ele.src = target;
|
||||||
|
await new Promise((resolve, reject) => {
|
||||||
|
ele.onload = resolve;
|
||||||
|
ele.onerror = reject;
|
||||||
|
document.head.appendChild(ele);
|
||||||
|
});
|
||||||
|
val[target] = window.exports;
|
||||||
|
return val[target];
|
||||||
|
}
|
||||||
|
|
||||||
export { load };
|
export { load };
|
||||||
export async function getFeatures(name: string) {
|
export async function getFeatures(name: string) {
|
||||||
const legacy = Object.keys(window.externalModules).filter((i) => i === name || i.startsWith(`${name}@`))
|
const legacy = Object.keys(window.externalModules).filter((i) => i === name || i.startsWith(`${name}@`))
|
||||||
.map((i) => window.externalModules[i]);
|
.map((i) => window.externalModules[i]);
|
||||||
const c = Object.keys(features).filter((i) => i === name || i.startsWith(`${name}@`))
|
const c = Object.keys(features).filter((i) => i === name || i.startsWith(`${name}@`))
|
||||||
.map((i) => features[i]);
|
.map((i) => features[i]);
|
||||||
console.log(legacy, c, features);
|
console.log('query features for:', name, 'legacy:', legacy, 'selected:', c, 'all:', features);
|
||||||
return c.concat(legacy);
|
return c.concat(legacy);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function provideFeature(name: string, content: string | (() => Promise<any>)) {
|
export const loaded = [];
|
||||||
features[name] = content;
|
export async function loadFeatures(name: string, ...args: any[]) {
|
||||||
|
if (loaded.includes(name)) return;
|
||||||
|
loaded.push(name);
|
||||||
|
for (const item of await getFeatures(name)) {
|
||||||
|
let apply = typeof item === 'function'
|
||||||
|
? item
|
||||||
|
: (item.startsWith('http') || item.startsWith('/'))
|
||||||
|
? await legacyLoadExternalModule(item)
|
||||||
|
: (await load(item)).apply;
|
||||||
|
if (typeof apply !== 'function') apply = apply.default || apply.apply;
|
||||||
|
if (typeof apply === 'function') await apply(...args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function provideFeature(name: string, content: string | (() => Promise<any>)) {
|
||||||
|
console.debug('Providing feature', name);
|
||||||
|
if (features[name]) console.warn('Feature', name, 'already provided');
|
||||||
|
features[name] = content;
|
||||||
|
if (loaded.includes(name)) console.warn('Feature', name, 'already loaded');
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
"cli": false
|
"cli": false
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blueprintjs/core": "^5.13.0",
|
"@blueprintjs/core": "^5.13.1",
|
||||||
"@cordisjs/core": "3.18.1",
|
"@cordisjs/core": "3.18.1",
|
||||||
"@fontsource/dm-mono": "^5.1.0",
|
"@fontsource/dm-mono": "^5.1.0",
|
||||||
"@fontsource/fira-code": "^5.1.0",
|
"@fontsource/fira-code": "^5.1.0",
|
||||||
@@ -25,8 +25,8 @@
|
|||||||
"@fontsource/source-code-pro": "^5.1.0",
|
"@fontsource/source-code-pro": "^5.1.0",
|
||||||
"@fontsource/ubuntu-mono": "^5.1.0",
|
"@fontsource/ubuntu-mono": "^5.1.0",
|
||||||
"@hydrooj/utils": "workspace:^",
|
"@hydrooj/utils": "workspace:^",
|
||||||
"@sentry/browser": "^8.32.0",
|
"@sentry/browser": "^8.33.1",
|
||||||
"@sentry/webpack-plugin": "^2.22.4",
|
"@sentry/webpack-plugin": "^2.22.5",
|
||||||
"@simplewebauthn/browser": "9.0.1",
|
"@simplewebauthn/browser": "9.0.1",
|
||||||
"@svgr/webpack": "^8.1.0",
|
"@svgr/webpack": "^8.1.0",
|
||||||
"@types/jquery": "^3.5.31",
|
"@types/jquery": "^3.5.31",
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
"@types/nunjucks": "^3.2.6",
|
"@types/nunjucks": "^3.2.6",
|
||||||
"@types/pickadate": "^3.5.35",
|
"@types/pickadate": "^3.5.35",
|
||||||
"@types/qrcode": "^1.5.5",
|
"@types/qrcode": "^1.5.5",
|
||||||
"@types/react": "^18.3.10",
|
"@types/react": "^18.3.11",
|
||||||
"@types/react-dom": "^18.3.0",
|
"@types/react-dom": "^18.3.0",
|
||||||
"@types/redux-logger": "^3.0.13",
|
"@types/redux-logger": "^3.0.13",
|
||||||
"@types/uuid": "^10.0.0",
|
"@types/uuid": "^10.0.0",
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"moment-timezone": "^0.5.45",
|
"moment-timezone": "^0.5.45",
|
||||||
"mongodb": "^5.9.2",
|
"mongodb": "^5.9.2",
|
||||||
"reggol": "^1.7.0",
|
"reggol": "^1.7.1",
|
||||||
"search-query-parser": "^1.6.0",
|
"search-query-parser": "^1.6.0",
|
||||||
"systeminformation": "^5.23.5"
|
"systeminformation": "^5.23.5"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user