diff --git a/customize.dist/src/less2/include/alertify.less b/customize.dist/src/less2/include/alertify.less index db951613c..aa983c755 100644 --- a/customize.dist/src/less2/include/alertify.less +++ b/customize.dist/src/less2/include/alertify.less @@ -167,7 +167,7 @@ margin-bottom: @alertify_padding-base; margin: 0; overflow: auto; - :last-child { + &:last-child { margin-bottom: 0; } } @@ -198,7 +198,7 @@ background-color: @alertify-light-bg; } &.disabled { - color: #949494; + color: @colortheme_alertify-cancel-border; cursor: not-allowed; } } diff --git a/customize.dist/src/less2/include/forms.less b/customize.dist/src/less2/include/forms.less index db3ad3fbd..0acbd49b4 100644 --- a/customize.dist/src/less2/include/forms.less +++ b/customize.dist/src/less2/include/forms.less @@ -98,6 +98,7 @@ text-decoration: none; cursor: pointer; border-radius: 0; + transition: none; .fa, .cptools { margin-right: 0.2em; @@ -160,6 +161,15 @@ } } + &.btn-light { + border-color: @cryptpad_text_col; + color: @cryptpad_text_col; + background-color: transparent; + &:hover, &:hover, &:focus { + background-color: fade(@cryptpad_text_col, 25%); + } + } + &.cancel, &.btn-cancel { border-color: @colortheme_alertify-cancel-border; color: @colortheme_alertify-cancel-border; diff --git a/customize.dist/src/less2/include/modals-ui-elements.less b/customize.dist/src/less2/include/modals-ui-elements.less index e8282f6e8..a0b439c45 100644 --- a/customize.dist/src/less2/include/modals-ui-elements.less +++ b/customize.dist/src/less2/include/modals-ui-elements.less @@ -112,6 +112,69 @@ margin-left: 10px; } + .cp-snapshots-modal { + & > input:last-child { + margin-bottom: 0 !important; + } + } + .cp-snapshots-container { + @snapshot_spacing: 10px; + display: flex; + flex-flow: column; + color: @cryptpad_text_col; + margin-bottom: @snapshot_spacing; + max-height: 245px; + overflow: auto; + outline: none; + .cp-snapshot-spinner { + min-height: 90px; + text-align: center; + } + .cp-snapshot-element { + display: flex; + align-items: center; + padding: 5px 0; + outline: none; + & > i { + margin-left: @snapshot_spacing; + text-align: center; + } + .cp-snapshot-title { + margin-left: @snapshot_spacing; + display: flex; + flex-flow: column; + flex: 1; + min-width: 0; + span { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + .cp-snapshot-time { + font-size: 12px; + } + } + .cp-snapshot-buttons { + margin-left: @snapshot_spacing; + display: none; + align-items: flex-start; + margin-bottom: -3px; + .cp-button-confirm { + margin-right: @snapshot_spacing; + } + button { + margin-right: @snapshot_spacing; + } + } + &:hover, &:focus, &:focus-within { + .cp-snapshot-buttons { + display: flex; + } + background-color: #DDD; + } + } + } + // mediatag preview #cp-mediatag-preview-modal { .cp-modal { diff --git a/customize.dist/src/less2/include/toolbar-history.less b/customize.dist/src/less2/include/toolbar-history.less index 2753daf8a..00a18fe0b 100644 --- a/customize.dist/src/less2/include/toolbar-history.less +++ b/customize.dist/src/less2/include/toolbar-history.less @@ -22,6 +22,35 @@ font: @colortheme_app-font; } + + @media screen and (max-width: 870px) { + flex-flow: column; + .cp-toolbar-history-actions { + width: 100%; + .cp-history-actions-first { + margin-right: 0 !important; + } + } + .cp-toolbar-history-timeline { + width: ~"calc(100% - 20px)"; + margin-right: 10px !important; + } + } + + @media screen and (max-height: 500px) { + padding-top: 0px; + .cp-history-timeline-line { + display: none !important; + } + .cp-toolbar-history-timeline { + width: 100% !important; + margin: 0 !important; + } + .cp-history-timeline-actions { + margin-left: 0 !important; + } + } + &.cp-history-init { padding: 0; height: 32px; @@ -33,6 +62,15 @@ flex: 1; margin-left: 10px; margin-right: @fill-width; + .cp-history-timeline-time { + font-size: 12px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + flex: 1; + min-width: 0; + text-align: center; + } } .cp-toolbar-history-actions { display: flex; @@ -51,6 +89,13 @@ .fa:not(:last-child) { margin-right: 5px; } + &:disabled { + cursor: not-allowed !important; + opacity: 0.6; + &:hover, &:active { + background-color: transparent; + } + } } } @@ -88,7 +133,7 @@ border-left: none; width: 2px !important; background: @pos-color; - &:before { + &:before { left: -6px; } } @@ -166,6 +211,7 @@ right: 1px; top: 1px; bottom: 1px; + cursor: pointer; .cp-history-snapshot { position: absolute; border: 2px solid @cryptpad_text_col; diff --git a/customize.dist/src/less2/include/toolbar.less b/customize.dist/src/less2/include/toolbar.less index 863e828a7..9adef38ce 100644 --- a/customize.dist/src/less2/include/toolbar.less +++ b/customize.dist/src/less2/include/toolbar.less @@ -910,9 +910,35 @@ display: none; text-align: center; width: 100%; - padding: 10px 0; + padding: 5px 0; align-items: center; - justify-content: center; + justify-content: space-between; + .cp-toolbar-snapshots-info { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + flex: 1; + min-width: 0; + i { + width: 30px; + } + } + @media screen and (max-width: @browser_media-medium-screen) { + flex-flow: column; + .cp-toolbar-snapshots-info { + max-width: 100%; + } + } + .cp-toolbar-snapshots-actions { + button { + margin: 0 5px; + border: 1px solid @cryptpad_text_col; + text-transform: uppercase; + i:not(:last-child) { + margin-right: 5px; + } + } + } } .cp-toolbar-bottom { background-color: @toolbar-bg-color-light; diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 288770e69..899363b06 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -758,23 +758,16 @@ define([ button = $(''); break; } - var active = $(".cp-toolbar-history:visible").length !== 0; button = $('