Merge branch 'dark' of github.com:xwiki-labs/cryptpad into dark

pull/1/head
ansuz 4 years ago
commit 2a04194909

@ -11,7 +11,6 @@
padding-top: 5px;
padding-bottom: 5px;
border: 1px solid transparent;
background: fade(@cryptpad_text_col, 5%);
.cp-icons-name {
width: 100%;

@ -119,13 +119,13 @@ define([
});
var doXHR = lessEngine.FileManager.prototype.doXHR;
lessEngine.FileManager.prototype.doXHR = function (url, type, callback, errback) {
console.error(url, COLORTHEME); // XXX
//console.error(url, COLORTHEME);
var col = false;
var _url = url;
if (url === COLORTHEME) {
col = true;
url = getColorthemeURL();
console.warn(url);
//console.warn(url);
}
url = fixURL(url);
var cached = tempCache[_url];
@ -137,7 +137,7 @@ define([
cached = tempCache[_url] = { queue: [ callback ], res: undefined };
return doXHR(url, type, function (text, lastModified) {
if (col) {
console.warn(text, lastModified);
//console.warn(text, lastModified);
if (getColortheme() === "custom") {
// XXX COLOR: append custom theme here
var custom = [

@ -14,7 +14,6 @@ try {
var os = isDarkOS() ? 'dark' : 'light';
var key = 'CRYPTPAD_STORE|colortheme';
window.CryptPad_theme = localStorage[key] || os;
console.error(localStorage[key], os);
if (!localStorage[key]) {
// We're using OS theme, check if we need to change
if (os !== localStorage[key+'_default']) {
@ -28,17 +27,6 @@ try {
s.innerHTML = 'body { background: black; }';
document.body.appendChild(s);
}
//localStorage[key] = theme;
// If the wrong theme is built, flush it
/* XXX flush cache when change
if (theme !== built) {
console.warn('New theme, flush cache');
Object.keys(localStorage).forEach(function (k) {
if (k.indexOf('CRYPTPAD_CACHE|') !== 0 && k.indexOf('LESS_CACHE') !== 0) { return; }
delete localStorage[k];
});
}
*/
} catch (e) { console.error(e); }
})();

@ -9,7 +9,6 @@ try {
s.innerHTML = 'body { background: black; }';
document.body.appendChild(s);
}
console.error(theme, os);
} catch (e) { console.error(e); }
})();

@ -381,7 +381,7 @@ define([
/* Remember the user's last choice of theme using localStorage */
var isDark = window.CryptPad_theme === "dark";
var themeKey = ['codemirror', isDark ? 'themedark' : 'theme'];
var defaultTheme = isDark ? 'ansuz' : 'default';
var defaultTheme = isDark ? 'dracula' : 'default';
var todo = function (err, lastTheme) {
lastTheme = lastTheme || defaultTheme;

@ -424,7 +424,7 @@ define([
makeBlock('colortheme', function (cb) {
var theme = window.cryptpadStore.store['colortheme'] || 'default';
var os = window.cryptpadStore.store['colortheme_default'] || 'light';
var values = ['default', 'light', 'dark', 'custom'];
var values = ['default', 'light', 'dark'/*, 'custom'*/];
var defaultTheme = Messages['settings_colortheme_'+os];
var opts = h('div.cp-settings-radio-container', [

Loading…
Cancel
Save