mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
vjudge: add Provider.noComment
This commit is contained in:
2 files changed
+2
-1
No files matched your search
@@ -55,7 +55,7 @@ class AccountService {
|
|||||||
}
|
}
|
||||||
if (langConfig.validAs?.[this.account.type]) task.lang = langConfig.validAs[this.account.type];
|
if (langConfig.validAs?.[this.account.type]) task.lang = langConfig.validAs[this.account.type];
|
||||||
const comment = langConfig.comment;
|
const comment = langConfig.comment;
|
||||||
if (comment) {
|
if (comment && !this.Provider.noComment) {
|
||||||
const msg = `Hydro submission #${task.rid}@${new Date().getTime()}`;
|
const msg = `Hydro submission #${task.rid}@${new Date().getTime()}`;
|
||||||
if (typeof comment === 'string') task.code = `${comment} ${msg}\n${task.code}`;
|
if (typeof comment === 'string') task.code = `${comment} ${msg}\n${task.code}`;
|
||||||
else if (comment instanceof Array) task.code = `${comment[0]} ${msg} ${comment[1]}\n${task.code}`;
|
else if (comment instanceof Array) task.code = `${comment[0]} ${msg} ${comment[1]}\n${task.code}`;
|
||||||
|
|||||||
@@ -46,4 +46,5 @@ export interface IBasicProvider {
|
|||||||
export interface BasicProvider {
|
export interface BasicProvider {
|
||||||
new(account: RemoteAccount, save: (data: any) => Promise<void>): IBasicProvider;
|
new(account: RemoteAccount, save: (data: any) => Promise<void>): IBasicProvider;
|
||||||
Langs?: Record<string, Partial<LangConfig>>;
|
Langs?: Record<string, Partial<LangConfig>>;
|
||||||
|
noComment?: boolean;
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user