Skip to content
Snippets Groups Projects
Commit a1ffb3c8 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

Merge pull request #7 from Insoleet/master

New feature : preview of pubkey during identity creation
parents b85dec89 0b99c752
No related branches found
No related tags found
No related merge requests found
"use strict";
module.exports = ($scope) => {
var co = require('co');
module.exports = ($scope, BMA) => {
setTimeout(() => {
$('select').material_select();
......@@ -12,4 +14,15 @@ module.exports = ($scope) => {
$('#modal1').openModal();
}
};
$scope.previewPubkey = () => co(function *() {
let data = yield BMA.webmin.key.preview({
conf: $scope.$parent.conf
});
$scope.$parent.pubkey_preview = data.pubkey;
let modal = $('#modal-pubkey');
if (modal.css('display') == 'none') {
$('#modal-pubkey').openModal();
}
});
};
......@@ -22,12 +22,15 @@
"configuration.create_uid.entropy.tooltip": "An entropy source to make your key unique: an e-mail, a phone n°, ...",
"configuration.create_uid.password.tooltip": "A secret password to protect your key.",
"configuration.create_uid.create_button": "Continue",
"configuration.create_uid.preview_button": "Preview pubkey",
"configuration.create_uid.nrp_algo_choose": "NRP algorithm",
"configuration.create_uid.nrp_algo_choose_1": "N = 4096 ; r = 16 ; p = 1",
"configuration.create_uid.modal_title": "Identity confirmation",
"configuration.create_uid.modal_message": "This identity will be definitive for this currency: you will be known by your User ID and will be able to access your account using your Entropy and Password values.",
"configuration.create_uid.modal_agree": "Agree",
"configuration.create_uid.modal_disagree": "Disagree",
"configuration.create_uid.modal_preview_title": "Preview of pubkey",
"configuration.create_uid.modal_preview_ok": "OK",
"configuration.create_network.title": "Network",
"configuration.create_network.message": "uCoin is a P2P software and needs bidirectionnal access to the network. Please chose carefully the following parameters.",
"configuration.create_network.none": "None",
......
......@@ -114,6 +114,9 @@ module.exports = (angular) => {
autoConfNetwork: getResource('/webmin/server/auto_conf_network'),
resetData: getResource('/webmin/server/reset/data')
},
key: {
preview: postResource('/webmin/key/preview')
},
network: {
interfaces: getResource('/webmin/network/interfaces')
}
......
......@@ -15,6 +15,10 @@
include ../includes/key
.raw: button.btn-large.waves-effect.waves-light(ng-disabled="!$parent.conf.idty_entropy || !$parent.conf.idty_password" ng-click="previewPubkey()")
i.left.fa.fa-play
span(translate="configuration.create_uid.preview_button")
.row: button.btn-large.waves-effect.waves-light(ng-disabled="!$parent.conf.idty_uid || !$parent.conf.idty_entropy || !$parent.conf.idty_password" ng-click="accept()")
span(translate="configuration.create_uid.create_button")
......@@ -9,3 +9,8 @@ main(ui-view="")
a.btn.modal-action.modal-close.waves-effect.waves-orange(ui-sref="configure.create_network")
i.material-icons.left done
="{{ 'configuration.create_uid.modal_agree' | translate }}"
#modal-pubkey.modal
.modal-content
h4 {{ 'configuration.create_uid.modal_preview_title' | translate }}
p {{ pubkey_preview }}
......@@ -21,4 +21,4 @@ module.exports = config:
sourceMaps: true
server:
hostname: '192.168.1.35'
hostname: '192.168.0.22'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment