mirror of
https://github.com/trezor/trezor-wallet
synced 2025-05-30 12:49:01 +00:00
add NoBackup notification
This commit is contained in:
parent
40790470c2
commit
19dbf88d3c
@ -0,0 +1,25 @@
|
|||||||
|
/* @flow */
|
||||||
|
import * as React from 'react';
|
||||||
|
import Notification from 'components/Notification';
|
||||||
|
|
||||||
|
import type { Props } from '../../index';
|
||||||
|
|
||||||
|
export default (props: Props) => {
|
||||||
|
const { selectedDevice } = props.wallet;
|
||||||
|
const needsBackup = selectedDevice && selectedDevice.features && selectedDevice.features.needs_backup;
|
||||||
|
if (!needsBackup) return null;
|
||||||
|
return (
|
||||||
|
<Notification
|
||||||
|
key="needs-backup"
|
||||||
|
type="warning"
|
||||||
|
title="Your Trezor is not backed up!"
|
||||||
|
message="If your device is ever lost or damaged, your funds will be lost. Backup your device first, to protect your coins against such events."
|
||||||
|
actions={
|
||||||
|
[{
|
||||||
|
label: 'Create a backup',
|
||||||
|
callback: () => {}, //TODO
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
@ -12,6 +12,7 @@ import * as RouterActions from 'actions/RouterActions';
|
|||||||
import OnlineStatus from './components/OnlineStatus';
|
import OnlineStatus from './components/OnlineStatus';
|
||||||
import UpdateBridge from './components/UpdateBridge';
|
import UpdateBridge from './components/UpdateBridge';
|
||||||
import UpdateFirmware from './components/UpdateFirmware';
|
import UpdateFirmware from './components/UpdateFirmware';
|
||||||
|
import NoBackup from './components/NoBackup';
|
||||||
|
|
||||||
export type StateProps = {
|
export type StateProps = {
|
||||||
connect: $ElementType<State, 'connect'>;
|
connect: $ElementType<State, 'connect'>;
|
||||||
@ -33,6 +34,7 @@ const Notifications = (props: Props) => (
|
|||||||
<OnlineStatus {...props} />
|
<OnlineStatus {...props} />
|
||||||
<UpdateBridge {...props} />
|
<UpdateBridge {...props} />
|
||||||
<UpdateFirmware {...props} />
|
<UpdateFirmware {...props} />
|
||||||
|
<NoBackup {...props} />
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user