ui: hide domain-limited languages

This commit is contained in:
undefined committed 2021-07-09 20:00:04 +08:00
1 parent 0cb5a9597f
commit 5f41961fdb
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -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 -1
View File
@@ -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",