Skip to content

Commit

Permalink
Revert "63 implement suggested lookfeelui changes (#64)"
Browse files Browse the repository at this point in the history
This reverts commit 94c7f2b.
  • Loading branch information
2byrds authored Jun 30, 2022
1 parent 2c239c3 commit bad0955
Show file tree
Hide file tree
Showing 33 changed files with 513 additions and 1,571 deletions.
53 changes: 23 additions & 30 deletions android/app/src/main/java/com/rootswallet/PrismModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -106,34 +106,27 @@ class PrismModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaM
}
}

@ReactMethod
fun revokeCred(walJson: String, credAlias: String, promise: Promise) {
Log.d("PRISM_TAG","Revoking credential "+credAlias+" from wallet "+walJson);
thread(start = true) {
try {
var cliWal = Json.decodeFromString<Wallet>(walJson);
cliWal = revokeCredential(cliWal, credAlias)
var newWalJson = Json.encodeToString(cliWal)
Log.d("PRISM_TAG","Credential revoked"+credAlias+" from wallet "+newWalJson)
promise.resolve(newWalJson);
} catch (e: Exception) {
promise.reject("Revoke Credential Error", e);
}
}
}

@ReactMethod
fun verifyImportedCred(walJson: String, credAlias: String, promise: Promise) {
Log.d("PRISM_TAG","Verifying credential for "+credAlias+" from wallet "+walJson);
thread(start = true) {
try {
var cliWal = Json.decodeFromString<Wallet>(walJson);
var verResult = Json.encodeToString(verifyImportedCredential(cliWal, credAlias))
Log.d("PRISM_TAG","Credential "+credAlias+" is " + verResult)
promise.resolve(verResult);
} catch (e: Exception) {
promise.reject("Publish Error", e);
}
}
}
//TODO deal with build errors regarding iog.api
// @ReactMethod
// fun verifyCred(walJson: String, credAlias: String, promise: Promise) {
// Log.d("PRISM_TAG","Verifying credential for "+credAlias+" from wallet "+walJson);
// thread(start = true) {
// try {
// var cliWal = Json.decodeFromString<Wallet>(walJson);
// var verResult = Json.encodeToString(verifyIssuedCredential(cliWal, credAlias))
// Log.d("PRISM_TAG","Credential "+credAlias+" is " + verResult)
// promise.resolve(verResult);
// } catch (e: Exception) {
// promise.reject("Publish Error", e);
// }
// }
// }
// @ReactMethod
// public void fetch(final String path, final Promise promise) {
// new Thread(new Runnable() {
// public void run() {
// root.child(path)...
// }
// }).start();
// }
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"react-i18next": "^11.15.3",
"react-json-view": "^1.21.3",
"react-native": "0.64.3",
"react-native-base64": "^0.2.1",
"react-native-gesture-handler": "~2.1.0",
"react-native-gifted-chat": "1.0.0-beta-3",
"react-native-hyperlink": "^0.0.19",
Expand Down
Binary file removed src/assets/LogoCropped.png
Binary file not shown.
Binary file removed src/assets/LogoOnly784.png
Binary file not shown.
Binary file modified src/assets/RootsLogoAvatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/assets/vc.png
Binary file not shown.
19 changes: 5 additions & 14 deletions src/components/IconActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,20 @@ import React from 'react';
import { Image, StyleSheet, Text, View } from 'react-native';
import { IconButton } from 'react-native-paper';

import {showRel} from '../relationships';

export default function IconActions(...props) {
// console.log("IconActions - props",props)
const navigation = props[0]["nav"]
const add = props[0]["add"]
const person = props[0]["person"]
const scan = props[0]["scan"]
const settings = props[0]["settings"]
// <IconButton
// icon="plus"
// size={28}
// color="#e69138"
// onPress={() => navigation.navigate(add)}
// />
return (
<View style={{flexDirection:'row',}}>
<IconButton
icon="account"
size={28}
color="#e69138"
onPress={() => showRel(navigation,person)}
/>
icon="plus"
size={28}
color="#e69138"
onPress={() => navigation.navigate(add)}
/>
<IconButton
icon="qrcode-scan"
size={28}
Expand Down
10 changes: 1 addition & 9 deletions src/components/LogoTitle.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
import React from 'react';
import { Image, StyleSheet, Text, View } from 'react-native';

function getTitle(title) {
if(title.length > 12) {
return title.substring(0,11)+"..."
} else {
return title
}
}

export default function LogoTitle(...props) {
// <React.Fragment>
return (
Expand All @@ -18,7 +10,7 @@ export default function LogoTitle(...props) {
source={require('../assets/LogoOnly1024.png')}
/>
<Text style={{ color: '#eeeeee',fontSize: 22,fontWeight: 'normal',textAlignVertical: "center",textAlign: "center", }}>
{getTitle(props[0]["title"])}
{props[0]["title"].substring(0,11)+"..."}
</Text>
</View>
);
Expand Down
49 changes: 0 additions & 49 deletions src/components/RelRow.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/SimpleTitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function SimpleTitle(...props) {
return (
<View style={{flexDirection:'row',}}>
<Text style={{ color: '#eeeeee',fontSize: 22,fontWeight: 'normal',textAlignVertical: "center",textAlign: "center", }}>
{props[0]["title"]}
{props[0]["title"].substring(0,11)+"..."}
</Text>
</View>
);
Expand Down
85 changes: 0 additions & 85 deletions src/credentials/index.ts

This file was deleted.

6 changes: 1 addition & 5 deletions src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export const MODEL_TYPE_SETTING = "rootsSettingType"

export function createChat(chatAlias: string, fromDidAlias: string, toIds: string[], title=chatAlias) {
const chat = {
dataType: MODEL_TYPE_CHAT,
id: chatAlias,
toDids: toIds,
fromAlias: fromDidAlias,
Expand All @@ -28,7 +27,6 @@ export function createChat(chatAlias: string, fromDidAlias: string, toIds: strin

export function createMessage(idText: string,bodyText: string,statusText: string,timeInMillis: number,relId: string,system?: boolean=false,data?: Object=undefined) {
const msg = {
dataType: MODEL_TYPE_MESSAGE,
id: idText,
body: bodyText,
type: statusText,
Expand All @@ -42,15 +40,13 @@ export function createMessage(idText: string,bodyText: string,statusText: string
}

export function createMessageId(chatAlias: string,relId: string,msgNum: number) {
logger("model - creating message id",chatAlias,relId,msgNum)
let msgId = getStorageKey(chatAlias,MODEL_TYPE_MESSAGE)+ID_SEPARATOR+relId+ID_SEPARATOR+String(msgNum);
logger("model - Generated msg id",msgId);
logger("roots - Generated msg id",msgId);
return msgId;
}

export function createRel(relAlias: string, relName: string, relPicUrl: string, did?: string) {
const rel = {
dataType: MODEL_TYPE_REL,
id: relAlias,
displayName: relName,
displayPictureUrl: relPicUrl,
Expand Down
Loading

0 comments on commit bad0955

Please sign in to comment.