mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
#84 as plugin
This commit is contained in:
parent
84f3a7dd77
commit
d9bab28bfe
16 changed files with 1206 additions and 0 deletions
|
|
@ -0,0 +1,29 @@
|
|||
<div class="modal fade b-two-factor-test-content g-ui-user-select-none" data-bind="modal: modalVisibility">
|
||||
<div>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-bind="command: cancelCommand">×</button>
|
||||
<h3 data-i18n="POPUPS_TWO_FACTOR_TEST/TITLE_TEST_CODE"></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-horizontal">
|
||||
<br />
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
<span data-i18n="POPUPS_TWO_FACTOR_TEST/LABEL_CODE"></span>
|
||||
</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="uiInput inputName"
|
||||
autofocus="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||
data-bind="textInput: code, onEnter: testCodeCommand" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a class="btn" data-bind="command: testCodeCommand, css: { 'btn-success': true === codeStatus(), 'btn-danger': false === codeStatus() }">
|
||||
<i data-bind="css: {'icon-ok': !testing(), 'icon-spinner': testing()}"></i>
|
||||
<span data-i18n="GLOBAL/TEST"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
109
plugins/two-factor-auth/templates/TwoFactorAuthSettings.html
Normal file
109
plugins/two-factor-auth/templates/TwoFactorAuthSettings.html
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
<div class="b-settings-two-factor">
|
||||
<div class="form-horizontal" data-bind="visible: capaAutoLogout">
|
||||
<div class="legend" data-i18n="POPUPS_TWO_FACTOR_CFG/LEGEND_TWO_FACTOR_AUTH"></div>
|
||||
<div class="control-group" data-bind="visible: capaTwoFactor">
|
||||
<label class="control-label"></label>
|
||||
<div class="controls">
|
||||
<i class="fontastic">🔒</i>
|
||||
|
||||
<span class="g-ui-link" tabindex="0" data-i18n="SETTINGS_SECURITY/LABEL_CONFIGURE_TWO_FACTOR" data-bind="click: configureTwoFactor, onSpace: configureTwoFactor, onEnter: configureTwoFactor"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-bind="visible: viewEnable() || !lock(), command: cancelCommand">×</button>
|
||||
<h3 data-i18n="POPUPS_TWO_FACTOR_CFG/LEGEND_TWO_FACTOR_AUTH"></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-horizontal" data-bind="visible: capaTwoFactor" style="margin-top: 10px;">
|
||||
<div class="control-group" data-bind="visible: twoFactorStatus">
|
||||
<div class="controls">
|
||||
<div style="display: inline-block" data-bind="attr:{title: viewTwoFactorEnableTooltip}">
|
||||
<div data-bind="component: {
|
||||
name: 'Checkbox',
|
||||
params: {
|
||||
label: 'POPUPS_TWO_FACTOR_CFG/LABEL_ENABLE_TWO_FACTOR',
|
||||
enable: twoFactorAllowedEnable,
|
||||
value: viewEnable,
|
||||
inline: true
|
||||
}
|
||||
}"></div>
|
||||
</div>
|
||||
|
||||
<span class="g-ui-link" data-bind="click: testTwoFactor, visible: twoFactorStatus"
|
||||
data-i18n="POPUPS_TWO_FACTOR_CFG/LINK_TEST"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
<span data-i18n="POPUPS_TWO_FACTOR_CFG/LABEL_TWO_FACTOR_USER"></span>
|
||||
</label>
|
||||
<div class="controls" style="padding-top: 5px;">
|
||||
<strong><span data-bind="text: viewUser"></span></strong>
|
||||
<div style="padding-top: 15px;" data-bind="visible: lock">
|
||||
<blockquote>
|
||||
<p class="muted width100-on-mobile" style="width: 550px" data-i18n="POPUPS_TWO_FACTOR_CFG/TWO_FACTOR_REQUIRE_DESC"></p>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" data-bind="visible: '' === viewSecret() && twoFactorStatus() && !clearing()">
|
||||
<div class="controls" style="padding-top: 5px;">
|
||||
<strong data-bind="visible: secreting">...</strong>
|
||||
<span class="g-ui-link" data-bind="click: showSecret, visible: !secreting()"
|
||||
data-i18n="POPUPS_TWO_FACTOR_CFG/BUTTON_SHOW_SECRET"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" data-bind="visible: '' !== viewSecret()">
|
||||
<label class="control-label">
|
||||
<span data-i18n="POPUPS_TWO_FACTOR_CFG/LABEL_TWO_FACTOR_SECRET"></span>
|
||||
</label>
|
||||
<div class="controls" style="padding-top: 5px;">
|
||||
<strong data-bind="text: viewSecret"></strong>
|
||||
|
||||
<span class="g-ui-link" data-bind="click: hideSecret" data-i18n="POPUPS_TWO_FACTOR_CFG/BUTTON_HIDE_SECRET"></span>
|
||||
<br />
|
||||
<br />
|
||||
<blockquote>
|
||||
<p class="muted width100-on-mobile" style="width: 550px" data-i18n="POPUPS_TWO_FACTOR_CFG/TWO_FACTOR_SECRET_DESC"></p>
|
||||
</blockquote>
|
||||
<!-- ko if: '' !== viewUrl() -->
|
||||
<img style="margin-left: -7px;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2P8DwQACgAD/il4QJ8AAAAASUVORK5CYII=" data-bind="attr: {'src': viewUrl}" />
|
||||
<!-- /ko -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" data-bind="visible: '' !== viewBackupCodes()">
|
||||
<label class="control-label">
|
||||
<span data-i18n="POPUPS_TWO_FACTOR_CFG/LABEL_TWO_FACTOR_BACKUP_CODES"></span>
|
||||
</label>
|
||||
<div class="controls" style="padding-top: 5px;">
|
||||
<pre data-bind="text: viewBackupCodes" style="width: 230px; word-break: break-word;"></pre>
|
||||
<br />
|
||||
<blockquote>
|
||||
<p class="muted width100-on-mobile" style="width: 550px" data-i18n="POPUPS_TWO_FACTOR_CFG/TWO_FACTOR_BACKUP_CODES_DESC"></p>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a class="btn pull-left" data-bind="visible: lock, click: logout">
|
||||
<i class="fontastic">⏻</i>
|
||||
<span data-i18n="GLOBAL/LOGOUT"></span>
|
||||
</a>
|
||||
<a class="btn btn-danger" data-bind="click: clearTwoFactor, visible: twoFactorStatus">
|
||||
<i class="fontastic" data-bind="css: {'icon-spinner': clearing()}">✖</i>
|
||||
<span data-i18n="GLOBAL/CLEAR"></span>
|
||||
</a>
|
||||
<a class="btn" data-bind="click: createTwoFactor, visible: !twoFactorStatus()">
|
||||
<i class="fontastic" data-bind="css: {'icon-spinner': processing()}">▶</i>
|
||||
<span data-i18n="POPUPS_TWO_FACTOR_CFG/BUTTON_ACTIVATE"></span>
|
||||
</a>
|
||||
<a class="btn" data-bind="command: cancelCommand, visible: viewEnable() || !lock()">
|
||||
<i class="icon-ok" ></i>
|
||||
<span data-i18n="GLOBAL/DONE"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue