mirror of
https://github.com/arnaucube/blockchainIDsystem.git
synced 2026-02-07 11:06:41 +01:00
started to implement clientApp (Go + Electron(with Angularjs))
This commit is contained in:
31
clientApp/GUI/views/main/main.html
Executable file
31
clientApp/GUI/views/main/main.html
Executable file
@@ -0,0 +1,31 @@
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">
|
||||
blockchainIDsystem
|
||||
</h4>
|
||||
|
||||
<div ng-click="newID()" class="btn btn-raised c_o_cyan300">Create new ID</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">
|
||||
Current IDs
|
||||
</h4>
|
||||
<p ng-repeat="id in ids">
|
||||
{{id}} <div ng-click="" class="btn btn-raised c_o_indigo300">Verify</div>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
35
clientApp/GUI/views/main/main.js
Executable file
35
clientApp/GUI/views/main/main.js
Executable file
@@ -0,0 +1,35 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('app.main', ['ngRoute'])
|
||||
|
||||
.config(['$routeProvider', function($routeProvider) {
|
||||
$routeProvider.when('/main', {
|
||||
templateUrl: 'views/main/main.html',
|
||||
controller: 'MainCtrl'
|
||||
});
|
||||
}])
|
||||
|
||||
.controller('MainCtrl', function($scope, $http) {
|
||||
$scope.ids = [];
|
||||
$http.get(clientapi + 'ids')
|
||||
.then(function(data) {
|
||||
console.log('data success');
|
||||
console.log(data);
|
||||
$scope.ids = data.data;
|
||||
|
||||
}, function(data) {
|
||||
console.log('data error');
|
||||
});
|
||||
|
||||
$scope.newID = function() {
|
||||
$http.get(clientapi + 'newid')
|
||||
.then(function(data) {
|
||||
console.log('data success');
|
||||
console.log(data);
|
||||
$scope.ids = data.data;
|
||||
|
||||
}, function(data) {
|
||||
console.log('data error');
|
||||
});
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user