From ba7f4b396f997a146c8ea997f90d9f25a2fc16a4 Mon Sep 17 00:00:00 2001 From: undefined Date: Wed, 12 Apr 2023 18:46:39 +0800 Subject: [PATCH] core: add default import operator --- packages/hydrooj/src/interface.ts | 1 + packages/hydrooj/src/model/problem.ts | 3 ++- .../components/notification/notification.page.styl | 6 ++++++ packages/ui-default/setting.yaml | 6 +----- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/hydrooj/src/interface.ts b/packages/hydrooj/src/interface.ts index 1b8340a90..700fd252b 100644 --- a/packages/hydrooj/src/interface.ts +++ b/packages/hydrooj/src/interface.ts @@ -163,6 +163,7 @@ export enum ProblemType { SubmitAnswer = 'submit_answer', Interactive = 'interactive', Objective = 'objective', + Remote = 'remote_judge', } export enum SubtaskType { diff --git a/packages/hydrooj/src/model/problem.ts b/packages/hydrooj/src/model/problem.ts index e6e5a9460..b0c9bb295 100644 --- a/packages/hydrooj/src/model/problem.ts +++ b/packages/hydrooj/src/model/problem.ts @@ -407,7 +407,7 @@ export class ProblemModel { return true; } - static async import(domainId: string, filepath: string, operator: number) { + static async import(domainId: string, filepath: string, operator = 1) { let tmpdir = ''; let del = false; if (filepath.endsWith('.zip')) { @@ -482,6 +482,7 @@ export class ProblemModel { await fs.mkdir(tmpdir); const pdocs = await ProblemModel.getMulti(domainId, {}, ProblemModel.PROJECTION_PUBLIC).toArray(); for (const pdoc of pdocs) { + if (process.env.HYDRO_CLI) logger.info(`Exporting problem ${pdoc.pid} (${pdoc.title})`); const problemPath = path.join(tmpdir, `${pdoc.docId}`); await fs.mkdir(problemPath); const problemYaml = path.join(problemPath, 'problem.yaml'); diff --git a/packages/ui-default/components/notification/notification.page.styl b/packages/ui-default/components/notification/notification.page.styl index cb12bfe4d..239b8c32b 100644 --- a/packages/ui-default/components/notification/notification.page.styl +++ b/packages/ui-default/components/notification/notification.page.styl @@ -60,3 +60,9 @@ p margin-top: rem(7px); font-size: larger + +@media print { + .notification { + display: none !important + } +} \ No newline at end of file diff --git a/packages/ui-default/setting.yaml b/packages/ui-default/setting.yaml index 86a090e82..d4af6716d 100644 --- a/packages/ui-default/setting.yaml +++ b/packages/ui-default/setting.yaml @@ -104,11 +104,7 @@ about: 无论您在何时使用我们的服务,我们都力求让您能够访问自己的个人信息。如果这些信息有误,我们会努力通过各种方式让您快速更新信息或删除信息。 在更新您的个人信息时,我们可能会要求您先验证自己的身份,然后再处理您的请求。 我们力求对服务进行完善的维护,以保护信息免遭意外或恶意的破坏。因此,当您从我们的服务中删除信息后, - 我们可能不会立即从在用的服务器中删除这些信息的残留副本,也可能不会从备份系统中删除相应的信息。 - - #### 4. 信息安全 - 我们为您提供SSL加密访问服务,您可以通过SSL(https)使用我们的服务,这可以很大程度上保障在传输过程中您信息的安全。 - 对于敏感数据(如您的密码),我们承诺在存储时进行高强度不可逆加密。{{ name }} 的管理员、维护人员等均不能够访问到敏感数据的明文,所有操作均无人工介入。 + 我们可能不会立即从在用的服务器中删除这些信息的残留副本,也可能不会从备份系统中删除相应的信息。 # tos 服务条款 #### 0. 欢迎使用 {{ name }}