mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
system check & setting_secret
This commit is contained in:
1 parent
c52ddd7512
commit
57f711ed4f
18 files changed
+295
-134
No files matched your search
@@ -1,13 +1,17 @@
|
||||
{% import "components/user.html" as user %}
|
||||
{% extends "manage_base.html" %}
|
||||
{% block manage_content %}
|
||||
{% if domain.bulletin %}
|
||||
<script>
|
||||
var Context = {
|
||||
'socketUrl': "/manage/check-conn?token={{ handler.csrfToken }}"
|
||||
};
|
||||
</script>
|
||||
<div class="section">
|
||||
<div class="section__body typo">
|
||||
{{ domain.bulletin|markdown|safe }}
|
||||
<div class="section__header">
|
||||
<h1 class="section__title" data-heading>{{ _('Messages') }}</h1>
|
||||
</div>
|
||||
<div class="section__body typo" id="messages"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="section">
|
||||
<div class="section__header">
|
||||
<h1 class="section__title" data-heading>{{ _('Information') }}</h1>
|
||||
|
||||
File renamed without changes.
@@ -5,15 +5,17 @@
|
||||
</div>
|
||||
<div class="section__body">
|
||||
{% for setting in family_settings %}
|
||||
{% if not setting.hidden %}
|
||||
{% if not setting.flag|bitand(model.setting.FLAG_HIDDEN) %}
|
||||
{% set secret = setting.flag|bitand(model.setting.FLAG_SECRET) != 0 %}
|
||||
{% if setting.type == 'text' or setting.type == 'password' or setting.type == 'number' %}
|
||||
{{ form.form_text({
|
||||
type:setting.type,
|
||||
label:setting.name,
|
||||
help_text:setting.desc,
|
||||
name:setting.key,
|
||||
value:current[setting.key] or setting.value,
|
||||
disabled:setting.disabled
|
||||
value:'' if secret else (current[setting.key]|default(setting.value)),
|
||||
disabled:setting.disabled,
|
||||
placeholder:_('(Not changed)') if secret else ''
|
||||
}) }}
|
||||
{% elif setting.type == 'select' %}
|
||||
{{ form.form_select({
|
||||
@@ -48,17 +50,19 @@
|
||||
label:setting.name,
|
||||
help_text:setting.desc,
|
||||
name:setting.key,
|
||||
value:current[setting.key] or setting.value,
|
||||
disabled:setting.disabled
|
||||
value:'' if secret else (current[setting.key]|default(setting.value)),
|
||||
disabled:setting.disabled,
|
||||
placeholder:_('(Not changed)') if secret else ''
|
||||
}) }}
|
||||
{% elif setting.type == 'markdown' %}
|
||||
{{ form.form_textarea({
|
||||
label:setting.name,
|
||||
help_text:setting.desc,
|
||||
name:setting.key,
|
||||
value:current[setting.key] or setting.value,
|
||||
value:'' if secret else (current[setting.key]|default(setting.value)),
|
||||
markdown:true,
|
||||
disabled:setting.disabled
|
||||
disabled:setting.disabled,
|
||||
placeholder:_('(Not changed)') if secret else ''
|
||||
}) }}
|
||||
{% elif setting.type == 'boolean' %}
|
||||
{{ form.form_checkbox({
|
||||
|
||||
Reference in new issue
Block a user