mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +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;
|
this.noCheckPermView = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
async get() {
|
async get({ domainId }) {
|
||||||
const LANGS = setting.langs;
|
const LANGS = setting.langs;
|
||||||
const languages = {};
|
const languages = {};
|
||||||
// eslint-disable-next-line guard-for-in
|
// eslint-disable-next-line guard-for-in
|
||||||
for (const key in LANGS) {
|
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;
|
languages[`${LANGS[key].display}(${key})`] = LANGS[key].compile || LANGS[key].execute;
|
||||||
}
|
}
|
||||||
this.response.body = { languages };
|
this.response.body = { languages };
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/ui-default",
|
"name": "@hydrooj/ui-default",
|
||||||
"version": "4.12.16",
|
"version": "4.12.17",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"main": "hydro.js",
|
"main": "hydro.js",
|
||||||
|
|||||||
Reference in new issue
Block a user