mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
ui: hide domain-limited languages
This commit is contained in:
1 parent
0cb5a9597f
commit
5f41961fdb
2 files changed
+3
-2
No files matched your search
@@ -20,11 +20,12 @@ class WikiHelpHandler extends Handler {
|
||||
this.noCheckPermView = true;
|
||||
}
|
||||
|
||||
async get() {
|
||||
async get({ domainId }) {
|
||||
const LANGS = setting.langs;
|
||||
const languages = {};
|
||||
// eslint-disable-next-line guard-for-in
|
||||
for (const key in LANGS) {
|
||||
if (LANGS[key].domain && !LANGS[key].domain.includes(domainId)) continue;
|
||||
languages[`${LANGS[key].display}(${key})`] = LANGS[key].compile || LANGS[key].execute;
|
||||
}
|
||||
this.response.body = { languages };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.12.16",
|
||||
"version": "4.12.17",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "hydro.js",
|
||||
|
||||
Reference in new issue
Block a user