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(
|
.feat-onboard(
|
||||||
ng-controller="FeatureOnboardingController"
|
ng-controller="FeatureOnboardingController"
|
||||||
ng-class="('feat-onboard-step' + innerStep)"
|
ng-class="('feat-onboard-step' + innerStep)"
|
||||||
ng-if="!state.loading && !isFeatureSettingDefined"
|
ng-if="!state.loading && ui.showCodeCheckerOnboarding"
|
||||||
ng-cloak
|
ng-cloak
|
||||||
)
|
)
|
||||||
.feat-onboard-wrapper
|
.feat-onboard-wrapper
|
||||||
|
@ -29,11 +29,11 @@
|
||||||
span.feat-onboard-adv-title-highlight brackets
|
span.feat-onboard-adv-title-highlight brackets
|
||||||
p Lorem ipsum feature description stuff.
|
p Lorem ipsum feature description stuff.
|
||||||
.feat-onboard-btn-wrapper
|
.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
|
.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;")
|
div(ng-if="innerStep === 2;")
|
||||||
p
|
p.feat-onboard-description
|
||||||
| Remember: you can always turn
|
| Remember: you can always turn
|
||||||
span.feat-onboard-description-name Code check
|
span.feat-onboard-description-name Code check
|
||||||
em on
|
em on
|
||||||
|
@ -41,4 +41,4 @@
|
||||||
em off
|
em off
|
||||||
|, in the settings menu.
|
|, in the settings menu.
|
||||||
.feat-onboard-btn-wrapper
|
.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"
|
view: "editor"
|
||||||
chatOpen: false
|
chatOpen: false
|
||||||
pdfLayout: 'sideBySide'
|
pdfLayout: 'sideBySide'
|
||||||
|
showCodeCheckerOnboarding: true
|
||||||
}
|
}
|
||||||
$scope.user = window.user
|
$scope.user = window.user
|
||||||
|
|
||||||
|
|
|
@ -2,20 +2,21 @@ define [
|
||||||
"base"
|
"base"
|
||||||
], (App) ->
|
], (App) ->
|
||||||
App.controller "FeatureOnboardingController", ($scope, settings) ->
|
App.controller "FeatureOnboardingController", ($scope, settings) ->
|
||||||
$scope.isFeatureSettingDefined = window.userSettings.syntaxValidation?;
|
|
||||||
|
|
||||||
$scope.innerStep = 1
|
$scope.innerStep = 1
|
||||||
|
|
||||||
$scope.turnCodeCheckOn = () ->
|
$scope.turnCodeCheckOn = () ->
|
||||||
settings.saveSettings({ syntaxValidation: true })
|
settings.saveSettings({ syntaxValidation: true })
|
||||||
|
scope.settings.syntaxValidation = true
|
||||||
navToInnerStep2()
|
navToInnerStep2()
|
||||||
|
|
||||||
$scope.turnCodeCheckOn = () ->
|
$scope.turnCodeCheckOn = () ->
|
||||||
settings.saveSettings({ syntaxValidation: false })
|
settings.saveSettings({ syntaxValidation: false })
|
||||||
|
scope.settings.syntaxValidation = false
|
||||||
navToInnerStep2()
|
navToInnerStep2()
|
||||||
|
|
||||||
$scope.dismiss = () ->
|
$scope.dismiss = () ->
|
||||||
$scope.isFeatureSettingDefined = true
|
$scope.ui.leftMenuShown = false
|
||||||
|
$scope.ui.showCodeCheckerOnboarding = false
|
||||||
|
|
||||||
navToInnerStep2 = () ->
|
navToInnerStep2 = () ->
|
||||||
$scope.innerStep = 2
|
$scope.innerStep = 2
|
||||||
|
|
Loading…
Reference in a new issue