mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
update settings page
This commit is contained in:
parent
32aa10fc04
commit
d21f965372
@ -64,12 +64,12 @@
|
||||
}
|
||||
}
|
||||
&.mfa-enabled {
|
||||
span, i {
|
||||
span, i, svg {
|
||||
color: @cp_settings_enabled;
|
||||
}
|
||||
}
|
||||
&.mfa-disabled {
|
||||
span, i {
|
||||
span, i, svg {
|
||||
color: @cp_settings_disabled;
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,6 +80,7 @@ define([
|
||||
"arrow-left": "arrow-left",
|
||||
"arrow-up": "arrow-up",
|
||||
"code": "code-xml",
|
||||
"code-file": "file-code",
|
||||
"qr-code": "qr-code",
|
||||
"lock": "lock",
|
||||
"help": "info",
|
||||
@ -103,6 +104,8 @@ define([
|
||||
"calendar-description": "align-justify",
|
||||
"save": "save",
|
||||
"loading": "loader", // XXX
|
||||
"notification" : "bell",
|
||||
"cursor": "text-cursor",
|
||||
};
|
||||
|
||||
Icons.get = (name, attrs = {}) => {
|
||||
|
||||
@ -10,8 +10,10 @@ define([
|
||||
'/components/nthen/index.js',
|
||||
'/customize.dist/login.js',
|
||||
'/common/common-util.js',
|
||||
'/customize/fonts/lucide.js',
|
||||
'/common/common-icons.js',
|
||||
|
||||
], function ($, Messages, h, UI, nThen, Login, Util) {
|
||||
], function ($, Messages, h, UI, nThen, Login, Util, Lucide, Icons) {
|
||||
const MFA = {};
|
||||
|
||||
MFA.totpSetup = function (common, config, content, enabled, cb) {
|
||||
@ -23,10 +25,10 @@ define([
|
||||
|
||||
var $content = $(content).empty();
|
||||
$content.append(h('div.cp-settings-mfa-hint.cp-settings-mfa-status' + (enabled ? '.mfa-enabled' : '.mfa-disabled'), [
|
||||
h('i.fa' + (enabled ? '.fa-check' : '.fa-times')),
|
||||
(enabled ? Icons.get('check') : Icons.get('close')),
|
||||
h('span', enabled ? Messages.mfa_status_on : Messages.mfa_status_off)
|
||||
]));
|
||||
|
||||
setTimeout(() => Lucide.createIcons());
|
||||
if (enabled) {
|
||||
(function () {
|
||||
var button = h('button.btn', Messages.mfa_disable);
|
||||
|
||||
@ -179,10 +179,9 @@
|
||||
color: @cp_sidebar-hint;
|
||||
}
|
||||
.cp-settings-mfa-status {
|
||||
& > i {
|
||||
margin-right: 5px;
|
||||
}
|
||||
margin: 1em 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
.cp-settings-mfa {
|
||||
.cp-password-container {
|
||||
|
||||
@ -384,7 +384,7 @@ define([
|
||||
});
|
||||
|
||||
var button = h('button.btn.btn-danger', [
|
||||
h('i.fa.fa-trash-o'),
|
||||
Icons.get('trash-full'),
|
||||
h('span', Messages.settings_cacheButton)
|
||||
]);
|
||||
var buttonContainer = h('div.cp-settings-clear-cache', button);
|
||||
@ -470,7 +470,7 @@ define([
|
||||
if (!common.isLoggedIn()) { return cb(false); }
|
||||
|
||||
var button = h('button.btn.btn-danger', [
|
||||
h('i.cptools.cptools-destroy'),
|
||||
Icons.get('destroy'),
|
||||
Messages.settings_removeOwnedButton
|
||||
]);
|
||||
var form = h('div', [
|
||||
@ -2033,7 +2033,7 @@ define([
|
||||
$upButton.removeClass('btn-primary').addClass('btn-secondary');
|
||||
$upButton.removeProp('title');
|
||||
$upButton.text(Messages.profile_upload);
|
||||
$upButton.prepend($('<i>', {'class': 'fa fa-upload', 'aria-hidden': 'true'}));
|
||||
$upButton.prepend(Icons.get('upload'));
|
||||
|
||||
|
||||
cb([
|
||||
@ -2118,16 +2118,16 @@ define([
|
||||
};
|
||||
|
||||
var SIDEBAR_ICONS = {
|
||||
account: 'fa fa-user-o',
|
||||
profile: 'fa fa-user-circle',
|
||||
drive: 'fa fa-hdd-o',
|
||||
cursor: 'fa fa-i-cursor',
|
||||
code: 'fa fa-file-code-o',
|
||||
pad: 'cptools cptools-richtext',
|
||||
security: 'fa fa-lock',
|
||||
kanban: 'cptools cptools-kanban',
|
||||
style: 'cptools cptools-palette',
|
||||
notifications: 'fa fa-bell'
|
||||
account: 'register-homepage', // XXX
|
||||
profile: 'user-profile',
|
||||
drive: 'drive',
|
||||
cursor: 'cursor',
|
||||
code: 'code-file',
|
||||
pad: 'drive-file',
|
||||
security: 'lock',
|
||||
kanban: 'drive-file', // XXX
|
||||
style: 'color-palette',
|
||||
notifications: 'notification'
|
||||
};
|
||||
let SIDEBAR_NAMES = {}; // for extension points
|
||||
|
||||
@ -2143,9 +2143,7 @@ define([
|
||||
var iconClass = SIDEBAR_ICONS[key];
|
||||
var icon;
|
||||
if (iconClass) {
|
||||
icon = h('span', {
|
||||
class: iconClass,
|
||||
});
|
||||
icon = Icons.get(iconClass);
|
||||
}
|
||||
|
||||
let name = SIDEBAR_NAMES[key] ||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user