Clean up and lint

master
David Benqué 3 years ago
parent a960d20a93
commit cf01bd8215

@ -74,22 +74,6 @@ define([
return select; return select;
}; };
/* // XXX remove ?
var footerCol = function (title, L, n) {
n = n || 3;
return h('div.col-sm-' + n, [
h('ul.list-unstyled', [
h('li.footer-title', {
'data-localization': title,
}, Msg[title])
].concat(L.map(function (l) {
return h('li', [ l ]);
}))
)
]);
};
*/
var footLink = function (ref, loc, text, icon) { var footLink = function (ref, loc, text, icon) {
if (!ref) { return; } if (!ref) { return; }
var attrs = { var attrs = {

@ -112,7 +112,6 @@ define([
Msg.terms = Msg.footer_tos; //"Terms of Service"; // XXX Msg.terms = Msg.footer_tos; //"Terms of Service"; // XXX
Msg.home_location = "Encrypted data is hosted in {0}"; // XXX Msg.home_location = "Encrypted data is hosted in {0}"; // XXX
// XXX DB: this may be wrong, pasted over form pages.js
var imprintLink = fastLink('imprint'); var imprintLink = fastLink('imprint');
var privacyLink = fastLink('privacy'); var privacyLink = fastLink('privacy');
var termsLink = fastLink('terms'); var termsLink = fastLink('terms');
@ -148,11 +147,9 @@ define([
Msg.home_morestorage = 'For more storage space:'; // XXX Msg.home_morestorage = 'For more storage space:'; // XXX
var subButton = function () { var subButton = function () {
// XXX display donation button even if instance doesn't accept subscriptions
if (Pages.areSubscriptionsAllowed()) { if (Pages.areSubscriptionsAllowed()) {
var sub = h('div.cp-sub-prompt', [ var sub = h('div.cp-sub-prompt', [
h('span', Msg.home_morestorage), h('span', Msg.home_morestorage),
// XXX how to link these properly to accounts?
h('a', {href:"/accounts/"}, h('button', [ h('a', {href:"/accounts/"}, h('button', [
h('i.fa.fa-ticket'), h('i.fa.fa-ticket'),
Msg.features_f_subscribe Msg.features_f_subscribe

@ -5,7 +5,7 @@ define([
'/customize/pages.js', '/customize/pages.js',
'/api/config', '/api/config',
], function (h, UI, Msg, Pages, Config) { ], function (h, UI, Msg, Pages, Config) {
Msg.login_instance = "Connect to your account on {0}"; // XXX insert instance name Msg.login_instance = "Connect to your account on {0}"; // XXX DB highlight instance name?
return function () { return function () {
document.title = Msg.login_login; document.title = Msg.login_login;
return [h('div#cp-main', [ return [h('div#cp-main', [

@ -175,7 +175,7 @@
@cp_sidebar-right-bg: @cryptpad_color_grey_900; @cp_sidebar-right-bg: @cryptpad_color_grey_900;
@cp_sidebar-right-fg: @cryptpad_text_col; @cp_sidebar-right-fg: @cryptpad_text_col;
@cp_sidebar-left-active: @cryptpad_color_grey_400; @cp_sidebar-left-active: @cryptpad_color_grey_400;
@cp_sidebar-left-active-fg: @cryptpad_color_grey_900; // XXX create text_col_inv ? @cp_sidebar-left-active-fg: @cryptpad_color_grey_900;
@cp_sidebar-hint: fade(@cryptpad_text_col, 80%); @cp_sidebar-hint: fade(@cryptpad_text_col, 80%);
// Drive // Drive

@ -329,7 +329,7 @@
max-height: 159px; max-height: 159px;
align-items: center; align-items: center;
.cp-creation-template-element { .cp-creation-template-element {
box-shadow: 0px 0px 5px 1px #00000030; // XXX box-shadow: 0px 0px 5px 1px #00000030; // XXX DB: make shadow var
width: 300px; width: 300px;
max-width: calc(100% - 10px); max-width: calc(100% - 10px);
padding: 5px; padding: 5px;

@ -300,7 +300,6 @@
display: none; display: none;
} }
input { input {
//width: ~"calc(100% - 30px)";
flex: 1; flex: 1;
min-width: 0; min-width: 0;
padding: 0 10px; padding: 0 10px;
@ -310,11 +309,8 @@
& > span.cp-app-drive-element-row { & > span.cp-app-drive-element-row {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
//min-width: ~"calc(100% + 5px)";
.leftside-menu-category_main(); .leftside-menu-category_main();
//width: ~"calc(100% + 5px)"; // XXX remove
margin: 0; margin: 0;
//margin-bottom: -6px;
display: flex; display: flex;
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;
@ -344,7 +340,7 @@
margin-top: 10px; margin-top: 10px;
background-color: @cp_sidebar-left-item-bg; background-color: @cp_sidebar-left-item-bg;
border-radius: @variables_radius; border-radius: @variables_radius;
box-shadow: 0px 0px 5px 1px #00000030; // XXX box-shadow: 0px 0px 5px 1px #00000030; // XXX DB: make shadow var
.cp-app-drive-tree-root { .cp-app-drive-tree-root {
.fa-trash-o { .fa-trash-o {
padding-left: 2px; padding-left: 2px;
@ -385,7 +381,7 @@
} }
} }
.cp-app-drive-tree-docs { .cp-app-drive-tree-docs {
box-shadow: 0px 0px 5px 1px #00000030; // XXX box-shadow: 0px 0px 5px 1px #00000030; // XXX DB: make shadow var
padding: 2px; padding: 2px;
.cp-app-drive-element-row { .cp-app-drive-element-row {

@ -163,7 +163,6 @@
height: 1px; height: 1px;
background: @cp_dropdown-bg-active; background: @cp_dropdown-bg-active;
border: 0 !important; border: 0 !important;
//border-top: 1px solid rgba(0,0,0,.1) !important; // XXX
& + hr { & + hr {
display: none; display: none;
} }

@ -31,7 +31,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
.leftside-menu-category_main(); .leftside-menu-category_main();
box-shadow: 0px 0px 5px 1px #00000030; // XXX box-shadow: 0px 0px 5px 1px #00000030; // XXX DB: make shadow var
} }
} }
&.cp-leftside-narrow { &.cp-leftside-narrow {

@ -15,10 +15,7 @@
@bg-color: @colortheme_apps[default], // color of the toolbar background @bg-color: @colortheme_apps[default], // color of the toolbar background
) { ) {
@toolbar-bg-color: @bg-color; @toolbar-bg-color: @bg-color;
// XXX Todo: clean up unused variables
// XXX: check contrasts of app colors used as btn background // XXX: check contrasts of app colors used as btn background
// @desat-color: desaturate(@bg-color, 20%);
// @toolbar-bg-color-active: contrast(@cp_toolbar-fg, lighten(@bg-color, 20%), darken(@desat-color, 10%));
@toolbar-bg-color-light: lighten(@bg-color, 30%); @toolbar-bg-color-light: lighten(@bg-color, 30%);
@toolbar-bg-color-fade: fade(@toolbar-bg-color-light, 80%); @toolbar-bg-color-fade: fade(@toolbar-bg-color-light, 80%);
}; };
@ -32,7 +29,6 @@
--toolbar-bg-color: @toolbar-bg-color; --toolbar-bg-color: @toolbar-bg-color;
--toolbar-bg-color-fade: @toolbar-bg-color-fade; --toolbar-bg-color-fade: @toolbar-bg-color-fade;
--toolbar-bg-color-light: @toolbar-bg-color-light; --toolbar-bg-color-light: @toolbar-bg-color-light;
// --toolbar-bg-color-active: @toolbar-bg-color-active;
.help_main(); .help_main();
.notifications_main(); .notifications_main();

@ -48,7 +48,7 @@
align-self: center; align-self: center;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
@media screen and (max-width: 990px){ @media screen and (max-width: 990px) {
justify-content: center; justify-content: center;
} }
} }
@ -93,7 +93,7 @@
text-decoration: none; text-decoration: none;
} }
.cp-apps{ .cp-apps {
max-width: 575px; max-width: 575px;
@media screen and (max-width: 990px) { @media screen and (max-width: 990px) {
align-self: baseline; align-self: baseline;

@ -36,7 +36,7 @@
display: flex; display: flex;
flex-flow: column; flex-flow: column;
border-radius: @variables_radius; border-radius: @variables_radius;
box-shadow: 0px 0px 5px 1px #00000030; // XXX DB box-shadow: 0px 0px 5px 1px #00000030; // XXX DB: make shadow var
} }
color: @cp_kanban-fg; color: @cp_kanban-fg;
button { button {
@ -186,7 +186,7 @@
border-radius: @variables_radius; border-radius: @variables_radius;
flex-wrap: wrap; flex-wrap: wrap;
background: @cp_kanban-item-bg; background: @cp_kanban-item-bg;
box-shadow: 0px 0px 5px 1px #00000030; // XXX DB make this a variable? box-shadow: 0px 0px 5px 1px #00000030; // XXX DB: make shadow var
.tools_unselectable(); .tools_unselectable();
touch-action: none; touch-action: none;
cursor: move; cursor: move;

@ -216,9 +216,9 @@
height: 50px; height: 50px;
display: inline-block; display: inline-block;
border-radius: @variables_radius; border-radius: @variables_radius;
background-color: red; // XXX hard coded colors background-color: @cryptpad_color_red;
&.online { &.online {
background-color: green; background-color: @cryptpad_color_green;
} }
} }
.cp-team-member-name { .cp-team-member-name {

Loading…
Cancel
Save