tronair-gui
Version:
Web application/GUI for performing airdrops on the TRON blockchain
100 lines (83 loc) • 3.03 kB
JavaScript
import React, { Component } from 'react';
import './App.css';
export default class Verifylogin extends Component {
// This component doesn't use any properties
onConfirm () {
// console.log('confirmed');
this.props.appActions.goToScreen('settings', { transitionId: 'fadeIn' });
}
onCancel () {
// console.log('cancelled');
this.props.appActions.updateDataSlot('ds_login_state', '1');
this.props.appActions.goToScreen('start', { transitionId: 'fadeIn' });
}
render() {
// eslint-disable-next-line no-unused-vars
let baseStyle = {};
// eslint-disable-next-line no-unused-vars
let layoutFlowStyle = {};
const style_elBackground = {
width: '100%',
height: '100%',
};
const style_elBackground_outer = {
backgroundColor: '#f6f6f6',
};
const style_elText = {
color: 'rgba(0, 0, 0, 0.8500)',
textAlign: 'center',
};
let transformPropValue_text2 = (input) => {
// This function modifies the value for property 'text'.
// There is a variable named 'input' that provides the property value.
//
// Handy example code snippets
//
// Update current component’s State from 0 to n
//
// this.setState({visualStateIndexOverride: 1})
//
// Playing with Data slot values
//
// Get data slot value
//
// var exampleValue="";
// exampleValue=this.props.appActions.dataSlots['ds_Example'];
//
// Update data slot value
//
// var exampleValue="foo";
// this.props.appActions.updateDataSlot('ds_Example', exampleValue);
var str_len = input.length;
return input.substring(0,3) + '...' + input.substring(str_len - 3, str_len);
// return input;
}
const style_elText2 = {
color: 'rgba(0, 0, 0, 0.8500)',
textAlign: 'center',
};
const value_text2 = transformPropValue_text2((this.props.appActions.dataSlots ? this.props.appActions.dataSlots['ds_acc_addr'] : ''));
const user_str = 'Success!\n Logged in as ' + value_text2;
return (
<div className="Verifylogin" style={baseStyle}>
{/* <div className="background">
<div className='appBg containerMinHeight elBackground' style={style_elBackground_outer}>
<div style={style_elBackground} />
</div>
</div>
<div className="layoutFlow">
<div className='headlineFont elText'>
<div style={style_elText}>
<div>{this.props.locStrings.verifylogin_text_444884}</div>
</div>
</div>
<div className='headlineFont elText2'>
<div style={style_elText2}>
<div>{value_text2 !== undefined ? value_text2 : (<span className="propValueMissing">{this.props.locStrings.verifylogin_text2_692666}</span>)}</div>
</div>
</div>
</div> */}
</div>
)
}
}