mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: use langConfig.hidden for remote problems
This commit is contained in:
1 parent
73b1a04bd0
commit
d60f31c427
10 files changed
+28
-27
No files matched your search
@@ -68,11 +68,10 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
const LANGS = {};
|
||||
const prefix = new Set(Object.keys(window.LANGS).filter((i) => i.includes('.')).map((i) => i.split('.')[0]));
|
||||
const domainId = UiContext.pdoc.reference?.domainId || UiContext.pdoc.domainId;
|
||||
for (const key in window.LANGS) {
|
||||
if (prefix.has(key)) continue;
|
||||
if (UiContext.pdoc.config.langs && !UiContext.pdoc.config.langs.includes(key)) continue;
|
||||
if (window.LANGS[key].domain && !window.LANGS[key].domain.includes(domainId)) continue;
|
||||
if (window.LANGS[key].hidden && !UiContext.pdoc.config.langs?.includes(key)) continue;
|
||||
LANGS[key] = window.LANGS[key];
|
||||
}
|
||||
const keys = Object.keys(LANGS);
|
||||
|
||||
Reference in new issue
Block a user