优化安装流程

This commit is contained in:
masnn committed 2020-06-07 13:59:22 +08:00
1 parent 63d55cedf4
commit 508f5644c3
30 files changed
+279 -139

No files matched your search

+1
View File
@@ -1,3 +1,4 @@
{# No Compression #}
{% macro form_begin(args) %}
{% set label = args.label %}
{% set columns = args.columns %}
+1 -1
View File
@@ -13,7 +13,7 @@
</a>
{% if badge %}
<a class="user-profile-badge v-center badge--lv{{ udoc['level']|default(0) }}" href="/u/{{ udoc['_id']|default(0) }}" title="LV {{ udoc['level']|default(0) }}: Top {{ model.builtin.LEVELS[udoc['level']|default(0)]|default('N/A') }}%">LV {{ udoc['level']|default(0) }}</a>
{% if modbadge and handler.hasPerm(perm.PERM_MOD_BADGE) %}
{% if modbadge and udoc.hasPerm(perm.PERM_MOD_BADGE) %}
<span class="user-profile-badge v-center badge--mod" title="Moderator">MOD</span>
{% endif %}
{% endif %}
+4 -4
View File
@@ -7,15 +7,15 @@
</div>
</div>
<div class="medium-3 columns">
{% if vnode.parentType == 'problem' %}
{% if vnode.parentType == model.document.TYPE_PROBLEM %}
{% set pdoc = vnode %}
{% set owner_udoc = udict[vnode.owner] %}
{% include "partials/problem_sidebar.html" %}
{% elif vnode.parentType == 'contest' %}
{% elif vnode.parentType == model.document.TYPE_CONTEST %}
{% set tdoc = vnode %}
{% set owner_udoc = udict[vnode.owner] %}
{% include "partials/contest_sidebar.html" %}
{% elif vnode.parentType == 'node' %}
{% elif vnode.parentType == model.document.TYPE_DISCUSSION_NODE %}
<div class="section side">
{% if vnode.pic %}<div class="discussion-node__bg {{ vnode.pic }}"></div>{% endif %}
<div class="section__header">
@@ -24,7 +24,7 @@
<div class="section__body">
{% if vnode %}
{% if handler.hasPerm(perm.PERM_CREATE_DISCUSSION) %}
<p><a href="/discuss/{{ vnode.parentType }}/{{ vnode.parentId }}" class="expanded primary button">{{ _('Create a Discussion') }}</a></p>
<p><a href="/discuss/{{ model.discussion.typeDisplay[vnode.parentType] }}/{{ vnode.parentId }}/create" class="expanded primary button">{{ _('Create a Discussion') }}</a></p>
{% else %}
{% if not handler.hasPerm(perm.PERM_LOGGEDIN) %}
<p><a href="javascript:showSignInDialog();" class="expanded primary button">{{ _('Login to Create a Discussion') }}</a></p>
+7
View File
@@ -3,6 +3,13 @@
<div class="section">
<div class="section__body">
<form method="post">
{{ form.form_text({
label:'ID',
name:'id',
value:domain._id,
disabled:true,
required:true
}) }}
{{ form.form_text({
label:'Name',
name:'name',
+2 -9
View File
@@ -6,18 +6,12 @@
<h1>{{ _('Add Module') }}</h1>
</div></div>
<div class="row">
<div class="medium-6 columns">
<div class="medium-12 columns">
<label>
{{ _('URL') }}
<input name="url" type="text" class="textbox" autocomplete="off" data-autofocus>
</label>
</div>
<div class="medium-6 columns">
<label>
{{ _('ID (Optional)') }}
<input name="id" type="text" class="textbox" autocomplete="off">
</label>
</div>
</div>
</div>
</div>
@@ -55,10 +49,9 @@
<td class="col--size">{{ size(module.size) if module.size else '?' }}</td>
<td class="col--version">{{ module.version|default('?') }}</td>
<td class="col--action">
<a class="typo-a" href="/manage/module/download/{{ module.filename }}">{{ _('Download') }}</a>
<form method="post">
<input type="hidden" name="operation" value="delete">
<input type="hidden" name="id" value="{{ module.id }}">
<input type="hidden" name="id" value="{{ module.filename }}">
<input type="hidden" name="csrfToken" value="{{ handler.csrfToken }}">
<input type="hidden" name="csrfToken" value="{{ handler.csrfToken }}">
<input type="submit" class="typo-a" value="{{ _('Delete') }}">
+5 -5
View File
@@ -15,18 +15,18 @@
</div>
</div>
<div class="media__body top">
<h1 class="discussion__title"><a href="/discuss/{{ ddoc._id }}#{{ handler.datetime_stamp(ddoc.updateAt) if ddoc.update_at else '' }}" data-emoji-enabled>{{ ddoc['title'] }}</a></h1>
<h1 class="discussion__title"><a href="/discuss/{{ ddoc._id }}#{{ ddoc.updateAt }}" data-emoji-enabled>{{ ddoc['title'] }}</a></h1>
<ul class="supplementary list">
<li>
<a class="discussion-node-tag" href="/discuss/{{ ddoc.parentType }}/{{ ddoc.parentId }}">
{% if ddoc.parentType == 'node' %}
<a class="discussion-node-tag" href="/discuss/{{ model.discussion.typeDisplay[ddoc.parentType] }}/{{ ddoc.parentId }}">
{% if ddoc.parentType == model.document.TYPE_PROBLEM %}
<span class="v-center icon icon-tag"></span>
{% elif ddoc.parentType == 'contest' %}
{% elif ddoc.parentType == model.document.TYPE_CONTEST %}
<span class="v-center icon icon-award"></span>
{% else %}
<span class="v-center icon icon-flag"></span>
{% endif %}
{{ vndict[ddoc._id].title|default(_('(missing)')) }}
{{ vndict[ddoc.parentType][ddoc.parentId].title|default(_('(missing)')) }}
</a>
</li>
<li>
+1 -1
View File
@@ -5,7 +5,7 @@
</div>
<div class="section__body">
{% for setting in family_settings %}
{% if setting.ui == 'text' or setting.ui == 'password' %}
{% if setting.ui == 'text' or setting.ui == 'password' or setting.ui == 'number' %}
{{ form.form_text({
type:setting.ui,
label:setting.name,
+5 -7
View File
@@ -7,8 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="msapplication-TileColor" content="#579e9a">
<meta name="theme-color" content="#56758f">
<link rel="stylesheet" media="all" href="{{ static_url('vj4.css') }}">
<link rel="stylesheet" media="all" href="/vj4.css">
<title>{{ _('Setup') }}</title>
<script>
var _htmlNode = document.documentElement;
@@ -31,25 +30,25 @@
<div class="row"><div class="columns">
<label class="inverse material textbox">
{{ _('Database Port') }}
<input name="port" type="number" value="27017" autofocus>
<input name="port" type="number" value="27017">
</label>
</div></div>
<div class="row"><div class="columns">
<label class="inverse material textbox">
{{ _('Database Name') }}
<input name="name" type="text" value="hydro" autofocus>
<input name="name" type="text" value="hydro">
</label>
</div></div>
<div class="row"><div class="columns">
<label class="inverse material textbox">
{{ _('Database Username') }}
<input name="username" type="text" placeholder="{{ _('Leave blank if none') }}" autofocus>
<input name="username" type="text" placeholder="{{ _('Leave blank if none') }}">
</label>
</div></div>
<div class="row"><div class="columns">
<label class="inverse material textbox">
{{ _('Database Password') }}
<input name="password" type="password" placeholder="{{ _('Leave blank if none') }}" autofocus>
<input name="password" type="password" placeholder="{{ _('Leave blank if none') }}">
</label>
</div></div>
<div class="row"><div class="columns">
@@ -62,6 +61,5 @@
</div></div>
</div>
</div>
<script type="text/javascript" src="{{ static_url('vj4.js') }}"></script>
</body>
</html>