Sfoglia il codice sorgente

Merge branch 'master' into ho-hash-static

Henry Oswald 8 anni fa
parent
commit
dd6bd3b91e

+ 8 - 0
services/web/app/coffee/Features/Errors/Errors.coffee

@@ -26,8 +26,16 @@ InvalidNameError = (message) ->
 	return error
 	return error
 InvalidNameError.prototype.__proto__ = Error.prototype
 InvalidNameError.prototype.__proto__ = Error.prototype
 
 
+UnsupportedFileTypeError = (message) ->
+	error = new Error(message)
+	error.name = "UnsupportedFileTypeError"
+	error.__proto__ = UnsupportedFileTypeError.prototype
+	return error
+UnsupportedFileTypeError.prototype.__proto___ = Error.prototype
+
 module.exports = Errors =
 module.exports = Errors =
 	NotFoundError: NotFoundError
 	NotFoundError: NotFoundError
 	ServiceNotConfiguredError: ServiceNotConfiguredError
 	ServiceNotConfiguredError: ServiceNotConfiguredError
 	TooManyRequestsError: TooManyRequestsError
 	TooManyRequestsError: TooManyRequestsError
 	InvalidNameError: InvalidNameError
 	InvalidNameError: InvalidNameError
+	UnsupportedFileTypeError: UnsupportedFileTypeError

+ 6 - 0
services/web/app/views/project/list.pug

@@ -63,6 +63,12 @@ block content
 					aside.project-list-sidebar.col-md-2.col-xs-3
 					aside.project-list-sidebar.col-md-2.col-xs-3
 						include ./list/side-bar
 						include ./list/side-bar
 
 
+					if isShowingV1Projects && settings.overleaf && settings.overleaf.host
+						.project-list-sidebar-v1-link.col-md-2.col-xs-3
+							span Want to go back to the V1 dashboard?
+							a.btn.btn-default(href=settings.overleaf.host + "/dash?prefer-v1-dash=1")
+								| Go back to V1
+
 					.project-list-main.col-md-10.col-xs-9
 					.project-list-main.col-md-10.col-xs-9
 						include ./list/notifications
 						include ./list/notifications
 						include ./list/project-list
 						include ./list/project-list

+ 1 - 0
services/web/public/stylesheets/_ol_style_includes.less

@@ -0,0 +1 @@
+@import "app/sidebar-v1-dash-link.less";

+ 0 - 1
services/web/public/stylesheets/app/project-list.less

@@ -57,7 +57,6 @@
 		} 
 		} 
 
 
 		.project-list-sidebar when (@is-overleaf) {
 		.project-list-sidebar when (@is-overleaf) {
-			height: 100%;
 			overflow-x: hidden;
 			overflow-x: hidden;
 			overflow-y: auto;
 			overflow-y: auto;
 			-ms-overflow-style: -ms-autohiding-scrollbar;
 			-ms-overflow-style: -ms-autohiding-scrollbar;

+ 32 - 0
services/web/public/stylesheets/app/sidebar-v1-dash-link.less

@@ -0,0 +1,32 @@
+@v1-dash-link-height: 130px;
+
+.project-list-sidebar {
+	height: calc(~"100% -" @v1-dash-link-height);
+}
+
+.project-list-sidebar-v1-link {
+	position: absolute;
+	bottom: 0;
+	height: @v1-dash-link-height;
+	background-color: @v1-dash-link-bg;
+	text-align: center;
+	display: flex;
+	flex-direction: column;
+	justify-content: center;
+	color: white;
+}
+
+	.project-list-sidebar-v1-link a {
+		display: block;
+		margin-left: auto;
+		margin-right: auto;
+		margin-top: 12.5px;
+		padding-top: 0;
+		padding-bottom: 0;
+		background-color: @v1-dash-link-btn-bg;
+		color: #fff;
+	}
+
+	.project-list-sidebar-v1-link a:hover {
+		background-color: @v1-dash-link-btn-hover-bg;
+	}

+ 3 - 0
services/web/public/stylesheets/core/ol-variables.less

@@ -110,6 +110,9 @@
 @sidebar-active-bg              : @ol-blue-gray-6;
 @sidebar-active-bg              : @ol-blue-gray-6;
 @sidebar-hover-bg               : @ol-blue-gray-4;
 @sidebar-hover-bg               : @ol-blue-gray-4;
 @sidebar-hover-text-decoration  : none;
 @sidebar-hover-text-decoration  : none;
+@v1-dash-link-bg                : @ol-blue-gray-4;
+@v1-dash-link-btn-bg            : @ol-blue-gray-5;
+@v1-dash-link-btn-hover-bg      : @ol-blue-gray-6;
 
 
 @folders-menu-margin            : 0 -(@grid-gutter-width / 2);
 @folders-menu-margin            : 0 -(@grid-gutter-width / 2);
 @folders-menu-line-height       : @structured-list-line-height;
 @folders-menu-line-height       : @structured-list-line-height;

+ 2 - 1
services/web/public/stylesheets/ol-style.less

@@ -1,4 +1,5 @@
 // Core variables and mixins
 // Core variables and mixins
 @import "core/ol-variables.less";
 @import "core/ol-variables.less";
 @import "app/ol-style-guide.less";
 @import "app/ol-style-guide.less";
-@import "_style_includes.less";
+@import "_style_includes.less";
+@import "_ol_style_includes.less";