mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: better training validation output
This commit is contained in:
1 parent
9a44422522
commit
6bda0e58d3
9 files changed
+13
-6
No files matched your search
@@ -146,6 +146,7 @@ env.addGlobal('Math', Math);
|
||||
env.addGlobal('process', process);
|
||||
env.addGlobal('global', global);
|
||||
env.addGlobal('typeof', (o) => typeof o);
|
||||
env.addGlobal('instanceof', (a, b) => a instanceof b);
|
||||
env.addGlobal('paginate', misc.paginate);
|
||||
env.addGlobal('size', misc.size);
|
||||
env.addGlobal('utils', { status });
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.39.2",
|
||||
"version": "4.39.3",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "hydro.js",
|
||||
|
||||
@@ -12,7 +12,11 @@
|
||||
<p>{{ _('Arguments') }}:
|
||||
<ol>
|
||||
{%- for param in error.params -%}
|
||||
<li>{{ param }}</li>
|
||||
{% if instanceof(param, UserFacingError) %}
|
||||
<li>{{ _(param.message).formatFromArray(param.params)}}</li>
|
||||
{% else %}
|
||||
<li>{{ param }}</li>
|
||||
{% endif %}
|
||||
{%- endfor -%}
|
||||
</ol>
|
||||
</p>
|
||||
|
||||
Reference in new issue
Block a user