mirror of
https://github.com/arnaucube/darkID-prototype.git
synced 2026-02-06 19:06:43 +01:00
updated ethereum smart contract. Implemented backend of the login library example
This commit is contained in:
BIN
clientApp/GUI/img/darkID-logo01_transparent.png
Normal file
BIN
clientApp/GUI/img/darkID-logo01_transparent.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 223 KiB |
@@ -21,29 +21,30 @@
|
||||
placeholder="Enter here the proof-of-decrypt..."
|
||||
></textarea>
|
||||
</div>
|
||||
<h5 ng-show="decryptData.m">PoD:</h5>
|
||||
{{decryptData.m}}
|
||||
<div ng-click="decrypt()" ng-show="id.blockchainref" class="btn btn-raised pull-right c_o_pink300">
|
||||
Proof of decrypt
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br><br><br><br><br>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<h5>Testing only:</h5>
|
||||
<div class="row">
|
||||
<textarea style="color:#000000;width:100%;" rows="4"
|
||||
ng-model="encryptData.m"
|
||||
placeholder="Enter here the unencrypted..."
|
||||
></textarea>
|
||||
</div>
|
||||
<textarea style="backgroud:grey;color:#000000;width:100%;" rows="4"
|
||||
ng-model="encryptData.c"
|
||||
placeholder="Encrypted data..."
|
||||
></textarea>
|
||||
<div ng-click="encrypt()" ng-show="id.blockchainref" class="btn btn-raised pull-right c_o_orange300">
|
||||
Encrypt
|
||||
<br><br><br><br><br>
|
||||
<hr>
|
||||
<h5>Testing only:</h5>
|
||||
<div class="row">
|
||||
<textarea style="color:#000000;width:100%;" rows="4"
|
||||
ng-model="encryptData.m"
|
||||
placeholder="Enter here the unencrypted..."
|
||||
></textarea>
|
||||
</div>
|
||||
<div class="row">
|
||||
<textarea style="backgroud:grey;color:#000000;width:100%;" rows="4"
|
||||
ng-model="encryptData.c"
|
||||
placeholder="Encrypted data..."
|
||||
></textarea>
|
||||
</div>
|
||||
<div ng-click="encrypt()" ng-show="id.blockchainref" class="btn btn-raised pull-right c_o_orange300">
|
||||
Encrypt
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -49,7 +49,7 @@ angular.module('app.login', ['ngRoute'])
|
||||
window.location.reload();
|
||||
} else {
|
||||
console.log("login failed");
|
||||
toastr.error('Login failed');
|
||||
toastr.error('Login failed, ' + data.data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,11 +9,27 @@ angular.module('app.signup', ['ngRoute'])
|
||||
});
|
||||
}])
|
||||
|
||||
.controller('SignupCtrl', function($scope, $http, $routeParams) {
|
||||
.controller('SignupCtrl', function($scope, $http, $routeParams, $rootScope) {
|
||||
$scope.user = {};
|
||||
$scope.doSignup = function() {
|
||||
$scope.signup = function() {
|
||||
console.log('Doing signup', $scope.user);
|
||||
$http({
|
||||
url: $rootScope.server + 'signup',
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": undefined
|
||||
},
|
||||
data: $scope.user
|
||||
})
|
||||
.then(function(data) {
|
||||
console.log("data: ");
|
||||
console.log(data.data);
|
||||
window.location="/";
|
||||
|
||||
},
|
||||
function(data) {
|
||||
console.log(data);
|
||||
});
|
||||
|
||||
};
|
||||
});
|
||||
|
||||
@@ -38,5 +38,8 @@ func main() {
|
||||
}
|
||||
|
||||
func GUI() {
|
||||
//here, run electron app
|
||||
//here, run webserver
|
||||
log.Println("webserver in port " + "8080")
|
||||
http.Handle("/", http.FileServer(http.Dir("./web")))
|
||||
http.ListenAndServe(":"+"8080", nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user