mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
ui: allow using ui.name
This commit is contained in:
1 parent
bb67a39e58
commit
588fd0e1fb
14 files changed
+20
-16
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.30.3",
|
||||
"version": "2.30.4",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
@@ -311,8 +311,9 @@ 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')}`;
|
||||
const name = this.domain.ui?.name || system.get('server.name');
|
||||
if (this.extraTitleContent) return `${this.translate(str)} - ${this.extraTitleContent} - ${name}`;
|
||||
return `${this.translate(str)} - ${name}`;
|
||||
}
|
||||
|
||||
checkPerm(...args: bigint[]) {
|
||||
|
||||
@@ -143,6 +143,7 @@
|
||||
|
||||
.nav__logo
|
||||
display: block
|
||||
background-size:100% 100%;
|
||||
width: 0
|
||||
opacity: 0
|
||||
height: rem($nav-logo-height)
|
||||
@@ -150,8 +151,6 @@
|
||||
background: no-repeat
|
||||
transition: width .3s, opacity .3s
|
||||
transition-timing-function: ease-out-cubic
|
||||
+retina()
|
||||
background-size: $nav-logo-width $nav-logo-height
|
||||
|
||||
&:hover
|
||||
text-decoration: none
|
||||
|
||||
@@ -71,7 +71,7 @@ class UiSettingsHandler extends Handler {
|
||||
this.response.body = await this.renderHTML('extra.css', {
|
||||
nav_logo_dark,
|
||||
nav_logo_dark_2x,
|
||||
...ddoc,
|
||||
...(ddoc.ui || {}),
|
||||
});
|
||||
this.response.type = 'text/css';
|
||||
this.ctx.set('nolog', '1');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.14.3",
|
||||
"version": "4.14.4",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "hydro.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "layout/wiki_base.html" %}
|
||||
{% block wiki_content %}
|
||||
{% set name = model.system.get('server.name') %}
|
||||
{% set name = handler.domain.ui.name|default(model.system.get('server.name')) %}
|
||||
<div class="section" data-heading-extract-to="#menu-item-wiki_about">
|
||||
<div class="section__header">
|
||||
<h1 class="section__title" id="about" data-heading>{{ _('About {0}').format(name) }}</h1>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<link rel="icon" type="image/png" href="{{ static_url('favicon-16x16.png') }}" sizes="16x16">
|
||||
<meta name="theme-color" content="#56758f">
|
||||
{% block ogp %}
|
||||
<meta property="og:site_name" content="{{ model.system.get('server.name') }}" />
|
||||
<meta property="og:site_name" content="{{ handler.domain.ui.name|default(model.system.get('server.name')) }}" />
|
||||
<meta property="og:title" content="{{ handler.renderTitle(page_name) }}" />
|
||||
<meta property="og:url" content="{{ model.system.get('server.url') }}{{ handler.ctx.request.path }}" />
|
||||
<meta property="og:image" content="{{ static_url('favicon-96x96.png') }}" />
|
||||
|
||||
@@ -18,7 +18,7 @@ body, .hydro { margin:0;color:#333;font-size:14px;font-family:"Tahoma","Segoe UI
|
||||
</style>
|
||||
<div class="hydro">
|
||||
<div class="hydro-box">
|
||||
<div class="hydro-header">{% block title %}{% endblock %} - {{ model.system.get('server.name') }}</div>
|
||||
<div class="hydro-header">{% block title %}{% endblock %} - {{ handler.domain.ui.name|default(model.system.get('server.name')) }}</div>
|
||||
<div class="hydro-content">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="dialog--signin__bg">
|
||||
<div class="dialog--signin__side">
|
||||
<h1>{{ _("Don't have an account?") }}</h1>
|
||||
<p>{{ _('By signing up a {0} universal account, you can submit code and join discussions in all online judging services provided by us.').format(model.system.get('server.name')) }}</p>
|
||||
<p>{{ _('By signing up a {0} universal account, you can submit code and join discussions in all online judging services provided by us.').format(handler.domain.ui.name|default(model.system.get('server.name'))) }}</p>
|
||||
<div><a href="{{ url('user_register') }}" class="inverse rounded button">{{ _('Sign Up Now') }}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -46,7 +46,11 @@
|
||||
<span class="record-status--text {{ model.builtin.STATUS_CODES[rcdoc['status']] }}">
|
||||
{{ model.builtin.STATUS_TEXTS[rcdoc['status']] }}
|
||||
</span>
|
||||
<span>{{ formatJudgeTexts([rcdoc.message]) if rcdoc.message else '' }}</span>
|
||||
<span>{% if rdoc.domainId=='bzoj' and rcdoc.status!=STATUS.STATUS_ACCEPTED and not dl %}
|
||||
{% set dl=true %}
|
||||
<a href="/d/bzoj/p/{{rdoc.pid}}/file/{{loop.index}}.in?type=testdata&rid={{ rdoc._id }}">input</a>
|
||||
<a href="/d/bzoj/p/{{rdoc.pid}}/file/{{loop.index}}.out?type=testdata&rid={{ rdoc._id }}">output</a>
|
||||
{% endif %}{{ formatJudgeTexts([rcdoc.message]) if rcdoc.message else '' }}</span>
|
||||
<a class="tool-button" href="{{ url('wiki_help', anchor='status') }}"><span class="icon icon-help"></span></a>
|
||||
</td>
|
||||
<td class="col--time">{% if rcdoc['status'] == STATUS.STATUS_TIME_LIMIT_EXCEEDED or rcdoc['status'] == STATUS.STATUS_MEMORY_LIMIT_EXCEEDED or rcdoc['status'] == STATUS.STATUS_OUTPUT_LIMIT_EXCEEDED %}≥{% endif %}{{ rcdoc.time|round|int }}ms</td>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "layout/mail.html" %}
|
||||
{% block title %}{{ _('Change Email') }}{% endblock %}
|
||||
{% block content %}
|
||||
<p>{{ _('Hello, {0}! You can click following link to active your new email of your {1} account:').format(uname, model.system.get('server.name')) }}</p>
|
||||
<p>{{ _('Hello, {0}! You can click following link to active your new email of your {1} account:').format(uname, handler.domain.ui.name|default(model.system.get('server.name'))) }}</p>
|
||||
<p><a href="{{ url_prefix }}{{ path }}">{{ url_prefix }}{{ path }}</a></p>
|
||||
{% endblock %}
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "layout/mail.html" %}
|
||||
{% block title %}{{ _('Lost Password') }}{% endblock %}
|
||||
{% block content %}
|
||||
<p>{{ _('Hello, {0}! You can click following link to reset the password of your {1} account:').format(uname, model.system.get('server.name')) }}</p>
|
||||
<p>{{ _('Hello, {0}! You can click following link to reset the password of your {1} account:').format(uname, handler.domain.ui.name|default(model.system.get('server.name'))) }}</p>
|
||||
<p><a href="{{ url_prefix }}{{ url }}">{{ url_prefix }}{{ url }}</a></p>
|
||||
{% endblock %}
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "layout/mail.html" %}
|
||||
{% block title %}{{ _('Sign Up') }}{% endblock %}
|
||||
{% block content %}
|
||||
<p>{{ _('Hello! You can click following link to sign up your {0} account:').format(model.system.get('server.name')) }}</p>
|
||||
<p>{{ _('Hello! You can click following link to sign up your {0} account:').format(handler.domain.ui.name|default(model.system.get('server.name'))) }}</p>
|
||||
<p><a href="{{ url_prefix|safe }}{{ path|safe }}">{{ url_prefix|safe }}{{ path|safe }}</a></p>
|
||||
{% endblock %}
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "layout/wiki_base.html" %}
|
||||
{% block wiki_content %}
|
||||
{% set name = model.system.get('server.name') %}
|
||||
{% set name = handler.domain.ui.name|default(model.system.get('server.name')) %}
|
||||
<div class="section" data-heading-extract-to="#menu-item-wiki_help">
|
||||
<div class="section__header">
|
||||
<h1 class="section__title" id="domain" data-heading>{{ _('Domain') }}</h1>
|
||||
|
||||
Reference in new issue
Block a user