Skip to content

Commit 4f2e3dd

Browse files
committed
simplify feature flag logic
1 parent 4ae8063 commit 4f2e3dd

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

client/directives/components/newContainer/newContainerTooltipView.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
)
55

66
div(
7-
ng-if = "!NCC.showAddServicesPopover() && !($root.featureFlags.demoPersonalOnly && !NCC.currentOrg.isPersonalAccount())"
7+
ng-if = "!NCC.showAddServicesPopover() && !$root.featureFlags.demoPersonalOnly"
88
ng-include = "'templateMenuEmptyPopoverView'"
99
)
1010

1111
div(
12-
ng-if = "NCC.showAddServicesPopover() || ($root.featureFlags.demoPersonalOnly && !NCC.currentOrg.isPersonalAccount())"
12+
ng-if = "NCC.showAddServicesPopover() || $root.featureFlags.demoPersonalOnly"
1313
)
1414
.grid-block.popover-header
1515
button.grid-block.align-center.btn.btn-radio(

client/directives/instances/instance/instanceHeaderView.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
)
7474

7575
.popover.bottom.in.popover-url.below-modals(
76-
ng-if = "showUrlCallout() && !($root.featureFlags.demoPersonalOnly && !currentOrg.isPersonalAccount())"
76+
ng-if = "showUrlCallout() && !$root.featureFlags.demoPersonalOnly"
7777
ng-include = "'containerUrlPopoverView'"
7878
)
7979

client/templates/instances/viewInstancesList.jade

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
//- 'select demo' guide
55
.grid-block.popover.in.margin-top-xs.popover-demo.demo-transition.js-animate(
6-
ng-if = "CIS.shouldShowDemoSelector() && !($root.featureFlags.demoPersonalOnly && !CIS.currentOrg.isPersonalAccount())"
6+
ng-if = "CIS.shouldShowDemoSelector() && !$root.featureFlags.demoPersonalOnly"
77
)
88
.grid-block
99
.slide.slide-out(
@@ -30,7 +30,7 @@
3030

3131
//- search
3232
label.grid-block.shrink.vertical.label-search(
33-
ng-if = "!CIS.shouldShowDemoSelector() || ($root.featureFlags.demoPersonalOnly && !CIS.currentOrg.isPersonalAccount())"
33+
ng-if = "!CIS.shouldShowDemoSelector() || $root.featureFlags.demoPersonalOnly"
3434
)
3535
input.input.input-xs.input-search(
3636
ng-model = "CIS.searchBranches"
@@ -63,7 +63,7 @@
6363
)
6464

6565
.grid-block.align-center.padding-sm.popover.top.in.popover-demo(
66-
ng-if = "CIS.showInstanceRunningPopover() && !($root.featureFlags.demoPersonalOnly && !CIS.currentOrg.isPersonalAccount())"
66+
ng-if = "CIS.showInstanceRunningPopover() && !$root.featureFlags.demoPersonalOnly"
6767
ng-include = "'popoverDemoUrlHiddenView'"
6868
)
6969

@@ -132,7 +132,7 @@
132132

133133
//- wraps all branch clusters — hide until a branch has been added
134134
.demo-transition.js-animate(
135-
ng-if = "!CIS.isInDemoFlow() || CIS.shouldShowBranchView() || ($root.featureFlags.demoPersonalOnly && !CIS.currentOrg.isPersonalAccount())"
135+
ng-if = "!CIS.isInDemoFlow() || CIS.shouldShowBranchView() || $root.featureFlags.demoPersonalOnly"
136136
)
137137

138138
//- branch clusters
@@ -184,6 +184,6 @@
184184

185185
//- show only on demo repos
186186
.grid-block.vertical.padding-sm.popover.bottom.in.popover-demo.branch-step(
187-
ng-if = "$root.featureFlags.demoAutoAddBranch && CIS.shouldShowAddBranchCTA(masterInstance) && !($root.featureFlags.demoPersonalOnly && !currentOrg.isPersonalAccount())"
187+
ng-if = "$root.featureFlags.demoAutoAddBranch && CIS.shouldShowAddBranchCTA(masterInstance) && !$root.featureFlags.demoPersonalOnly"
188188
ng-include = "'popoverDemoBranchContainerView'"
189189
)

0 commit comments

Comments
 (0)