mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: allow view solution & others code after accept
This commit is contained in:
1 parent
c0ac4302a2
commit
489327cc0d
7 files changed
+41
-25
No files matched your search
@@ -121,6 +121,7 @@ env.addGlobal('static_url', (assetName) => {
|
||||
// eslint-disable-next-line no-eval
|
||||
env.addGlobal('eval', eval);
|
||||
env.addGlobal('Date', Date);
|
||||
env.addGlobal('Math', Math);
|
||||
env.addGlobal('process', process);
|
||||
env.addGlobal('global', global);
|
||||
env.addGlobal('typeof', (o) => typeof o);
|
||||
@@ -141,13 +142,6 @@ env.addGlobal('set', (obj, key, val) => {
|
||||
env.addGlobal('findSubModule', (prefix) => {
|
||||
filter(Object.keys(global.Hydro.ui.template), (n) => n.startsWith(prefix));
|
||||
});
|
||||
env.addGlobal('parseContestProblemId', (pdoc, tdoc) => {
|
||||
if (tdoc.pids[parseInt(pdoc.pid, 36) - 10]) return pdoc.pid;
|
||||
let cur = tdoc.pids.indexOf(pdoc.docId);
|
||||
if (cur !== -1) return (cur + 10).toString(36).toUpperCase();
|
||||
cur = tdoc.pids.indexOf(`${pdoc.domainId}:${pdoc.docId}`);
|
||||
return (cur + 10).toString(36).toUpperCase();
|
||||
});
|
||||
|
||||
async function render(name, state) {
|
||||
// eslint-disable-next-line no-return-await
|
||||
|
||||
Reference in new issue
Block a user