Add cba hint

pull/1/head
yflory 5 years ago
parent fd2ee0fced
commit 7890342ae1

@ -26,6 +26,11 @@
// Properties modal // Properties modal
.cp-app-prop { .cp-app-prop {
margin-bottom: 10px; margin-bottom: 10px;
.cp-app-prop-hint {
color: @cryptpad_text_col;
font-size: 0.8em;
margin-bottom: 5px;
}
.cp-app-prop-size-container { .cp-app-prop-size-container {
height: 20px; height: 20px;
background-color: @colortheme_logo-2; background-color: @colortheme_logo-2;

@ -53,12 +53,14 @@ define([
var metadataMgr = common.getMetadataMgr(); var metadataMgr = common.getMetadataMgr();
var priv = metadataMgr.getPrivateData(); var priv = metadataMgr.getPrivateData();
Messages.cba_properties = "Author colors (experimental)"; // XXX Messages.cba_properties = "Author colors (experimental)"; // XXX
Messages.cba_hint = "This setting will be remembered for your next pad."; // XXX
Messages.cba_enable = "Enable author colors in this pad"; // XXX Messages.cba_enable = "Enable author colors in this pad"; // XXX
Messages.cba_disable = "Clear all colors and disable"; // XXX Messages.cba_disable = "Clear all colors and disable"; // XXX
if (owned && priv.app === 'code') { if (owned && priv.app === 'code') {
(function () { (function () {
var md = metadataMgr.getMetadata(); var md = metadataMgr.getMetadata();
var div = h('div'); var div = h('div');
var hint = h('div.cp-app-prop-hint', Messages.cba_hint);
var $div = $(div); var $div = $(div);
var setButton = function (state) { var setButton = function (state) {
var button = h('button.btn'); var button = h('button.btn');
@ -93,7 +95,7 @@ define([
}); });
}; };
setButton(!md.enableColors); setButton(!md.enableColors);
$d.append(h('div.cp-app-prop', [Messages.cba_properties, h('br'), div])); $d.append(h('div.cp-app-prop', [Messages.cba_properties, hint, div]));
})(); })();
} }

Loading…
Cancel
Save