mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: add constant to error page
This commit is contained in:
1 parent
ea8bd323c7
commit
710f7c7086
5 files changed
+14
-5
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user