mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: add hydrooj install command
This commit is contained in:
1 parent
e92cbeb1ee
commit
bf37fb4848
14 files changed
+62
-26
No files matched your search
@@ -9,6 +9,7 @@ export function apply(ctx: Context) {
|
||||
hustoj(ctx);
|
||||
vijos(ctx);
|
||||
syzoj(ctx);
|
||||
|
||||
ctx.provideModule('hash', 'hust', ($password, $saved) => {
|
||||
$password = md5($password);
|
||||
if (RE_MD5.test($saved)) return $password === $saved;
|
||||
@@ -27,4 +28,10 @@ export function apply(ctx: Context) {
|
||||
return `${Buffer.from(uname).toString('base64')}|${mixedSha1}`;
|
||||
});
|
||||
ctx.provideModule('hash', 'syzoj', (password: string) => md5(`${password}syzoj2_xxx`));
|
||||
|
||||
ctx.i18n.load('zh', {
|
||||
'migrate from hustoj': '从 HustOJ 导入',
|
||||
'migrate from vijos': '从 Vijos 导入',
|
||||
'migrate from syzoj': '从 SYZOJ 导入',
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user