mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: optimize schema display
This commit is contained in:
1 parent
6f862657dc
commit
b1b933f3d7
4 files changed
+8
-4
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "3.16.9",
|
"version": "3.16.10",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "src/loader",
|
"main": "src/loader",
|
||||||
"module": "src/loader",
|
"module": "src/loader",
|
||||||
|
|||||||
@@ -186,9 +186,13 @@ class SystemSettingHandler extends SystemHandler {
|
|||||||
class SystemConfigHandler extends SystemHandler {
|
class SystemConfigHandler extends SystemHandler {
|
||||||
async get() {
|
async get() {
|
||||||
this.response.template = 'manage_config.html';
|
this.response.template = 'manage_config.html';
|
||||||
|
let value = configSource;
|
||||||
|
try {
|
||||||
|
value = yaml.dump(Schema.intersect(SystemSettings)(yaml.load(configSource)));
|
||||||
|
} catch (e) { }
|
||||||
this.response.body = {
|
this.response.body = {
|
||||||
schema: Schema.intersect(SystemSettings).toJSON(),
|
schema: Schema.intersect(SystemSettings).toJSON(),
|
||||||
value: configSource,
|
value,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/ui-default",
|
"name": "@hydrooj/ui-default",
|
||||||
"version": "4.39.23",
|
"version": "4.39.24",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"main": "hydro.js",
|
"main": "hydro.js",
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<textarea id="config" data-yaml data-model="hydro://system/setting.yaml" placeholder="" class="textbox">{{ value }}</textarea>
|
<textarea id="config" data-yaml data-model="hydro://system/setting.yaml" placeholder="" class="textbox">{{ value }}</textarea>
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
<p class="help-text" id="info"></p>
|
<pre class="help-text" id="info"></pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
Reference in new issue
Block a user