From 004e5ee121a12d8f6ed640003ee9bbeb630742b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Benqu=C3=A9?= <mail@davidbenque.com>
Date: Tue, 5 Nov 2019 18:43:17 +0100
Subject: [PATCH 01/10] package versions changed

---
 package-lock.json | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index 0f19280a1..8900202ea 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
 {
   "name": "cryptpad",
-  "version": "3.0.1",
+  "version": "3.4.0",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
@@ -103,7 +103,7 @@
       "resolved": "https://registry.npmjs.org/chainpad-crypto/-/chainpad-crypto-0.2.2.tgz",
       "integrity": "sha512-7MJ7qPz/C4sJPsDhPMjdSRmliOCPoRO0XM1vUomcgXA6HINlW+if9AAt/H4q154nYhZ/b57njgC6cWgd/RDidg==",
       "requires": {
-        "tweetnacl": "git://github.com/dchest/tweetnacl-js.git#v0.12.2"
+        "tweetnacl": "git://github.com/dchest/tweetnacl-js.git#8a21381d696acdc4e99c9f706f1ad23285795f79"
       },
       "dependencies": {
         "tweetnacl": {

From 252402c8e4ec1d0636ea5dd574264f6cf58cdde2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Benqu=C3=A9?= <mail@davidbenque.com>
Date: Wed, 6 Nov 2019 16:24:57 +0100
Subject: [PATCH 02/10] adjust tooltip style

---
 .../src/less2/include/colortheme.less         |  1 +
 customize.dist/src/less2/include/tippy.less   | 22 ++++++++++++++++---
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/customize.dist/src/less2/include/colortheme.less b/customize.dist/src/less2/include/colortheme.less
index 57d0a84f7..dfaf6e5b9 100644
--- a/customize.dist/src/less2/include/colortheme.less
+++ b/customize.dist/src/less2/include/colortheme.less
@@ -167,6 +167,7 @@
 
 @cryptpad_color_blue: #4591C4;
 @cryptpad_color_grey: #999999;
+@cryptpad_color_light_grey: #e0e0e0; 
 @cryptpad_header_col: #1E1F1F;
 @cryptpad_text_col: #3F4141;
 @cryptpad_color_light_blue: #00b7d8;
diff --git a/customize.dist/src/less2/include/tippy.less b/customize.dist/src/less2/include/tippy.less
index 794159ba7..48af41fda 100644
--- a/customize.dist/src/less2/include/tippy.less
+++ b/customize.dist/src/less2/include/tippy.less
@@ -6,13 +6,29 @@
 & {
     .tippy-tooltip.cryptpad-theme {
         /* Your styling here. Example: */
-        background-color: white;
-        box-shadow: 2px 2px 10px #000;
-        font-weight: bold;
+        background-color: @cryptpad_color_light_grey;
+        border-radius: 0px;
+        // box-shadow: 2px 2px 10px #000;
+        // font-weight: bold;
         color: #333;
         overflow-wrap: break-word;
         [x-circle] {
             background-color: unset;
         }
     }
+    .tippy-popper {
+        @arrow-color:@cryptpad_color_light_grey;
+        &[x-placement^='top'] .tippy-arrow {
+          border-top-color: @arrow-color;
+        }
+        &[x-placement^='bottom'] .tippy-arrow {
+          border-bottom-color: @arrow-color;
+        }
+        &[x-placement^='left'] .tippy-arrow {
+          border-left-color: @arrow-color;
+        }
+        &[x-placement^='right'] .tippy-arrow {
+          border-right-color: @arrow-color;
+        }
+    }
 }

From 2bf6e68a72cc4975d00ad1809f3cd1665825bb14 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Benqu=C3=A9?= <mail@davidbenque.com>
Date: Wed, 6 Nov 2019 16:58:45 +0100
Subject: [PATCH 03/10] remove tooltip: drive quota

---
 www/drive/inner.js | 1 -
 1 file changed, 1 deletion(-)

diff --git a/www/drive/inner.js b/www/drive/inner.js
index 360944bbd..ed986bf32 100644
--- a/www/drive/inner.js
+++ b/www/drive/inner.js
@@ -163,7 +163,6 @@ define([
                 common.createUsageBar(null, function (err, $limitContainer) {
                     if (err) { return void DriveUI.logError(err); }
                     APP.$limit = $limitContainer;
-                    $limitContainer.attr('title', Messages.drive_quota);
                 }, true);
             }
 

From 48274b0446c81dba33d594f75300935bc9be5d6a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Benqu=C3=A9?= <mail@davidbenque.com>
Date: Wed, 6 Nov 2019 17:01:26 +0100
Subject: [PATCH 04/10] Remove tooltip: document name in drive

---
 www/common/drive-ui.js | 1 -
 1 file changed, 1 deletion(-)

diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js
index c87d028d3..d0f1ce228 100644
--- a/www/common/drive-ui.js
+++ b/www/common/drive-ui.js
@@ -1810,7 +1810,6 @@ define([
             var $name = $('<span>', {'class': 'cp-app-drive-element-name'}).text(name);
             $element.append($name);
             $element.append($state);
-            $element.attr('title', name);
 
             // display the thumbnail
             // if the thumbnail has already been displayed once, do not reload it, keep the same url

From 1e3d8b1c4ac7f29de846a681c2e2b2d5b915a501 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Benqu=C3=A9?= <mail@davidbenque.com>
Date: Wed, 6 Nov 2019 17:02:07 +0100
Subject: [PATCH 05/10] Remove tooltips: new file in toolbar and grid-view

---
 www/common/drive-ui.js | 2 --
 1 file changed, 2 deletions(-)

diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js
index d0f1ce228..3baa3d977 100644
--- a/www/common/drive-ui.js
+++ b/www/common/drive-ui.js
@@ -2485,7 +2485,6 @@ define([
 
             // Custom style:
             $block.find('button').addClass('cp-app-drive-toolbar-new');
-            $block.find('button').attr('title', Messages.fm_newButtonTitle);
 
             addNewPadHandlers($block, isInRoot);
 
@@ -2782,7 +2781,6 @@ define([
             }).prepend($addIcon.clone()).appendTo($list);
             $element.append($('<span>', {'class': 'cp-app-drive-element-name'})
                 .text(Messages.fm_newFile));
-            $element.attr('title', Messages.fm_newFile);
             $element.click(function () {
                 var $modal = UIElements.createModal({
                     id: 'cp-app-drive-new-ghost-dialog',

From c7146c94698c5ee3869b57891cc81b5f7bf292ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Benqu=C3=A9?= <mail@davidbenque.com>
Date: Wed, 6 Nov 2019 17:04:10 +0100
Subject: [PATCH 06/10] shorten messages for drive file-list tooltips

---
 www/common/translations/messages.json | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json
index d4f0ca48b..b1907076a 100644
--- a/www/common/translations/messages.json
+++ b/www/common/translations/messages.json
@@ -380,7 +380,7 @@
     "fm_tags_used": "Number of uses",
     "fm_restoreDrive": "Resetting your drive to an earlier state. For best results, avoid making changes to your drive until this process is complete.",
     "fm_moveNestedSF": "You can't place one shared folder within another. The folder {0} was not moved.",
-    "fm_passwordProtected": "This document is protected with a password",
+    "fm_passwordProtected": "Password protected",
     "fc_newfolder": "New folder",
     "fc_newsharedfolder": "New shared folder",
     "fc_rename": "Rename",
@@ -1027,7 +1027,7 @@
     "crowdfunding_popup_never": "Don't ask me again",
     "survey": "CryptPad survey",
     "markdown_toc": "Contents",
-    "fm_expirablePad": "This pad will expire on {0}",
+    "fm_expirablePad": "Expires: {0}",
     "admin_authError": "Only administrators can access this page",
     "admin_cat_general": "General",
     "admin_cat_stats": "Statistics",

From c653c777c5c97e36bfaf27f7560afe9fcfe44080 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Benqu=C3=A9?= <mail@davidbenque.com>
Date: Thu, 7 Nov 2019 11:37:40 +0100
Subject: [PATCH 07/10] fix quota bar and upgrade buttons

button alignments and margin
bar border, radius, and removed text shadow
---
 customize.dist/src/less2/include/limit-bar.less | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/customize.dist/src/less2/include/limit-bar.less b/customize.dist/src/less2/include/limit-bar.less
index fe5049249..fe453ffe4 100644
--- a/customize.dist/src/less2/include/limit-bar.less
+++ b/customize.dist/src/less2/include/limit-bar.less
@@ -16,13 +16,13 @@
             align-items: center;
 
             max-width: 100%;
-            margin: 3px;
+            margin: 4px;
             box-sizing: border-box;
-            border-top: 1px solid #999;
+            border-radius: 3px;
             background: white;
             position: relative;
             text-align: center;
-            width: ~"calc(100% - 6px)";
+            width: ~"calc(100% - 8px)";
             height: 35px;
             line-height: 25px;
             overflow: hidden;
@@ -35,7 +35,7 @@
                 top: 0;
                 z-index: 1; // .usage
                 &.cp-limit-usage-normal {
-                    background: @colortheme_green;
+                    background: lighten(@colortheme_green, 15%);
                 }
                 &.cp-limit-usage-warning {
                     background: orange;
@@ -46,11 +46,10 @@
             }
             .cp-limit-usage-text {
                 position: relative;
-                color: grey;
-                text-shadow: 1px 0 2px white, 0 1px 2px white, -1px 0 2px white, 0 -1px 2px white;
+                color: @cryptpad_text_col;
                 z-index: 2; // .usageText
                 font-size: @colortheme_app-font-size;
-                font-weight: bold;
+                
             }
         }
         .cp-limit-buttons {
@@ -58,11 +57,13 @@
             flex-wrap: wrap;
             justify-content: space-around;
             justify-content: space-evenly;
+            padding: 2px;
             a {
                 height: 25px;
                 display: inline-flex;
                 align-items: center;
                 min-width: 200px;
+                margin: 2px;
                 width: 50%;
                 padding-top: 0;
                 padding-bottom: 0;

From ac1d1662319f1e13f1263827413f84d508e12e54 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Benqu=C3=A9?= <mail@davidbenque.com>
Date: Thu, 7 Nov 2019 11:55:35 +0100
Subject: [PATCH 08/10] fix upgrade button alignment

---
 customize.dist/src/less2/include/limit-bar.less | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/customize.dist/src/less2/include/limit-bar.less b/customize.dist/src/less2/include/limit-bar.less
index fe453ffe4..52ae638cb 100644
--- a/customize.dist/src/less2/include/limit-bar.less
+++ b/customize.dist/src/less2/include/limit-bar.less
@@ -57,12 +57,12 @@
             flex-wrap: wrap;
             justify-content: space-around;
             justify-content: space-evenly;
-            padding: 2px;
+            //padding: 2px;
             a {
                 height: 25px;
                 display: inline-flex;
                 align-items: center;
-                min-width: 200px;
+                min-width: 150px;
                 margin: 2px;
                 width: 50%;
                 padding-top: 0;

From 042f9fe6842ae9b99af412fb92882cd574d616c7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Benqu=C3=A9?= <mail@davidbenque.com>
Date: Fri, 8 Nov 2019 10:24:07 +0000
Subject: [PATCH 09/10] add storage info and change bar

---
 .../src/less2/include/colortheme.less         |  1 +
 .../src/less2/include/limit-bar.less          | 34 +++++++++----------
 www/common/common-ui-elements.js              |  7 ++--
 www/common/translations/messages.json         |  1 +
 4 files changed, 22 insertions(+), 21 deletions(-)

diff --git a/customize.dist/src/less2/include/colortheme.less b/customize.dist/src/less2/include/colortheme.less
index dfaf6e5b9..19e8cfe68 100644
--- a/customize.dist/src/less2/include/colortheme.less
+++ b/customize.dist/src/less2/include/colortheme.less
@@ -1,5 +1,6 @@
 @colortheme_font: 'Open Sans', 'Helvetica Neue', sans-serif;
 @colortheme_app-font-size: 16px;
+@colortheme_app-font-size-small: 13px;
 @colortheme_app-font: @colortheme_app-font-size @colortheme_font;
 
 @colortheme_logo-1: #326599;
diff --git a/customize.dist/src/less2/include/limit-bar.less b/customize.dist/src/less2/include/limit-bar.less
index 52ae638cb..ff70a50a2 100644
--- a/customize.dist/src/less2/include/limit-bar.less
+++ b/customize.dist/src/less2/include/limit-bar.less
@@ -7,27 +7,25 @@
     .cp-limit-container {
         @colortheme_green: #5cb85c;
         display: inline-flex;
-        flex-flow: column-reverse;
+        flex-flow: column;
         width: 100%;
-        margin-top: 20px;
+        margin: 20px 0px;
         .cp-limit-bar {
             display: inline-flex;
             justify-content: center;
             align-items: center;
-
             max-width: 100%;
-            margin: 4px;
+            margin: 5px;
             box-sizing: border-box;
             border-radius: 3px;
             background: white;
             position: relative;
             text-align: center;
-            width: ~"calc(100% - 8px)";
-            height: 35px;
-            line-height: 25px;
+            width: ~"calc(100% - 10px)";
+            height: 10px;
             overflow: hidden;
             .cp-limit-usage {
-                height: 100%;
+                height: 10px;
                 display: inline-block;
                 background: blue;
                 position: absolute;
@@ -35,7 +33,7 @@
                 top: 0;
                 z-index: 1; // .usage
                 &.cp-limit-usage-normal {
-                    background: lighten(@colortheme_green, 15%);
+                    background: @colortheme_green;
                 }
                 &.cp-limit-usage-warning {
                     background: orange;
@@ -44,26 +42,26 @@
                     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 {
             display: flex;
             flex-wrap: wrap;
             justify-content: space-around;
             justify-content: space-evenly;
-            //padding: 2px;
             a {
                 height: 25px;
                 display: inline-flex;
                 align-items: center;
                 min-width: 150px;
-                margin: 2px;
+                margin: 3px 5px;
                 width: 50%;
                 padding-top: 0;
                 padding-bottom: 0;
diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js
index ffaefa45d..0e700721e 100644
--- a/www/common/common-ui-elements.js
+++ b/www/common/common-ui-elements.js
@@ -2259,13 +2259,14 @@ define([
                 prettyUsage = Messages._getKey('formattedMB', [usage]);
                 prettyLimit = Messages._getKey('formattedMB', [limit]);
             }
-
+            
             if (quota < 0.8) { $usage.addClass('cp-limit-usage-normal'); }
             else if (quota < 1) { $usage.addClass('cp-limit-usage-warning'); }
             else { $usage.addClass('cp-limit-usage-above'); }
             var $text = $('<span>', {'class': 'cp-limit-usage-text'});
-            $text.text(usage + ' / ' + prettyLimit);
-            $limit.append($usage).append($text);
+            $text.html(Messages._getKey('storageStatus', [prettyUsage, prettyLimit]));
+            $container.prepend($text);
+            $limit.append($usage);
         };
 
         var updateUsage = Util.notAgainForAnother(function () {
diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json
index b1907076a..e99ae28a7 100644
--- a/www/common/translations/messages.json
+++ b/www/common/translations/messages.json
@@ -73,6 +73,7 @@
     "upgrade": "Upgrade",
     "upgradeTitle": "Upgrade your account to increase the storage limit",
     "upgradeAccount": "Upgrade account",
+    "storageStatus": "Storage:<br /><b>{0}</b> used out of <b>{1}</b>",
     "MB": "MB",
     "GB": "GB",
     "KB": "KB",

From 8bb2a8f053997fd475a83d1d07ecb32af04bcacc Mon Sep 17 00:00:00 2001
From: yflory <yann.flory@xwiki.com>
Date: Fri, 8 Nov 2019 15:43:31 +0100
Subject: [PATCH 10/10] Add pad title tooltip in grid mode

---
 www/common/drive-ui.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js
index 3baa3d977..1cacb417b 100644
--- a/www/common/drive-ui.js
+++ b/www/common/drive-ui.js
@@ -1810,6 +1810,9 @@ define([
             var $name = $('<span>', {'class': 'cp-app-drive-element-name'}).text(name);
             $element.append($name);
             $element.append($state);
+            if (getViewMode() === 'grid') {
+                $element.attr('title', name);
+            }
 
             // display the thumbnail
             // if the thumbnail has already been displayed once, do not reload it, keep the same url