mirror of
https://github.com/arnaucube/darkID-prototype.git
synced 2026-02-07 11:26:44 +01:00
started darkID
This commit is contained in:
3
clientApp/GUI/.bowerrc
Normal file
3
clientApp/GUI/.bowerrc
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"directory": "bower_components"
|
||||
}
|
||||
2
clientApp/GUI/.gitignore
vendored
Normal file
2
clientApp/GUI/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
bower_components
|
||||
node_modules
|
||||
84
clientApp/GUI/app.js
Normal file
84
clientApp/GUI/app.js
Normal file
@@ -0,0 +1,84 @@
|
||||
'use strict';
|
||||
|
||||
//var urlapi = "http://127.0.0.1:3130/";
|
||||
var clientapi = "http://127.0.0.1:4100/";
|
||||
|
||||
// Declare app level module which depends on views, and components
|
||||
angular.module('app', [
|
||||
'ngRoute',
|
||||
'ngMessages',
|
||||
'angularBootstrapMaterial',
|
||||
'ui.bootstrap',
|
||||
'toastr',
|
||||
'app.navbar',
|
||||
'app.main',
|
||||
'app.signup',
|
||||
'app.login'
|
||||
]).
|
||||
config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) {
|
||||
$locationProvider.hashPrefix('!');
|
||||
|
||||
if ((localStorage.getItem('darkID_token'))) {
|
||||
console.log(window.location.hash);
|
||||
if ((window.location.hash === '#!/login') || (window.location.hash === '#!/signup')) {
|
||||
window.location = '#!/main';
|
||||
}
|
||||
|
||||
$routeProvider.otherwise({
|
||||
redirectTo: '/main'
|
||||
});
|
||||
} else {
|
||||
if ((window.location !== '#!/login') || (window.location !== '#!/signup')) {
|
||||
console.log('app, user no logged');
|
||||
|
||||
localStorage.removeItem('darkID_token');
|
||||
localStorage.removeItem('darkID_userdata');
|
||||
window.location = '#!/login';
|
||||
$routeProvider.otherwise({
|
||||
redirectTo: '/login'
|
||||
});
|
||||
}
|
||||
}
|
||||
}])
|
||||
.config(function(toastrConfig) {
|
||||
angular.extend(toastrConfig, {
|
||||
autoDismiss: false,
|
||||
containerId: 'toast-container',
|
||||
maxOpened: 0,
|
||||
newestOnTop: true,
|
||||
positionClass: 'toast-bottom-right',
|
||||
preventDuplicates: false,
|
||||
preventOpenDuplicates: false,
|
||||
target: 'body'
|
||||
});
|
||||
})
|
||||
.factory('httpInterceptor', function httpInterceptor() {
|
||||
return {
|
||||
request: function(config) {
|
||||
return config;
|
||||
},
|
||||
|
||||
requestError: function(config) {
|
||||
return config;
|
||||
},
|
||||
|
||||
response: function(res) {
|
||||
return res;
|
||||
},
|
||||
|
||||
responseError: function(res) {
|
||||
return res;
|
||||
}
|
||||
};
|
||||
})
|
||||
.factory('api', function($http) {
|
||||
return {
|
||||
init: function() {
|
||||
/*$http.defaults.headers.common['X-Access-Token'] = localStorage.getItem('block_webapp_token');
|
||||
$http.defaults.headers.post['X-Access-Token'] = localStorage.getItem('block_webapp_token');*/
|
||||
}
|
||||
};
|
||||
})
|
||||
.run(function(api) {
|
||||
api.init();
|
||||
});
|
||||
18
clientApp/GUI/bower.json
Normal file
18
clientApp/GUI/bower.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "darkID-clientApp",
|
||||
"description": "",
|
||||
"version": "0.0.0",
|
||||
"homepage": "",
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"angular": "^1.6.2",
|
||||
"angular-route": "^1.6.1",
|
||||
"angular-messages": "^1.6.5",
|
||||
"angular-bootstrap-material": "abm#^0.1.4",
|
||||
"angular-bootstrap": "^2.5.0",
|
||||
"components-font-awesome": "^4.7.0",
|
||||
"angular-toastr": "^2.1.1",
|
||||
"cssMaterialColors": "*"
|
||||
}
|
||||
}
|
||||
14
clientApp/GUI/css/bootstrapMaterial-dark-overwrite.css
vendored
Normal file
14
clientApp/GUI/css/bootstrapMaterial-dark-overwrite.css
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
body {
|
||||
/*background: #15191e!important;*/
|
||||
background: #000000!important;
|
||||
color: #ffffff!important;
|
||||
}
|
||||
.card {
|
||||
/*background: #1f262d!important;*/
|
||||
/*background: #15191e!important;
|
||||
color: #ffffff!important;*/
|
||||
/*border: 1px solid #ffffff!important;*/
|
||||
|
||||
background: #000000!important;
|
||||
color: #ffffff!important;
|
||||
}
|
||||
5
clientApp/GUI/css/own.css
Normal file
5
clientApp/GUI/css/own.css
Normal file
@@ -0,0 +1,5 @@
|
||||
.o_nav {
|
||||
background: #000000!important;
|
||||
color: #ffffff!important;
|
||||
border-bottom: 2px solid #4DD0E1!important;
|
||||
}
|
||||
BIN
clientApp/GUI/img/darkID-logo-black.png
Normal file
BIN
clientApp/GUI/img/darkID-logo-black.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
clientApp/GUI/img/darkID-logo-white.png
Normal file
BIN
clientApp/GUI/img/darkID-logo-white.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
BIN
clientApp/GUI/img/darkID-logo.xcf
Normal file
BIN
clientApp/GUI/img/darkID-logo.xcf
Normal file
Binary file not shown.
BIN
clientApp/GUI/img/darkID-logo01.png
Normal file
BIN
clientApp/GUI/img/darkID-logo01.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 458 KiB |
BIN
clientApp/GUI/img/darkID-logo02.png
Normal file
BIN
clientApp/GUI/img/darkID-logo02.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 456 KiB |
69
clientApp/GUI/index.html
Normal file
69
clientApp/GUI/index.html
Normal file
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" ng-app="app" ng-cloak>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>darkID</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="icon" type="image/png" href="img/darkID-logo-black.png">
|
||||
|
||||
<link rel="stylesheet" href="bower_components/components-font-awesome/css/font-awesome.min.css">
|
||||
|
||||
<link rel="stylesheet" href="css/own.css">
|
||||
<link rel="stylesheet" href="css/bootstrapMaterial-dark-overwrite.css">
|
||||
|
||||
<link href="bower_components/cssMaterialColors/colors.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body ng-app="webapp">
|
||||
<div ng-include="'views/navbar.html'"></div>
|
||||
<br><br><br><br><br>
|
||||
<div ng-view></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- ELECTRON
|
||||
Insert this line above script imports
|
||||
Works for both browser and electron with the same code -->
|
||||
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
|
||||
|
||||
<!-- Angular js -->
|
||||
<script src="bower_components/angular/angular.js"></script>
|
||||
<script src="bower_components/angular-route/angular-route.js"></script>
|
||||
<script src="bower_components/angular-messages/angular-messages.js"></script>
|
||||
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css">
|
||||
<!-- Bootstrap Material Design -->
|
||||
<link rel="stylesheet" href="bower_components/bootstrap-material-design/dist/css/bootstrap-material-design.css">
|
||||
<link rel="stylesheet" href="bower_components/bootstrap-material-design/dist/css/ripples.css">
|
||||
|
||||
<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
|
||||
<script src="bower_components/angular-bootstrap-material/dist/angular-bootstrap-material.js"></script>
|
||||
|
||||
<!-- jQuery for Bootstrap -->
|
||||
<script src="bower_components/jquery/dist/jquery.min.js"></script>
|
||||
|
||||
<!-- toastr -->
|
||||
<link rel="stylesheet" type="text/css" href="bower_components/angular-toastr/dist/angular-toastr.css" />
|
||||
<script type="text/javascript" src="bower_components/angular-toastr/dist/angular-toastr.tpls.js"></script>
|
||||
|
||||
<!-- app's js -->
|
||||
<script src="app.js"></script>
|
||||
<script src="views/navbar.js"></script>
|
||||
<script src="views/main/main.js"></script>
|
||||
<script src="views/signup/signup.js"></script>
|
||||
<script src="views/login/login.js"></script>
|
||||
|
||||
|
||||
<!-- ELECTRON
|
||||
Insert this line after script imports -->
|
||||
<script>if (window.module) module = window.module;</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
72
clientApp/GUI/main.js
Normal file
72
clientApp/GUI/main.js
Normal file
@@ -0,0 +1,72 @@
|
||||
const electron = require('electron')
|
||||
// Module to control application life.
|
||||
const app = electron.app
|
||||
// Module to create native browser window.
|
||||
const BrowserWindow = electron.BrowserWindow
|
||||
|
||||
const Tray = electron.Tray
|
||||
const Menu = electron.Menu
|
||||
|
||||
// Keep a global reference of the window object, if you don't, the window will
|
||||
// be closed automatically when the JavaScript object is garbage collected.
|
||||
let mainWindow
|
||||
|
||||
|
||||
function createWindow () {
|
||||
// Create the browser window.
|
||||
mainWindow = new BrowserWindow({
|
||||
width: 850,
|
||||
height: 600,
|
||||
icon: 'img/darkID-logo-white.png'
|
||||
})
|
||||
tray = new Tray('img/darkID-logo-white.png')
|
||||
const contextMenu = Menu.buildFromTemplate([
|
||||
{label: 'Obre la finestra', type: 'radio'},
|
||||
{label: 'javascript madness', type: 'radio'},
|
||||
{label: 'Tanca', type: 'radio'}
|
||||
//{label: 'Tanca', type: 'radio', checked: true}
|
||||
])
|
||||
tray.setToolTip('Panopticon, projectNSA')
|
||||
tray.setContextMenu(contextMenu)
|
||||
|
||||
mainWindow.setMenu(null);
|
||||
|
||||
// and load the index.html of the app.
|
||||
mainWindow.loadURL(`file://${__dirname}/index.html`)
|
||||
|
||||
// Open the DevTools.
|
||||
//mainWindow.webContents.openDevTools()
|
||||
|
||||
// Emitted when the window is closed.
|
||||
mainWindow.on('closed', function () {
|
||||
// Dereference the window object, usually you would store windows
|
||||
// in an array if your app supports multi windows, this is the time
|
||||
// when you should delete the corresponding element.
|
||||
mainWindow = null
|
||||
})
|
||||
}
|
||||
|
||||
// This method will be called when Electron has finished
|
||||
// initialization and is ready to create browser windows.
|
||||
// Some APIs can only be used after this event occurs.
|
||||
app.on('ready', createWindow)
|
||||
|
||||
// Quit when all windows are closed.
|
||||
app.on('window-all-closed', function () {
|
||||
// On OS X it is common for applications and their menu bar
|
||||
// to stay active until the user quits explicitly with Cmd + Q
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit()
|
||||
}
|
||||
})
|
||||
|
||||
app.on('activate', function () {
|
||||
// On OS X it's common to re-create a window in the app when the
|
||||
// dock icon is clicked and there are no other windows open.
|
||||
if (mainWindow === null) {
|
||||
createWindow()
|
||||
}
|
||||
})
|
||||
|
||||
// In this file you can include the rest of your app's specific main process
|
||||
// code. You can also put them in separate files and require them here.
|
||||
15
clientApp/GUI/package.json
Normal file
15
clientApp/GUI/package.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "darkID-clientApp",
|
||||
"version": "1.0.0",
|
||||
"description": "frontend desktop app for darkID",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
"postinstall": "bower install",
|
||||
"prestart": "npm install",
|
||||
"start": "electron ."
|
||||
},
|
||||
"devDependencies": {
|
||||
"electron-prebuilt": "^1.2.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
32
clientApp/GUI/views/login/login.html
Executable file
32
clientApp/GUI/views/login/login.html
Executable file
@@ -0,0 +1,32 @@
|
||||
<div class="container" style="margin-top: -80px;">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="card">
|
||||
<img src="img/darkID-logo01.png" class="img-responsive" />
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">
|
||||
darkID
|
||||
</h4>
|
||||
<input ng-model="user.email" class="form-control" placeholder="Email" type="text">
|
||||
<input ng-model="user.password" class="form-control" placeholder="Password" type="password">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<a href="#!/signup" class="btn btn-raised btn-block c_o_pink300">Signup</a>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div ng-click="login()" class="btn btn-raised btn-block c_o_cyan300 pull-right">Login</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-3">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
62
clientApp/GUI/views/login/login.js
Executable file
62
clientApp/GUI/views/login/login.js
Executable file
@@ -0,0 +1,62 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('app.login', ['ngRoute'])
|
||||
|
||||
.config(['$routeProvider', function($routeProvider) {
|
||||
$routeProvider.when('/login', {
|
||||
templateUrl: 'views/login/login.html',
|
||||
controller: 'LoginCtrl'
|
||||
});
|
||||
}])
|
||||
|
||||
.controller('LoginCtrl', function($scope, $rootScope, $http, $routeParams, toastr) {
|
||||
$rootScope.server = ""
|
||||
$scope.user = {};
|
||||
//set server in goclient
|
||||
$http.get(clientapi + 'getserver')
|
||||
.then(function(data) {
|
||||
console.log("data: ");
|
||||
console.log(data.data);
|
||||
$rootScope.server = data.data;
|
||||
localStorage.setItem("darkID_server", JSON.stringify($rootScope.server));
|
||||
console.log("server", $rootScope.server);
|
||||
}, function(data) {
|
||||
console.log('data error');
|
||||
});
|
||||
|
||||
$scope.login = function() {
|
||||
|
||||
console.log('Doing login', $scope.user);
|
||||
console.log($rootScope.server + "login");
|
||||
|
||||
|
||||
|
||||
//
|
||||
$http({
|
||||
url: $rootScope.server + 'login',
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": undefined
|
||||
},
|
||||
data: $scope.user
|
||||
})
|
||||
.then(function(data) {
|
||||
console.log("data: ");
|
||||
console.log(data.data);
|
||||
if (data.data.token) {
|
||||
localStorage.setItem("darkID_token", data.data.token);
|
||||
localStorage.setItem("darkID_user", JSON.stringify(data.data));
|
||||
window.location.reload();
|
||||
} else {
|
||||
console.log("login failed");
|
||||
toastr.error('Login failed');
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
function(data) {
|
||||
console.log(data);
|
||||
});
|
||||
|
||||
};
|
||||
});
|
||||
53
clientApp/GUI/views/main/main.html
Executable file
53
clientApp/GUI/views/main/main.html
Executable file
@@ -0,0 +1,53 @@
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div ng-click="" class="btn btn-raised btn-block c_o_green300">Use ID</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div ng-click="newID()" class="btn btn-raised btn-block c_o_pink300">Create new ID</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">
|
||||
My IDs
|
||||
</h4>
|
||||
<div class="row" style="height:200px;" ng-repeat="id in ids">
|
||||
<div class="col-sm-6">
|
||||
Public Key: {{id.pubK}}
|
||||
<!--<br> Private Key: {{id.privK}}-->
|
||||
<br> Date of creation: {{id.date}}
|
||||
<!--<br> {{id.pubKSigned}}-->
|
||||
<br>
|
||||
<br><br>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="pull-right">
|
||||
<span class="badge c_o_red300" ng-show="!id.verified">Not verified</span>
|
||||
<span class="badge c_o_green300" ng-show="id.verified">Verified</span>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="badge c_o_orange300" ng-show="!id.pubKSigned">Not signed</span>
|
||||
<span class="badge c_o_green300" ng-show="id.pubKSigned">Signed</span>
|
||||
</div>
|
||||
<div ng-click="blindAndSendToSign(id.pubK)" ng-show="!id.pubKSigned" class="btn btn-sm btn-raised c_o_cyan300 pull-right">Send to serverIDsigner</div>
|
||||
<div ng-click="verify(id.pubK)" ng-show="!id.verified"class="btn btn-sm btn-raised c_o_deepPurple300 pull-right">Verify</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
61
clientApp/GUI/views/main/main.js
Executable file
61
clientApp/GUI/views/main/main.js
Executable file
@@ -0,0 +1,61 @@
|
||||
'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, $rootScope, $http) {
|
||||
|
||||
$rootScope.server = JSON.parse(localStorage.getItem("darkID_server"));
|
||||
|
||||
$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');
|
||||
});
|
||||
};
|
||||
|
||||
$scope.blindAndSendToSign = function(pubK) {
|
||||
$http.get(clientapi + 'blindandsendtosign/' + pubK)
|
||||
.then(function(data) {
|
||||
console.log('data success');
|
||||
console.log(data);
|
||||
$scope.ids = data.data;
|
||||
|
||||
}, function(data) {
|
||||
console.log('data error');
|
||||
});
|
||||
};
|
||||
$scope.verify = function(pubK) {
|
||||
$http.get(clientapi + 'verify/' + pubK)
|
||||
.then(function(data) {
|
||||
console.log('data success');
|
||||
console.log(data);
|
||||
$scope.ids = data.data;
|
||||
|
||||
}, function(data) {
|
||||
console.log('data error');
|
||||
});
|
||||
};
|
||||
});
|
||||
35
clientApp/GUI/views/navbar.html
Executable file
35
clientApp/GUI/views/navbar.html
Executable file
@@ -0,0 +1,35 @@
|
||||
<div ng-controller="NavbarCtrl" ng-show="user">
|
||||
<nav class="navbar navbar-fixed-top o_nav">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/" title="darkID">
|
||||
<img src="img/darkID-logo-white.png" style="width:30px;height:30px;display:inline;" alt=""> <b>darkID</b>
|
||||
</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse navbar-responsive-collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a title="serverIDsigner">
|
||||
<i title="Server" class="fa fa-server fa-1x"></i> {{server}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="">
|
||||
<i title="User" class="fa fa-user fa-1x"></i> {{user.email}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="" ng-click="logout()">
|
||||
<i title="Exit" class="fa fa-power-off fa-1x"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
24
clientApp/GUI/views/navbar.js
Executable file
24
clientApp/GUI/views/navbar.js
Executable file
@@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('app.navbar', ['ngRoute'])
|
||||
|
||||
.config(['$routeProvider', function($routeProvider) {
|
||||
$routeProvider.when('/navbar', {
|
||||
templateUrl: 'views/navbar.html',
|
||||
controller: 'NavbarCtrl'
|
||||
});
|
||||
}])
|
||||
|
||||
.controller('NavbarCtrl', function($scope, $rootScope, $http, $routeParams, $location) {
|
||||
$rootScope.server = JSON.parse(localStorage.getItem("darkID_server"));
|
||||
|
||||
$scope.user = JSON.parse(localStorage.getItem("darkID_user"));
|
||||
|
||||
$scope.logout = function() {
|
||||
localStorage.removeItem("darkID_token");
|
||||
localStorage.removeItem("darkID_user");
|
||||
localStorage.removeItem("darkID_server");
|
||||
window.location.reload();
|
||||
};
|
||||
|
||||
});
|
||||
33
clientApp/GUI/views/signup/signup.html
Executable file
33
clientApp/GUI/views/signup/signup.html
Executable file
@@ -0,0 +1,33 @@
|
||||
<div class="container" style="margin-top: -80px;">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="card">
|
||||
<img src="img/darkID-logo01.png" class="img-responsive" />
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">
|
||||
darkID
|
||||
</h4>
|
||||
<input ng-model="user.email" class="form-control" placeholder="Email" type="text">
|
||||
<input ng-model="user.password" class="form-control" placeholder="Password" type="password">
|
||||
<input ng-model="user.phone" class="form-control" placeholder="Phone" type="text">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<a href="#!/login" class="btn btn-raised btn-block c_o_blue300">Cancel</a>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div ng-click="signup()" class="btn btn-raised btn-block c_o_pink300 pull-right">Signup</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-3">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
19
clientApp/GUI/views/signup/signup.js
Executable file
19
clientApp/GUI/views/signup/signup.js
Executable file
@@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('app.signup', ['ngRoute'])
|
||||
|
||||
.config(['$routeProvider', function($routeProvider) {
|
||||
$routeProvider.when('/signup', {
|
||||
templateUrl: 'views/signup/signup.html',
|
||||
controller: 'SignupCtrl'
|
||||
});
|
||||
}])
|
||||
|
||||
.controller('SignupCtrl', function($scope, $http, $routeParams) {
|
||||
$scope.user = {};
|
||||
$scope.doSignup = function() {
|
||||
console.log('Doing signup', $scope.user);
|
||||
|
||||
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user