Added view site option to current tab listing
This commit is contained in:
parent
64abacf180
commit
c9413a5c49
|
@ -93,7 +93,7 @@
|
||||||
templateUrl: 'app/vault/views/vaultViewSite.html',
|
templateUrl: 'app/vault/views/vaultViewSite.html',
|
||||||
controller: 'vaultViewSiteController',
|
controller: 'vaultViewSiteController',
|
||||||
data: { authorize: true },
|
data: { authorize: true },
|
||||||
params: { animation: null, returnScrollY: 0, returnSearchText: null }
|
params: { animation: null, returnScrollY: 0, returnSearchText: null, fromCurrent: false }
|
||||||
})
|
})
|
||||||
.state('addSite', {
|
.state('addSite', {
|
||||||
url: '/add-site',
|
url: '/add-site',
|
||||||
|
@ -110,7 +110,10 @@
|
||||||
templateUrl: 'app/vault/views/vaultEditSite.html',
|
templateUrl: 'app/vault/views/vaultEditSite.html',
|
||||||
controller: 'vaultEditSiteController',
|
controller: 'vaultEditSiteController',
|
||||||
data: { authorize: true },
|
data: { authorize: true },
|
||||||
params: { animation: null, fromView: true, returnScrollY: 0, returnSearchText: null, site: null }
|
params: {
|
||||||
|
animation: null, fromView: true, returnScrollY: 0,
|
||||||
|
returnSearchText: null, site: null, fromCurrent: false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
.state('passwordGenerator', {
|
.state('passwordGenerator', {
|
||||||
|
|
|
@ -92,6 +92,16 @@ angular
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.viewSite = function (site, e) {
|
||||||
|
e.stopPropagation();
|
||||||
|
|
||||||
|
$state.go('viewSite', {
|
||||||
|
siteId: site.id,
|
||||||
|
animation: 'in-slide-up',
|
||||||
|
fromCurrent: true
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
$scope.$on('syncCompleted', function (event, successfully) {
|
$scope.$on('syncCompleted', function (event, successfully) {
|
||||||
if ($scope.loaded) {
|
if ($scope.loaded) {
|
||||||
setTimeout(loadVault, 500);
|
setTimeout(loadVault, 500);
|
||||||
|
|
|
@ -22,6 +22,10 @@
|
||||||
data-clipboard-text="{{site.username}}" ng-class="{'disabled': !site.username}">
|
data-clipboard-text="{{site.username}}" ng-class="{'disabled': !site.username}">
|
||||||
<i class="fa fa-lg fa-user"></i>
|
<i class="fa fa-lg fa-user"></i>
|
||||||
</span>
|
</span>
|
||||||
|
<span class="btn-list" href="" ng-click="viewSite(site, $event) && $event.stopPropagation()"
|
||||||
|
title="{{i18n.edit}} {{site.name}}">
|
||||||
|
<i class="fa fa-lg fa-pencil"></i>
|
||||||
|
</span>
|
||||||
<span class="text">{{site.name}}</span>
|
<span class="text">{{site.name}}</span>
|
||||||
<span class="detail">{{site.username}}</span>
|
<span class="detail">{{site.username}}</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -8,6 +8,7 @@ angular
|
||||||
var returnSearchText = $stateParams.returnSearchText;
|
var returnSearchText = $stateParams.returnSearchText;
|
||||||
var siteId = $stateParams.siteId;
|
var siteId = $stateParams.siteId;
|
||||||
var fromView = $stateParams.fromView;
|
var fromView = $stateParams.fromView;
|
||||||
|
var fromCurrent = $stateParams.fromCurrent;
|
||||||
|
|
||||||
$scope.site = {
|
$scope.site = {
|
||||||
folderId: null
|
folderId: null
|
||||||
|
@ -73,7 +74,8 @@ angular
|
||||||
siteId: siteId,
|
siteId: siteId,
|
||||||
animation: 'out-slide-down',
|
animation: 'out-slide-down',
|
||||||
returnScrollY: returnScrollY || 0,
|
returnScrollY: returnScrollY || 0,
|
||||||
returnSearchText: returnSearchText
|
returnSearchText: returnSearchText,
|
||||||
|
fromCurrent: fromCurrent
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -6,6 +6,7 @@ angular
|
||||||
$scope.i18n = i18nService;
|
$scope.i18n = i18nService;
|
||||||
var returnScrollY = $stateParams.returnScrollY;
|
var returnScrollY = $stateParams.returnScrollY;
|
||||||
var returnSearchText = $stateParams.returnSearchText;
|
var returnSearchText = $stateParams.returnSearchText;
|
||||||
|
var fromCurrent = $stateParams.fromCurrent;
|
||||||
|
|
||||||
$scope.site = null;
|
$scope.site = null;
|
||||||
siteService.get($stateParams.siteId, function (site) {
|
siteService.get($stateParams.siteId, function (site) {
|
||||||
|
@ -47,16 +48,24 @@ angular
|
||||||
siteId: site.id,
|
siteId: site.id,
|
||||||
fromView: true,
|
fromView: true,
|
||||||
returnScrollY: returnScrollY || 0,
|
returnScrollY: returnScrollY || 0,
|
||||||
returnSearchText: returnSearchText
|
returnSearchText: returnSearchText,
|
||||||
|
fromCurrent: fromCurrent
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.close = function () {
|
$scope.close = function () {
|
||||||
|
if (fromCurrent) {
|
||||||
|
$state.go('tabs.current', {
|
||||||
|
animation: 'out-slide-down'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
$state.go('tabs.vault', {
|
$state.go('tabs.vault', {
|
||||||
animation: 'out-slide-down',
|
animation: 'out-slide-down',
|
||||||
scrollY: returnScrollY || 0,
|
scrollY: returnScrollY || 0,
|
||||||
searchText: returnSearchText
|
searchText: returnSearchText
|
||||||
});
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.launchWebsite = function (site) {
|
$scope.launchWebsite = function (site) {
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<i class="fa fa-lg fa-clipboard"></i>
|
<i class="fa fa-lg fa-clipboard"></i>
|
||||||
</a>
|
</a>
|
||||||
<span class="item-label">{{i18n.username}}</span>
|
<span class="item-label">{{i18n.username}}</span>
|
||||||
<span id="username" class="monospaced">{{site.username}}</span>
|
<span id="username">{{site.username}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-section-item" ng-if="site.password">
|
<div class="list-section-item" ng-if="site.password">
|
||||||
<a class="btn-list" href="" title="{{i18n.copyPassword}}" ngclipboard ngclipboard-error="clipboardError(e)"
|
<a class="btn-list" href="" title="{{i18n.copyPassword}}" ngclipboard ngclipboard-error="clipboardError(e)"
|
||||||
|
|
Loading…
Reference in New Issue