Fix overflowing spinner when loading history

pull/1/head
yflory 4 years ago
parent 3f0dbe7565
commit 21eb1b6a1b

@ -22,6 +22,11 @@
font: @colortheme_app-font; font: @colortheme_app-font;
} }
&.cp-history-init {
padding: 0;
height: 32px;
}
.cp-toolbar-history-timeline { .cp-toolbar-history-timeline {
display: flex; display: flex;
flex-flow: column; flex-flow: column;

@ -20,6 +20,7 @@ define([
History.state = true; History.state = true;
var $toolbar = config.$toolbar; var $toolbar = config.$toolbar;
var $hist = $toolbar.find('.cp-toolbar-history'); var $hist = $toolbar.find('.cp-toolbar-history');
$hist.addClass('cp-history-init');
if (!config.applyVal || !config.setHistory || !config.onLocal || !config.onRemote) { if (!config.applyVal || !config.setHistory || !config.onLocal || !config.onRemote) {
throw new Error("Missing config element: applyVal, onLocal, onRemote, setHistory"); throw new Error("Missing config element: applyVal, onLocal, onRemote, setHistory");
@ -411,6 +412,7 @@ define([
// Create the history toolbar // Create the history toolbar
var display = function () { var display = function () {
$hist.html(''); $hist.html('');
$hist.removeClass('cp-history-init');
var fastPrev = h('button.cp-toolbar-history-previous', { title: Messages.history_fastPrev }, [ var fastPrev = h('button.cp-toolbar-history-previous', { title: Messages.history_fastPrev }, [
h('i.fa.fa-step-backward'), h('i.fa.fa-step-backward'),
@ -524,8 +526,8 @@ define([
} }
if (config.drive) { if (config.drive) {
$hist.addClass('cp-history-drive'); $hist.addClass('cp-history-drive');
snapshot.disabled = true; $(snapshot).hide();
share.disabled = true; $(share).hide();
} }
$hist.append([timeline, actions]); $hist.append([timeline, actions]);

Loading…
Cancel
Save