ui: add constant to error page

This commit is contained in:
undefined committed 2021-11-01 10:32:10 +08:00
1 parent ea8bd323c7
commit 710f7c7086
5 files changed
+14 -5

No files matched your search

+5 -3
View File
@@ -76,14 +76,16 @@ async function constant(args: ConstantArgs) {
return version;
}
bus.on('handler/after', async (that) => {
if (that.response.template) {
const versionHandler = async (that) => {
if (that.response.template && !that.UiContext.constantVersion) {
that.UiContext.constantVersion = await constant({
domainId: that.domainId,
lang: that.session.viewLang || that.user.viewLang,
});
}
});
};
bus.on('handler/after', versionHandler);
bus.on('handler/error', versionHandler);
class WikiHelpHandler extends Handler {
noCheckPermView = true;