-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
151 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import ChangeLabel from "./ChangeLabel"; | ||
import ConfigButtons from "./ConfigButtons"; | ||
import RecoveryButtons from "./RecoveryButtons"; | ||
import FirmwareUpdate from "./FirmwareUpdate"; | ||
|
||
@autobind | ||
class TrezorConfigSections extends React.Component { | ||
|
||
constructor(props) { | ||
super(props); | ||
} | ||
|
||
onTogglePinProtection() { | ||
this.props.togglePinProtection(); | ||
} | ||
|
||
onTogglePassPhraseProtection() { | ||
this.props.togglePassPhraseProtection(); | ||
} | ||
|
||
onChangeHomeScreen() { | ||
this.props.changeToDecredHomeScreen(); | ||
} | ||
|
||
onChangeLabel(newLabel) { | ||
this.props.changeLabel(newLabel); | ||
} | ||
|
||
onWipeDevice() { | ||
this.props.wipeDevice(); | ||
} | ||
|
||
onRecoverDevice() { | ||
this.props.recoverDevice(); | ||
} | ||
|
||
onUpdateFirmware(path) { | ||
this.props.updateFirmware(path); | ||
} | ||
|
||
onInitDevice() { | ||
this.props.initDevice(); | ||
} | ||
|
||
onReloadDeviceList() { | ||
this.props.reloadDeviceList(); | ||
} | ||
|
||
onClearDeviceSession() { | ||
this.props.clearDeviceSession(); | ||
} | ||
|
||
render() { | ||
const { | ||
onTogglePinProtection, | ||
onTogglePassPhraseProtection, | ||
onChangeHomeScreen, | ||
onChangeLabel, | ||
onWipeDevice, | ||
onRecoverDevice, | ||
onInitDevice, | ||
onUpdateFirmware, | ||
onClearDeviceSession, | ||
loading, | ||
} = this; | ||
|
||
return ( | ||
<> | ||
<ConfigButtons {...{ onTogglePinProtection, onTogglePassPhraseProtection, | ||
onChangeHomeScreen, onClearDeviceSession, loading }} /> | ||
|
||
<ChangeLabel {...{ onChangeLabel, loading }} /> | ||
|
||
<RecoveryButtons {...{ onWipeDevice, onRecoverDevice, onInitDevice, loading }} /> | ||
|
||
<FirmwareUpdate {...{ onUpdateFirmware, loading }} /> | ||
</> | ||
); | ||
} | ||
|
||
} | ||
|
||
export default TrezorConfigSections; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
import { FormattedMessage as T } from "react-intl"; | ||
import Header from "./Header"; | ||
import { StandalonePage } from "layout"; | ||
import { InvisibleButton } from "buttons"; | ||
|
||
export default () => ( | ||
export default ({ onReloadDeviceList }) => ( | ||
<StandalonePage header={<Header />}> | ||
<div> | ||
<T id="trezor.noDevice.message" m="No trezor device detected. Connect the device and check if trezor bridge is installed and running." /> | ||
</div> | ||
<div> | ||
<InvisibleButton onClick={onReloadDeviceList}> | ||
<T id="trezor.noDevice.btnReloadDeviceList" m="Reload Device List"/> | ||
</InvisibleButton> | ||
</div> | ||
</StandalonePage> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,9 @@ | ||
import { StandalonePage } from "layout"; | ||
import ConfigSections from "./ConfigSections"; | ||
import Header from "./Header"; | ||
import ChangeLabel from "./ChangeLabel"; | ||
import ConfigButtons from "./ConfigButtons"; | ||
import RecoveryButtons from "./RecoveryButtons"; | ||
import FirmwareUpdate from "./FirmwareUpdate"; | ||
|
||
export default ({ | ||
onTogglePinProtection, onTogglePassPhraseProtection, onChangeHomeScreen, | ||
onChangeLabel, onWipeDevice, onRecoverDevice, onInitDevice, onUpdateFirmware, | ||
loading, | ||
}) => ( | ||
export default props => ( | ||
<StandalonePage header={<Header />}> | ||
<ConfigButtons {...{ onTogglePinProtection, onTogglePassPhraseProtection, | ||
onChangeHomeScreen, loading }} /> | ||
|
||
<ChangeLabel {...{ onChangeLabel, loading }} /> | ||
|
||
<RecoveryButtons {...{ onWipeDevice, onRecoverDevice, onInitDevice, loading }} /> | ||
|
||
<FirmwareUpdate {...{ onUpdateFirmware }} /> | ||
<ConfigSections { ...props } /> | ||
</StandalonePage> | ||
); |
Oops, something went wrong.