mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: easy locale change
This commit is contained in:
1 parent
761a885560
commit
98c23bb2cc
5 files changed
+13
-5
No files matched your search
@@ -3,6 +3,7 @@ __langname: English
|
||||
Can be Extended For: Extension
|
||||
contest_create: Contest Create
|
||||
contest_detail_problem_submit: Submit Contest Problem
|
||||
contest_detail: Contest Detail
|
||||
contest_edit: Contest Edit
|
||||
contest_main: Contest
|
||||
contest_scoreboard: Scoreboard
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.36.5",
|
||||
"version": "2.36.6",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
@@ -527,9 +527,6 @@ export class Handler extends HandlerCommon {
|
||||
this.session.scope = PERM.PERM_ALL.toString();
|
||||
this.user = await user.getById(domainId, this.session.uid, this.session.scope);
|
||||
}
|
||||
if (!this.session._id && this.request.headers['accept-language'] && !this.request.headers['accept-language'].startsWith('zh')) {
|
||||
this.session.viewLang = 'en';
|
||||
}
|
||||
if (this.user._id === 0 && this.session.viewLang) this.user.viewLang = this.session.viewLang;
|
||||
this.user.avatarUrl = avatar(this.user.avatar, 128);
|
||||
this.csrfToken = this.getCsrfToken(this.session._id || String.random(32));
|
||||
|
||||
Reference in new issue
Block a user