add storage info and change bar
This commit is contained in:
parent
ac1d166231
commit
042f9fe684
@ -1,5 +1,6 @@
|
|||||||
@colortheme_font: 'Open Sans', 'Helvetica Neue', sans-serif;
|
@colortheme_font: 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||||
@colortheme_app-font-size: 16px;
|
@colortheme_app-font-size: 16px;
|
||||||
|
@colortheme_app-font-size-small: 13px;
|
||||||
@colortheme_app-font: @colortheme_app-font-size @colortheme_font;
|
@colortheme_app-font: @colortheme_app-font-size @colortheme_font;
|
||||||
|
|
||||||
@colortheme_logo-1: #326599;
|
@colortheme_logo-1: #326599;
|
||||||
|
|||||||
@ -7,27 +7,25 @@
|
|||||||
.cp-limit-container {
|
.cp-limit-container {
|
||||||
@colortheme_green: #5cb85c;
|
@colortheme_green: #5cb85c;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
flex-flow: column-reverse;
|
flex-flow: column;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 20px;
|
margin: 20px 0px;
|
||||||
.cp-limit-bar {
|
.cp-limit-bar {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
margin: 4px;
|
margin: 5px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
background: white;
|
background: white;
|
||||||
position: relative;
|
position: relative;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: ~"calc(100% - 8px)";
|
width: ~"calc(100% - 10px)";
|
||||||
height: 35px;
|
height: 10px;
|
||||||
line-height: 25px;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
.cp-limit-usage {
|
.cp-limit-usage {
|
||||||
height: 100%;
|
height: 10px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background: blue;
|
background: blue;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -35,7 +33,7 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
z-index: 1; // .usage
|
z-index: 1; // .usage
|
||||||
&.cp-limit-usage-normal {
|
&.cp-limit-usage-normal {
|
||||||
background: lighten(@colortheme_green, 15%);
|
background: @colortheme_green;
|
||||||
}
|
}
|
||||||
&.cp-limit-usage-warning {
|
&.cp-limit-usage-warning {
|
||||||
background: orange;
|
background: orange;
|
||||||
@ -44,26 +42,26 @@
|
|||||||
background: red;
|
background: red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.cp-limit-usage-text {
|
|
||||||
position: relative;
|
|
||||||
color: @cryptpad_text_col;
|
|
||||||
z-index: 2; // .usageText
|
|
||||||
font-size: @colortheme_app-font-size;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cp-limit-usage-text {
|
||||||
|
color: @cryptpad_text_col;
|
||||||
|
margin-left: 5px;
|
||||||
|
z-index: 2; // .usageText
|
||||||
|
font-size: @colortheme_app-font-size-small;
|
||||||
|
}
|
||||||
|
|
||||||
.cp-limit-buttons {
|
.cp-limit-buttons {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
//padding: 2px;
|
|
||||||
a {
|
a {
|
||||||
height: 25px;
|
height: 25px;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
min-width: 150px;
|
min-width: 150px;
|
||||||
margin: 2px;
|
margin: 3px 5px;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
|
|||||||
@ -2259,13 +2259,14 @@ define([
|
|||||||
prettyUsage = Messages._getKey('formattedMB', [usage]);
|
prettyUsage = Messages._getKey('formattedMB', [usage]);
|
||||||
prettyLimit = Messages._getKey('formattedMB', [limit]);
|
prettyLimit = Messages._getKey('formattedMB', [limit]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (quota < 0.8) { $usage.addClass('cp-limit-usage-normal'); }
|
if (quota < 0.8) { $usage.addClass('cp-limit-usage-normal'); }
|
||||||
else if (quota < 1) { $usage.addClass('cp-limit-usage-warning'); }
|
else if (quota < 1) { $usage.addClass('cp-limit-usage-warning'); }
|
||||||
else { $usage.addClass('cp-limit-usage-above'); }
|
else { $usage.addClass('cp-limit-usage-above'); }
|
||||||
var $text = $('<span>', {'class': 'cp-limit-usage-text'});
|
var $text = $('<span>', {'class': 'cp-limit-usage-text'});
|
||||||
$text.text(usage + ' / ' + prettyLimit);
|
$text.html(Messages._getKey('storageStatus', [prettyUsage, prettyLimit]));
|
||||||
$limit.append($usage).append($text);
|
$container.prepend($text);
|
||||||
|
$limit.append($usage);
|
||||||
};
|
};
|
||||||
|
|
||||||
var updateUsage = Util.notAgainForAnother(function () {
|
var updateUsage = Util.notAgainForAnother(function () {
|
||||||
|
|||||||
@ -73,6 +73,7 @@
|
|||||||
"upgrade": "Upgrade",
|
"upgrade": "Upgrade",
|
||||||
"upgradeTitle": "Upgrade your account to increase the storage limit",
|
"upgradeTitle": "Upgrade your account to increase the storage limit",
|
||||||
"upgradeAccount": "Upgrade account",
|
"upgradeAccount": "Upgrade account",
|
||||||
|
"storageStatus": "Storage:<br /><b>{0}</b> used out of <b>{1}</b>",
|
||||||
"MB": "MB",
|
"MB": "MB",
|
||||||
"GB": "GB",
|
"GB": "GB",
|
||||||
"KB": "KB",
|
"KB": "KB",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user