A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix RecoveryKeyDialog
ammarahm-ed9ab18faa4cd1
diff --git a/apps/mobile/src/components/RecoveryKeyDialog/index.js b/apps/mobile/src/components/RecoveryKeyDialog/index.jsindex de557b2b9..3abd69c21 100644--- a/apps/mobile/src/components/RecoveryKeyDialog/index.js+++ b/apps/mobile/src/components/RecoveryKeyDialog/index.js@@ -16,7 +16,7 @@ class RecoveryKeyDialog extends React.Component {constructor(props) {super(props);this.state = {- key: '',+ key: 'a',};this.actionSheetRef = createRef();this.svg = createRef();@@ -30,6 +30,7 @@ class RecoveryKeyDialog extends React.Component {this.actionSheetRef.current?._setModalVisible(false);};async componentDidMount() {+ this.actionSheetRef.current?._setModalVisible(true);eSubscribeEvent(eOpenRecoveryKeyDialog, this.open);}@@ -93,24 +94,27 @@ class RecoveryKeyDialog extends React.Component {borderRadius: 10,paddingTop: 10,}}>+ <Text+ numberOfLines={2}+ style={{+ fontFamily: WEIGHT.bold,+ fontSize: SIZE.xl,+ width: '85%',+ maxWidth: '85%',+ paddingRight: 10,+ marginTop: 10,+ color: colors.heading,+ }}>+ Your Recovery Key+ </Text>+<Viewstyle={{+ backgroundColor: colors.nav,borderRadius: 5,- marginBottom: 15,- paddingTop: 10,+ padding: 10,+ marginTop: 10,}}>- <Text- numberOfLines={2}- style={{- fontFamily: WEIGHT.bold,- fontSize: SIZE.xl,- width: '85%',- maxWidth: '85%',- paddingRight: 10,- color: colors.heading,- }}>- Your Recovery Key- </Text><TextnumberOfLines={2}style={{@@ -123,12 +127,39 @@ class RecoveryKeyDialog extends React.Component {}}>{this.state.key}</Text>+ </View>+ <Seperator />++ <View+ style={{+ alignSelf: 'center',+ marginBottom: 15,+ flexDirection: 'row',+ width: '100%',+ justifyContent: 'space-between',+ }}>+ <QRCode+ getRef={this.svg}+ size={w / 2.2}+ value={this.state.key}+ logo={{uri: LOGO_BASE64}}+ logoBorderRadius={10}+ />+<Seperator /><Viewstyle={{- flexDirection: 'row',- justifyContent: 'space-between',+ alignItems: 'center',+ width: w / 2.2,+ justifyContent: 'center',}}>+ <Button+ title="Save to Gallery"+ onPress={this.saveQRCODE}+ width="100%"+ height={40}+ />+ <Seperator /><ButtononPress={() => {RNFetchBlob.fs.writeFile(@@ -138,61 +169,27 @@ class RecoveryKeyDialog extends React.Component {'utf8',);}}- title="Save as Text"- width="48%"- height={50}+ title="Save as Text File"+ width="100%"+ height={40}/>+ <Seperator /><ButtononPress={() => {Clipboard.setString(this.state.key);ToastEvent.show('Recovery key copied');}}- title="Copy"- width="48%"- height={50}+ title="Copy Key"+ width="100%"+ height={40}/></View></View>- <View- style={{- alignSelf: 'center',- marginBottom: 15,- flexDirection: 'row',- width: '100%',- }}>- <QRCode- getRef={this.svg}- size={w / 2.2}- value={this.state.key}- logo={{uri: LOGO_BASE64}}- logoBorderRadius={10}- />-- <Text- style={{- paddingHorizontal: 10,- fontSize: SIZE.md,- maxWidth: '50%',- fontFamily: WEIGHT.regular,- }}>- This is the QR-Code of your recovery key. You can use any QR-Code- Scanner to scan this image and get your key and recover your data.- </Text>- </View>-- <Button- title="Save QR-Code to Gallery"- onPress={this.saveQRCODE}- width="100%"- height={50}- />-<Seperator /><Viewstyle={{flexDirection: 'row',- backgroundColor: colors.errorBg,padding: 10,borderRadius: 10,}}>