Add a configurable background color in the file app in view mode
This commit is contained in:
parent
91e42f1518
commit
fb192a2c45
@ -42,6 +42,11 @@ define(function() {
|
|||||||
'#800080', // purple
|
'#800080', // purple
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// Background color in the apps with centered content:
|
||||||
|
// - file app in view mode
|
||||||
|
// - rich text app when editor's width reduced in settings
|
||||||
|
config.appBackgroundColor = '#666';
|
||||||
|
|
||||||
// Set enableTemplates to false to remove the button allowing users to save a pad as a template
|
// Set enableTemplates to false to remove the button allowing users to save a pad as a template
|
||||||
// and remove the template category in CryptDrive
|
// and remove the template category in CryptDrive
|
||||||
config.enableTemplates = true;
|
config.enableTemplates = true;
|
||||||
|
|||||||
@ -224,6 +224,8 @@ define([
|
|||||||
if (decrypting) { return; }
|
if (decrypting) { return; }
|
||||||
decrypting = true;
|
decrypting = true;
|
||||||
displayFile(ev, sizeMb, function (err) {
|
displayFile(ev, sizeMb, function (err) {
|
||||||
|
$appContainer.css('background-color',
|
||||||
|
common.getAppConfig().appBackgroundColor);
|
||||||
if (err) { UI.alert(err); }
|
if (err) { UI.alert(err); }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@ -31,6 +31,7 @@ define([
|
|||||||
'/common/common-hash.js',
|
'/common/common-hash.js',
|
||||||
'/common/common-util.js',
|
'/common/common-util.js',
|
||||||
'/bower_components/chainpad/chainpad.dist.js',
|
'/bower_components/chainpad/chainpad.dist.js',
|
||||||
|
'/customize/application_config.js',
|
||||||
|
|
||||||
'/bower_components/diff-dom/diffDOM.js',
|
'/bower_components/diff-dom/diffDOM.js',
|
||||||
|
|
||||||
@ -50,7 +51,8 @@ define([
|
|||||||
ApiConfig,
|
ApiConfig,
|
||||||
Hash,
|
Hash,
|
||||||
Util,
|
Util,
|
||||||
ChainPad)
|
ChainPad,
|
||||||
|
AppConfig)
|
||||||
{
|
{
|
||||||
var DiffDom = window.diffDOM;
|
var DiffDom = window.diffDOM;
|
||||||
|
|
||||||
@ -592,7 +594,8 @@ define([
|
|||||||
}
|
}
|
||||||
// Used in ckeditor-config.js
|
// Used in ckeditor-config.js
|
||||||
Ckeditor.CRYPTPAD_URLARGS = ApiConfig.requireConf.urlArgs;
|
Ckeditor.CRYPTPAD_URLARGS = ApiConfig.requireConf.urlArgs;
|
||||||
var newCss = '.cke_body_width { background: #666; height: 100%; }' +
|
var backColor = AppConfig.appBackgroundColor;
|
||||||
|
var newCss = '.cke_body_width { background: '+ backColor +'; height: 100%; }' +
|
||||||
'.cke_body_width body {' +
|
'.cke_body_width body {' +
|
||||||
'max-width: 50em; padding: 10px 30px; margin: 0 auto; min-height: 100%;'+
|
'max-width: 50em; padding: 10px 30px; margin: 0 auto; min-height: 100%;'+
|
||||||
'box-sizing: border-box;'+
|
'box-sizing: border-box;'+
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user