mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: support extra title content
This commit is contained in:
1 parent
d49f134fa3
commit
09a83c4364
4 files changed
+6
-1
No files matched your search
@@ -251,6 +251,7 @@ export class HandlerCommon {
|
||||
user: User;
|
||||
session: Record<string, any>;
|
||||
request: Record<string, any>;
|
||||
extraTitleContent?: string;
|
||||
|
||||
async limitRate(op: string, periodSecs: number, maxOperations: number) {
|
||||
await opcount.inc(op, this.request.ip, periodSecs, maxOperations);
|
||||
@@ -262,6 +263,7 @@ export class HandlerCommon {
|
||||
}
|
||||
|
||||
renderTitle(str: string) {
|
||||
if (this.extraTitleContent) return `${this.translate(str)} - ${this.extraTitleContent} - ${system.get('server.name')}`;
|
||||
return `${this.translate(str)} - ${system.get('server.name')}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user