Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_initZite(_target, _path) {
// FIXME If the tag is NOT an address then we need to do a
// ZeroName lookup to retrieve the address
const address = _target;
// FIXME Handle the path
// const path = _path;
/* Set the zite address. */
stores.Stage.initZite(address);
/* Open the stage window. */
Navigation.mergeOptions('zeronet.Stage', {
sideMenu: {
left: {
visible: true,
},
},
});
}
}
updateOptions() {
Navigation.mergeOptions(this.props.componentId, AccountVotedScreen.options);
}
setLegacyModeButtons() {
Navigation.mergeOptions(this.props.componentId, {
topBar: {
rightButtons: [],
},
})
}
onClickProvidedId = () => {
Navigation.showModal({
stack: {
children: [
{
component: {
name: 'navigation.playground.TextScreen',
id: 'my unique id'
}
}
]
}
});
Navigation.mergeOptions('my unique id', {
topBar: {
title: {
text: 'User provided id'
}
}
});
}
const doubleCard: boolean = !!props.card && (
props.card.double_sided ||
!!(props.card.linked_card && props.card.linked_card.imagesrc)
);
this.state = {
flipped: !!props.card && (
props.card.type_code === 'investigator' ||
props.card.type_code === 'act' ||
props.card.type_code === 'agenda' ||
(doubleCard && !!props.card.hidden)),
};
if (doubleCard) {
Navigation.mergeOptions(props.componentId, {
topBar: {
rightButtons: [{
id: 'flip',
icon: iconsMap.flip_card,
color: COLORS.navButton,
testID: t`Flip Card`,
}],
},
});
}
this._navEventListener = Navigation.events().bindComponent(this);
}
const mergeOptions = (selfOrCompId, options) => Navigation.mergeOptions(compId(selfOrCompId), options);
toggleTopBar = shouldShow => {
Navigation.mergeOptions(this.props.componentId, {
topBar: {
visible: shouldShow,
animate: true,
},
});
};
toggleTabBarVisibility(componentId, visible) {
Navigation.mergeOptions(componentId, {
bottomTabs: {
visible,
drawBehind: true,
animate: true
}
});
}
setDefaultButtons() {
Navigation.mergeOptions(this.props.componentId, {
topBar: {
rightButtons: [
{
id: 'edit',
text: 'Edit',
},
],
},
})
}
navigationButtonPressed({ buttonId }: { buttonId: string }) {
if (buttonId === 'ICON_MENU') {
Navigation.mergeOptions(Store.menuComponentId, {
sideMenu: {
left: {
visible: true,
},
},
});
}
}