From c8f16d427d3442b49c328900b4dda6ab778865b4 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 25 Sep 2020 16:38:42 +0200 Subject: [PATCH] Implement snapshots --- customize.dist/src/less2/include/toolbar.less | 10 +- www/common/common-ui-elements.js | 77 +++++++++++++ www/common/cryptpad-common.js | 6 + www/common/outer/async-store.js | 21 +++- www/common/outer/store-rpc.js | 2 + www/common/sframe-app-framework.js | 104 ++++++++++++++---- www/common/sframe-common-outer.js | 20 ++++ www/common/toolbar.js | 2 + 8 files changed, 219 insertions(+), 23 deletions(-) diff --git a/customize.dist/src/less2/include/toolbar.less b/customize.dist/src/less2/include/toolbar.less index 41736d426..3545417af 100644 --- a/customize.dist/src/less2/include/toolbar.less +++ b/customize.dist/src/less2/include/toolbar.less @@ -886,11 +886,19 @@ } } - .cp-toolbar-history { + .cp-toolbar-history, .cp-toolbar-snapshots { background-color: @toolbar-bg-color-light; background-color: var(--toolbar-bg-color-light); color: @cryptpad_text_col; } + .cp-toolbar-snapshots { + display: none; + text-align: center; + width: 100%; + padding: 10px 0; + align-items: center; + justify-content: center; + } .cp-toolbar-bottom { background-color: @toolbar-bg-color-light; background-color: var(--toolbar-bg-color-light); diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index e0a12b4e8..288770e69 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -876,6 +876,21 @@ define([ common.createNewPadModal(); }); break; + case 'snapshots': + button = $('