mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: add avatar provider API
This commit is contained in:
1 parent
2db1570d1b
commit
f1f956202f
42 files changed
+122
-80
No files matched your search
@@ -9,7 +9,7 @@ const Xss = require('xss');
|
||||
const { findFileSync } = require('@hydrooj/utils/lib/utils');
|
||||
const markdown = require('./markdown');
|
||||
|
||||
const { misc, buildContent } = global.Hydro.lib;
|
||||
const { misc, buildContent, avatar } = global.Hydro.lib;
|
||||
|
||||
const xss = new Xss.FilterXSS({
|
||||
whiteList: {
|
||||
@@ -187,7 +187,7 @@ env.addGlobal('typeof', (o) => typeof o);
|
||||
env.addGlobal('datetimeSpan', misc.datetimeSpan);
|
||||
env.addGlobal('paginate', misc.paginate);
|
||||
env.addGlobal('size', misc.size);
|
||||
env.addGlobal('gravatar', misc.gravatar);
|
||||
env.addGlobal('avatarUrl', avatar);
|
||||
env.addGlobal('formatSeconds', misc.formatSeconds);
|
||||
env.addGlobal('model', global.Hydro.model);
|
||||
env.addGlobal('ui', global.Hydro.ui);
|
||||
|
||||
Reference in new issue
Block a user