mirror of https://github.com/BTCPrivate/copay.git
fix manage controller, refactor logged attr
This commit is contained in:
parent
b391344daf
commit
a3d0b9e48b
81
js/routes.js
81
js/routes.js
|
@ -8,47 +8,9 @@ angular
|
|||
$routeProvider
|
||||
.when('/', {
|
||||
templateUrl: 'views/home.html',
|
||||
validate: false
|
||||
})
|
||||
.when('/createProfile', {
|
||||
templateUrl: 'views/createProfile.html',
|
||||
validate: false
|
||||
})
|
||||
.when('/join', {
|
||||
templateUrl: 'views/join.html',
|
||||
validate: true
|
||||
})
|
||||
.when('/import', {
|
||||
templateUrl: 'views/import.html',
|
||||
validate: false
|
||||
})
|
||||
.when('/create', {
|
||||
templateUrl: 'views/create.html',
|
||||
validate: true
|
||||
})
|
||||
.when('/copayers', {
|
||||
templateUrl: 'views/copayers.html',
|
||||
validate: true
|
||||
})
|
||||
.when('/receive', {
|
||||
templateUrl: 'views/addresses.html',
|
||||
validate: true
|
||||
})
|
||||
.when('/history', {
|
||||
templateUrl: 'views/transactions.html',
|
||||
validate: true
|
||||
})
|
||||
.when('/send', {
|
||||
templateUrl: 'views/send.html',
|
||||
validate: true
|
||||
})
|
||||
.when('/more', {
|
||||
templateUrl: 'views/more.html',
|
||||
validate: true
|
||||
})
|
||||
.when('/settings', {
|
||||
templateUrl: 'views/settings.html',
|
||||
validate: false
|
||||
})
|
||||
.when('/unsupported', {
|
||||
templateUrl: 'views/unsupported.html'
|
||||
|
@ -56,13 +18,49 @@ angular
|
|||
.when('/uri-payment/:data', {
|
||||
templateUrl: 'views/uri-payment.html'
|
||||
})
|
||||
.when('/join', {
|
||||
templateUrl: 'views/join.html',
|
||||
logged: true
|
||||
})
|
||||
.when('/import', {
|
||||
templateUrl: 'views/import.html',
|
||||
logged: true
|
||||
})
|
||||
.when('/create', {
|
||||
templateUrl: 'views/create.html',
|
||||
logged: true
|
||||
})
|
||||
.when('/copayers', {
|
||||
templateUrl: 'views/copayers.html',
|
||||
logged: true
|
||||
})
|
||||
.when('/receive', {
|
||||
templateUrl: 'views/addresses.html',
|
||||
logged: true
|
||||
})
|
||||
.when('/history', {
|
||||
templateUrl: 'views/transactions.html',
|
||||
logged: true
|
||||
})
|
||||
.when('/send', {
|
||||
templateUrl: 'views/send.html',
|
||||
logged: true
|
||||
})
|
||||
.when('/more', {
|
||||
templateUrl: 'views/more.html',
|
||||
logged: true
|
||||
})
|
||||
.when('/settings', {
|
||||
templateUrl: 'views/settings.html',
|
||||
logged: true
|
||||
})
|
||||
.when('/warning', {
|
||||
templateUrl: 'views/warning.html',
|
||||
validate: true
|
||||
logged: true
|
||||
})
|
||||
.when('/manage', {
|
||||
templateUrl: 'views/manage.html',
|
||||
validate: true
|
||||
logged: true
|
||||
})
|
||||
.otherwise({
|
||||
templateUrl: 'views/errors/404.html',
|
||||
|
@ -90,7 +88,8 @@ angular
|
|||
if (!localStorage || localStorage.length < 1) {
|
||||
$location.path('unsupported');
|
||||
} else {
|
||||
if ((!$rootScope.wallet || !$rootScope.wallet.id) && next.validate) {
|
||||
if (!$rootScope.iden && next.logged) {
|
||||
console.log('not logged... redirecting')
|
||||
$idle.unwatch();
|
||||
$location.path('/');
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="backup" ng-controller="MoreController">
|
||||
<div class="backup" ng-controller="ManageController">
|
||||
<h1 translate>Manage Wallets</h1>
|
||||
<div class="oh large-12 columns panel">
|
||||
<h3><i class="fi-download m10r"></i> <span translate>Backup</span> </h3>
|
||||
<h3><i class="fi-download m10r"></i> <span translate>Manage Wallets</span> </h3>
|
||||
<p translate class="large-8 columns text-gray">It's important to backup your profile so that you can recover it in case of disaster. The backup will include all your profile's wallets</p>
|
||||
<div class="large-4 columns">
|
||||
<a translate class="button primary expand" ng-click="downloadBackup()">Backup profile</a>
|
||||
|
|
Loading…
Reference in New Issue