mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: fix template
This commit is contained in:
1 file changed
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
|
import * as status from '@hydrooj/utils/lib/status';
|
||||||
import { findFileSync } from '@hydrooj/utils/lib/utils';
|
import { findFileSync } from '@hydrooj/utils/lib/utils';
|
||||||
import {
|
import {
|
||||||
avatar, buildContent, Context,
|
avatar, buildContent, Context,
|
||||||
fs, PERM, PRIV,
|
fs, PERM, PRIV, serialize, STATUS, yaml,
|
||||||
serialize, STATUS, yaml,
|
|
||||||
} from 'hydrooj';
|
} from 'hydrooj';
|
||||||
import jsesc from 'jsesc';
|
import jsesc from 'jsesc';
|
||||||
import nunjucks from 'nunjucks';
|
import nunjucks from 'nunjucks';
|
||||||
@@ -142,7 +142,7 @@ env.addGlobal('typeof', (o) => typeof o);
|
|||||||
env.addGlobal('instanceof', (a, b) => a instanceof b);
|
env.addGlobal('instanceof', (a, b) => a instanceof b);
|
||||||
env.addGlobal('paginate', misc.paginate);
|
env.addGlobal('paginate', misc.paginate);
|
||||||
env.addGlobal('size', misc.size);
|
env.addGlobal('size', misc.size);
|
||||||
env.addGlobal('utils', { status: STATUS });
|
env.addGlobal('utils', { status });
|
||||||
env.addGlobal('avatarUrl', avatar);
|
env.addGlobal('avatarUrl', avatar);
|
||||||
env.addGlobal('formatSeconds', misc.formatSeconds);
|
env.addGlobal('formatSeconds', misc.formatSeconds);
|
||||||
env.addGlobal('lib', global.Hydro.lib);
|
env.addGlobal('lib', global.Hydro.lib);
|
||||||
|
|||||||
Reference in new issue
Block a user