mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Improve visibility logic.
This commit is contained in:
parent
31697bd1e2
commit
aa58b70d43
3 changed files with 10 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
|||
.feat-onboard(
|
||||
ng-controller="FeatureOnboardingController"
|
||||
ng-class="('feat-onboard-step' + innerStep)"
|
||||
ng-if="!state.loading && !isFeatureSettingDefined"
|
||||
ng-if="!state.loading && ui.showCodeCheckerOnboarding"
|
||||
ng-cloak
|
||||
)
|
||||
.feat-onboard-wrapper
|
||||
|
@ -29,11 +29,11 @@
|
|||
span.feat-onboard-adv-title-highlight brackets
|
||||
p Lorem ipsum feature description stuff.
|
||||
.feat-onboard-btn-wrapper
|
||||
.btn.btn-primary(ng-click="turnCodeCheckOn();") Yes, turn Code check on
|
||||
button.btn.btn-primary(ng-click="turnCodeCheckOn();") Yes, turn Code check on
|
||||
.feat-onboard-btn-wrapper
|
||||
.btn.btn-default(ng-click="turnCodeCheckOn();") No, disable it for now
|
||||
button.btn.btn-default(ng-click="turnCodeCheckOn();") No, disable it for now
|
||||
div(ng-if="innerStep === 2;")
|
||||
p
|
||||
p.feat-onboard-description
|
||||
| Remember: you can always turn
|
||||
span.feat-onboard-description-name Code check
|
||||
em on
|
||||
|
@ -41,4 +41,4 @@
|
|||
em off
|
||||
|, in the settings menu.
|
||||
.feat-onboard-btn-wrapper
|
||||
.btn.btn-primary(ng-click="dismiss();") OK, got it
|
||||
button.btn.btn-primary(ng-click="dismiss();") OK, got it
|
|
@ -65,6 +65,7 @@ define [
|
|||
view: "editor"
|
||||
chatOpen: false
|
||||
pdfLayout: 'sideBySide'
|
||||
showCodeCheckerOnboarding: true
|
||||
}
|
||||
$scope.user = window.user
|
||||
|
||||
|
|
|
@ -2,20 +2,21 @@ define [
|
|||
"base"
|
||||
], (App) ->
|
||||
App.controller "FeatureOnboardingController", ($scope, settings) ->
|
||||
$scope.isFeatureSettingDefined = window.userSettings.syntaxValidation?;
|
||||
|
||||
$scope.innerStep = 1
|
||||
|
||||
$scope.turnCodeCheckOn = () ->
|
||||
settings.saveSettings({ syntaxValidation: true })
|
||||
scope.settings.syntaxValidation = true
|
||||
navToInnerStep2()
|
||||
|
||||
$scope.turnCodeCheckOn = () ->
|
||||
settings.saveSettings({ syntaxValidation: false })
|
||||
scope.settings.syntaxValidation = false
|
||||
navToInnerStep2()
|
||||
|
||||
$scope.dismiss = () ->
|
||||
$scope.isFeatureSettingDefined = true
|
||||
$scope.ui.leftMenuShown = false
|
||||
$scope.ui.showCodeCheckerOnboarding = false
|
||||
|
||||
navToInnerStep2 = () ->
|
||||
$scope.innerStep = 2
|
||||
|
|
Loading…
Reference in a new issue