mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-06 21:35:49 +01:00
Layout tweaks
This commit is contained in:
@@ -687,5 +687,5 @@ PLUGIN_ADMIN:
|
|||||||
2FA_ENABLED: "2FA Enabled"
|
2FA_ENABLED: "2FA Enabled"
|
||||||
2FA_CODE_INPUT: "2FA Code (if enabled)"
|
2FA_CODE_INPUT: "2FA Code (if enabled)"
|
||||||
2FA_SECRET: "2FA Secret"
|
2FA_SECRET: "2FA Secret"
|
||||||
2FA_SECRET_HELP: "Scan this code into your Authenticator App or enter the code manually. Check the Grav docs for more information"
|
2FA_SECRET_HELP: "Scan this QR code into your [Authenticator App](https://learn.getgrav.org/admin-panel/2fa#apps). Also it's a good idea to backup the secret in a safe location, in case you need to reinstall your app. Check the [Grav docs](https://learn.getgrav.org/admin-panel/2fa) for more information "
|
||||||
2FA_REGENERATE: "Regenerate"
|
2FA_REGENERATE: "Regenerate"
|
||||||
2
themes/grav/css-compiled/preset.css
vendored
2
themes/grav/css-compiled/preset.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
themes/grav/css-compiled/template.css
vendored
2
themes/grav/css-compiled/template.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -169,6 +169,11 @@ hr {
|
|||||||
color: $white;
|
color: $white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
background: $update-bg;
|
||||||
|
color: $update-text;
|
||||||
|
}
|
||||||
|
|
||||||
.light-border {
|
.light-border {
|
||||||
border-color: $underline !important;
|
border-color: $underline !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -206,6 +206,7 @@ $sidebar-padding: 2rem;
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
width: $sidebar-width-large;
|
width: $sidebar-width-large;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#admin-logo {
|
#admin-logo {
|
||||||
@@ -373,8 +374,12 @@ $sidebar-padding: 2rem;
|
|||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
h5 {
|
.badge {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h5 {
|
||||||
|
opacity: 0.8;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,6 +145,15 @@ form {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-sublabel {
|
||||||
|
p {
|
||||||
|
opacity: 0.8;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
margin: 10px 20px 0 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
input, select, textarea, button, .selectize-input {
|
input, select, textarea, button, .selectize-input {
|
||||||
font-size: $core-font-size;
|
font-size: $core-font-size;
|
||||||
line-height: $core-line-height;
|
line-height: $core-line-height;
|
||||||
|
|||||||
@@ -132,6 +132,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.twofa-secret-code {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
button[data-2fa-regenerate] {
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.twofa-secret {
|
.twofa-secret {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|||||||
@@ -34,6 +34,11 @@
|
|||||||
{{ field.validate.required in ['on', 'true', 1] ? '<span class="required">*</span>' }}
|
{{ field.validate.required in ['on', 'true', 1] ? '<span class="required">*</span>' }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</label>
|
</label>
|
||||||
|
{% if field.sublabel %}
|
||||||
|
<div class="form-sublabel">
|
||||||
|
{{ field.sublabel|tu|markdown|raw }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="form-data{% if not vertical %} block size-2-3{% endif %}"
|
<div class="form-data{% if not vertical %} block size-2-3{% endif %}"
|
||||||
{% block global_attributes %}
|
{% block global_attributes %}
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
{% extends "forms/field.html.twig" %}
|
{% extends "forms/field.html.twig" %}
|
||||||
|
|
||||||
{% block input %}
|
{% block input %}
|
||||||
<div class="form-input-wrapper 2fa-wrapper">
|
<div class="form-input-wrapper twofa-wrapper">
|
||||||
{% set two_fa = admin.get2FA() %}
|
{% set two_fa = admin.get2FA() %}
|
||||||
{% set value = (value is null ? two_fa.createSecret(160) : value) %}
|
{% set value = (value is null ? two_fa.createSecret(160) : value) %}
|
||||||
|
|
||||||
<img style="border: 1px solid #ddd" data-2fa-image src="{{ two_fa.getQRCodeImageAsDataUri(grav.user.email, value) }}" />
|
<img style="border: 1px solid #ddd" data-2fa-image src="{{ two_fa.getQRCodeImageAsDataUri(grav.user.email, value) }}" />
|
||||||
<div class="2fa-secret" data-2fa-secret>{{ value|chunkSplit(4, ' ') }}</div>
|
<div>
|
||||||
|
<span>{{ 'PLUGIN_ADMIN.2FA_SECRET'|tu }}: </span><span class="twofa-secret-code" data-2fa-secret>{{ value|chunkSplit(4, ' ') }}</span>
|
||||||
|
</div>
|
||||||
<button class="button button-small" data-2fa-regenerate><i class="fa fa-fw fa-refresh"></i> {{ 'PLUGIN_ADMIN.2FA_REGENERATE'|t }}</button>
|
<button class="button button-small" data-2fa-regenerate><i class="fa fa-fw fa-refresh"></i> {{ 'PLUGIN_ADMIN.2FA_REGENERATE'|t }}</button>
|
||||||
|
|
||||||
<input type="text" style="display:none;" name="{{ (scope ~ field.name)|fieldName }}" data-2fa-value value="{{ value|join(', ') }}" />
|
<input type="text" style="display:none;" name="{{ (scope ~ field.name)|fieldName }}" data-2fa-value value="{{ value|join(', ') }}" />
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
{% include 'partials/nav-user-avatar.html.twig' %}
|
{% include 'partials/nav-user-avatar.html.twig' %}
|
||||||
|
|
||||||
<div class="admin-user-names">
|
<div class="admin-user-names">
|
||||||
<h4>{{ admin.user.fullname|e }}</h4>
|
<h4>{{ admin.user.fullname|e }} {% if admin.user.twofa_enabled %}<span class="badge">2FA</span>{% endif %}</h4>
|
||||||
<h5>{{ admin.user.title|e }}</h5>
|
<h5>{{ admin.user.title|e }}</h5>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user