core: support extra title content

This commit is contained in:
undefined committed 2021-03-01 00:44:12 +08:00
1 parent d49f134fa3
commit 09a83c4364
4 files changed
+6 -1

No files matched your search

+2
View File
@@ -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')}`;
}