Add spacing to block edit UI

pull/1/head
David Benqué 4 years ago
parent aaff13795e
commit 1a1ed33db4

@ -253,6 +253,7 @@
} }
} }
.cp-form-edit-buttons-container { .cp-form-edit-buttons-container {
margin-top: 20px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
@ -297,11 +298,26 @@
line-height: 31px; line-height: 31px;
} }
} }
&.editable { cursor: grab; } &.editable {
cursor: grab;
.cp-form-edit-save {
margin-top: 20px;
button {
margin-right: 10px;
}
}
.cp-form-edit-type {
margin-bottom: 10px;
.cp-dropdown-container {
margin-left: 10px;
}
}
}
} }
.cp-form-edit-max-options { .cp-form-edit-max-options {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 10px;
input { input {
width: 100px; width: 100px;
margin-left: 10px; margin-left: 10px;
@ -326,6 +342,10 @@
} }
} }
.cp-form-edit-block { .cp-form-edit-block {
button.btn-secondary {
margin-left: 30px;
}
.cp-form-handle { .cp-form-handle {
display: flex; display: flex;
align-items: center; align-items: center;
@ -337,6 +357,7 @@
} }
} }
.cp-form-edit-block-input { .cp-form-edit-block-input {
margin-bottom: 5px; // XXX DB margin bug
&.sortable-ghost { visibility: hidden; } &.sortable-ghost { visibility: hidden; }
&.sortable-drag { opacity: 0.9 !important; } &.sortable-drag { opacity: 0.9 !important; }
display: flex; display: flex;
@ -344,6 +365,8 @@
input { input {
flex: 1; flex: 1;
min-width: 100px; min-width: 100px;
border-color: @cryptpad_text_col;
border-right: 0px;
} }
button { button {
i { margin: 0 !important; } i { margin: 0 !important; }

@ -187,7 +187,7 @@ define([
cb(getRes()); cb(getRes());
}); });
return h('div', [cancelBlock, saveBlock]); return h('div.cp-form-edit-save', [cancelBlock, saveBlock]);
}; };
var editTextOptions = function (opts, setCursorGetter, cb, tmp) { var editTextOptions = function (opts, setCursorGetter, cb, tmp) {
if (tmp && tmp.content && Sortify(opts) === Sortify(tmp.old)) { if (tmp && tmp.content && Sortify(opts) === Sortify(tmp.old)) {
@ -371,7 +371,7 @@ define([
if (cursor && cursor.el === val && !cursor.item) { setCursor(); } if (cursor && cursor.el === val && !cursor.item) { setCursor(); }
} }
var del = h('button.btn.btn-danger', h('i.fa.fa-times')); var del = h('button.btn.btn-danger-outline', h('i.fa.fa-times'));
var el = h('div.cp-form-edit-block-input', [ var el = h('div.cp-form-edit-block-input', [
h('span.cp-form-handle', [ h('span.cp-form-handle', [
h('i.fa.fa-ellipsis-v'), h('i.fa.fa-ellipsis-v'),
@ -845,7 +845,7 @@ define([
return [ return [
block, block,
h('div', [cancelBlock, saveBlock]) h('div.cp-form-edit-save', [cancelBlock, saveBlock])
]; ];
}, },
getCursor: function () { return cursorGetter(); }, getCursor: function () { return cursorGetter(); },

Loading…
Cancel
Save