Kaynağa Gözat

Merge pull request #864 from sharelatex/pr-history-restore-placeholder

Add a placeholder "restore" button, showing a tooltip.
Paulo Jorge Reis 8 yıl önce
ebeveyn
işleme
4be364cd93

+ 7 - 0
services/web/app/views/project/editor/history/toolbarV2.pug

@@ -30,6 +30,13 @@
 			i.fa.fa-exchange
 			|  #{translate("compare_to_another_version")}
 
+		button.history-toolbar-btn-danger.pull-right(
+			tooltip-html="'<p>This feature is still in progress. Please use copy and paste to restore your files.</p><p>More restore options are coming soon.</p>'"
+			tooltip-placement="bottom"
+		) 
+			i.fa.fa-undo
+			| &nbsp;#{translate("restore_to_before_these_changes")}
+
 	.history-toolbar-entries-list(
 		ng-if="!history.error"
 	)

+ 10 - 2
services/web/public/stylesheets/app/editor/history-v2.less

@@ -29,15 +29,23 @@
 		}
 	.history-toolbar-actions {
 		flex-grow: 1;
+		flex-shrink: 0;
 	}
-		.history-toolbar-btn {
+		.history-toolbar-btn,
+		.history-toolbar-btn-danger {
 			.btn;
-			.btn-info;
 			.btn-xs;
 			padding-left: @padding-small-horizontal;
 			padding-right: @padding-small-horizontal;
 			margin-right: (@line-height-computed / 2);
 		}
+		.history-toolbar-btn {
+			.btn-info;
+		}
+		.history-toolbar-btn-danger {
+			.btn-danger;
+			opacity: 0.65;
+		}
 	.history-toolbar-entries-list {
 		flex: 0 0 @changesListWidth;
 		padding: 0 10px;