File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed
src/in-page-ui/ribbon/react Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ export interface Props extends RibbonSubcomponentProps {
79
79
getRootElement : ( ) => HTMLElement
80
80
bgScriptBG : RemoteBGScriptInterface
81
81
setWriteError : ( error : string ) => void
82
+ showRabbitHoleButton : boolean
82
83
}
83
84
84
85
interface State {
@@ -1683,6 +1684,7 @@ export default class Ribbon extends Component<Props, State> {
1683
1684
</ IconContainer >
1684
1685
)
1685
1686
} else {
1687
+ console . log ( 'showRabbitHoleButton' , this . props . showRabbitHoleButton )
1686
1688
return (
1687
1689
< >
1688
1690
< InnerRibbon
@@ -1775,6 +1777,8 @@ export default class Ribbon extends Component<Props, State> {
1775
1777
this . renderAItriggerButton ( ) }
1776
1778
{ ! this . props . sidebar
1777
1779
. isSidebarOpen &&
1780
+ this . props
1781
+ . showRabbitHoleButton &&
1778
1782
this . renderRabbitHoleTriggerButton ( ) }
1779
1783
{ ! this . props . sidebar
1780
1784
. isSidebarOpen &&
Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ export default class RibbonContainer extends StatefulUIElement<
133
133
} )
134
134
}
135
135
isTrial = { this . state . isTrial }
136
+ showRabbitHoleButton = { this . state . showRabbitHoleButton }
136
137
signupDate = { this . state . signupDate }
137
138
pageActivityIndicatorBG = { this . props . pageActivityIndicatorBG }
138
139
contentSharingBG = { this . props . contentSharing }
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ export interface RibbonContainerState {
68
68
isTrial : boolean
69
69
signupDate : number
70
70
themeVariant : MemexThemeVariant
71
+ showRabbitHoleButton : boolean
71
72
}
72
73
73
74
export type RibbonContainerEvents = UIEvent <
@@ -184,6 +185,7 @@ export class RibbonContainerLogic extends UILogic<
184
185
isTrial : false ,
185
186
signupDate : null ,
186
187
themeVariant : null ,
188
+ showRabbitHoleButton : false ,
187
189
}
188
190
}
189
191
@@ -225,6 +227,21 @@ export class RibbonContainerLogic extends UILogic<
225
227
} catch ( error ) {
226
228
console . error ( 'error in updatePageCounter' , error )
227
229
}
230
+
231
+ const onboardingComplete = await browser . storage . local . get (
232
+ 'rabbitHoleBetaFeatureAccessOnboardingDone' ,
233
+ )
234
+
235
+ console . log (
236
+ 'onboardingcomlete' ,
237
+ onboardingComplete [ 'rabbitHoleBetaFeatureAccessOnboardingDone' ] ,
238
+ )
239
+
240
+ if ( onboardingComplete [ 'rabbitHoleBetaFeatureAccessOnboardingDone' ] ) {
241
+ this . emitMutation ( {
242
+ showRabbitHoleButton : { $set : true } ,
243
+ } )
244
+ }
228
245
}
229
246
230
247
async initThemeVariant ( ) {
You can’t perform that action at this time.
0 commit comments