mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #1667 from sharelatex/pr-add-post-integration-survey-link
Add survey link in the projects list sidebar. GitOrigin-RevId: 085f969336e81d546c51043c3ab9dc63585f97fb
This commit is contained in:
parent
9ff021cc88
commit
e6943e8e71
4 changed files with 93 additions and 0 deletions
|
@ -87,6 +87,24 @@ block content
|
|||
aside.project-list-sidebar
|
||||
include ./list/side-bar
|
||||
|
||||
.project-list-sidebar-survey(
|
||||
ng-if="shouldShowSurveyLink"
|
||||
)
|
||||
| Let us know what you think about the new Overleaf by
|
||||
a.project-list-sidebar-survey-link(
|
||||
href="https://digitalscienceta.qualtrics.com/jfe/form/SV_3sMm9UAnx7ptpjL?source=dashboard"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
) taking our survey
|
||||
| .
|
||||
button.project-list-sidebar-survey-dismiss(
|
||||
type="button"
|
||||
title="Dismiss survey notice"
|
||||
ng-click="dismissSurvey()"
|
||||
)
|
||||
span(
|
||||
aria-hidden="true"
|
||||
) ×
|
||||
if hasFeature('v1-return-message')
|
||||
.project-list-sidebar-v2-pane(ng-controller="OverleafV1NotificationController")
|
||||
div
|
||||
|
|
|
@ -34,6 +34,36 @@ define(['base'], function(App) {
|
|||
$scope.nUntagged = 0
|
||||
$scope.reverse = true
|
||||
$scope.searchText = { value: '' }
|
||||
$scope.shouldShowSurveyLink = false
|
||||
|
||||
const surveyStartDate = new Date(2019, 3, 2)
|
||||
|
||||
if (
|
||||
localStorage('dismissed-survey') === true ||
|
||||
new Date() < surveyStartDate
|
||||
) {
|
||||
$scope.shouldShowSurveyLink = false
|
||||
} else {
|
||||
const _v2LaunchDate = new Date(2019, 0, 8)
|
||||
let _nRecentProjects = 0
|
||||
|
||||
for (let project of $scope.projects) {
|
||||
if (
|
||||
project.accessLevel === 'owner' &&
|
||||
new Date(project.lastUpdated) > _v2LaunchDate
|
||||
) {
|
||||
if (++_nRecentProjects > 1) {
|
||||
$scope.shouldShowSurveyLink = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$scope.dismissSurvey = () => {
|
||||
localStorage('dismissed-survey', true)
|
||||
$scope.shouldShowSurveyLink = false
|
||||
}
|
||||
|
||||
$timeout(() => recalculateProjectListHeight(), 10)
|
||||
|
||||
|
|
|
@ -12,6 +12,50 @@
|
|||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.project-list-sidebar-survey {
|
||||
position: relative;
|
||||
font-size: @font-size-small;
|
||||
background-color: @v2-dash-pane-bg;
|
||||
color: @v2-dash-pane-subdued-color;
|
||||
padding: @folders-menu-item-v-padding 20px @folders-menu-item-v-padding @folders-menu-item-h-padding;
|
||||
&::before {
|
||||
content: '';
|
||||
display: block;
|
||||
height: 15px;
|
||||
background-image: linear-gradient(to top, rgba(0, 0, 0, 0.1), transparent);
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
.project-list-sidebar-survey-link {
|
||||
color: @v2-dash-pane-color;
|
||||
font-weight: bold;
|
||||
&:hover,
|
||||
&:active,
|
||||
&:focus {
|
||||
text-decoration: none;
|
||||
color: @v2-dash-pane-color;
|
||||
}
|
||||
}
|
||||
|
||||
.project-list-sidebar-survey-dismiss {
|
||||
.btn-inline-link;
|
||||
position: absolute;
|
||||
top: @folders-menu-item-v-padding;
|
||||
right: @folders-menu-item-v-padding;
|
||||
font-size: @font-size-base;
|
||||
line-height: 1;
|
||||
color: @v2-dash-pane-color;
|
||||
&:hover,
|
||||
&:active,
|
||||
&:focus {
|
||||
text-decoration: none;
|
||||
color: @v2-dash-pane-color;
|
||||
}
|
||||
}
|
||||
|
||||
.project-list-sidebar-v2-pane {
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
|
|
|
@ -172,6 +172,7 @@
|
|||
@v2-dash-pane-bg : @ol-blue-gray-4;
|
||||
@v2-dash-pane-link-color : #FFF;
|
||||
@v2-dash-pane-color : #FFF;
|
||||
@v2-dash-pane-subdued-color : @ol-blue-gray-2;
|
||||
@v2-dash-pane-toggle-color : #FFF;
|
||||
@v2-dash-pane-btn-bg : @ol-blue-gray-5;
|
||||
@v2-dash-pane-btn-hover-bg : @ol-blue-gray-6;
|
||||
|
|
Loading…
Reference in a new issue