Browse Source

Merge pull request #1509 from gre/disable-ripple-install

Disable Ripple & ZenCash install (now XRP and Horizen)
master
Meriadec Pillet 6 years ago
committed by GitHub
parent
commit
3be9d3fee6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/components/ManagerPage/AppsList.js
  2. 26
      src/components/ManagerPage/ManagerApp.js

5
src/components/ManagerPage/AppsList.js

@ -71,6 +71,9 @@ type State = {
mode: Mode,
}
const oldAppsInstallDisabled = ['ZenCash', 'Ripple']
const canHandleInstall = c => !oldAppsInstallDisabled.includes(c.name)
const LoadingApp = () => (
<FakeManagerAppContainer noShadow align="center" justify="center" style={{ height: 90 }}>
<Spinner size={16} color="rgba(0, 0, 0, 0.3)" />
@ -285,7 +288,7 @@ class AppsList extends PureComponent<Props, State> {
name={c.name}
version={`Version ${c.version}`}
icon={ICONS_FALLBACK[c.icon] || c.icon}
onInstall={this.handleInstallApp(c)}
onInstall={canHandleInstall(c) ? this.handleInstallApp(c) : null}
onUninstall={this.handleUninstallApp(c)}
/>
))}

26
src/components/ManagerPage/ManagerApp.js

@ -49,7 +49,7 @@ type Props = {
name: string,
version: string,
icon: string,
onInstall: Function,
onInstall?: Function,
onUninstall: Function,
}
@ -64,17 +64,19 @@ function ManagerApp({ name, version, icon, onInstall, onUninstall, t }: Props) {
{version}
</Text>
</Box>
<Button
outline
onClick={onInstall}
event={'Manager Install Click'}
eventProperties={{
appName: name,
appVersion: version,
}}
>
{t('app:manager.apps.install')}
</Button>
{onInstall ? (
<Button
outline
onClick={onInstall}
event={'Manager Install Click'}
eventProperties={{
appName: name,
appVersion: version,
}}
>
{t('app:manager.apps.install')}
</Button>
) : null}
<Button
outline
onClick={onUninstall}

Loading…
Cancel
Save