mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01: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;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.26.10",
|
||||
"version": "4.26.11",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "hydro.js",
|
||||
|
||||
Reference in new issue
Block a user