mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-06 09:20:43 +01:00
double click to launch website from vault
This commit is contained in:
parent
79deb5633a
commit
09f47c0e59
@ -127,12 +127,32 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.viewLogin = function (login) {
|
$scope.viewLogin = function (login) {
|
||||||
storeState();
|
if (login.clicked) {
|
||||||
$state.go('viewLogin', {
|
login.cancelClick = true;
|
||||||
loginId: login.id,
|
$scope.launchWebsite(login);
|
||||||
animation: 'in-slide-up',
|
return;
|
||||||
from: 'vault'
|
}
|
||||||
});
|
|
||||||
|
login.clicked = true;
|
||||||
|
|
||||||
|
$timeout(function () {
|
||||||
|
if (login.cancelClick) {
|
||||||
|
login.cancelClick = false;
|
||||||
|
login.clicked = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
storeState();
|
||||||
|
$state.go('viewLogin', {
|
||||||
|
loginId: login.id,
|
||||||
|
animation: 'in-slide-up',
|
||||||
|
from: 'vault'
|
||||||
|
});
|
||||||
|
|
||||||
|
// clean up
|
||||||
|
login.cancelClick = false;
|
||||||
|
login.clicked = false;
|
||||||
|
}, 200);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.viewFolder = function (folder) {
|
$scope.viewFolder = function (folder) {
|
||||||
@ -154,10 +174,12 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.launchWebsite = function (login) {
|
$scope.launchWebsite = function (login) {
|
||||||
if (login.uri.startsWith('http://') || login.uri.startsWith('https://')) {
|
$timeout(function () {
|
||||||
$analytics.eventTrack('Launched Website From Listing');
|
if (login.uri.startsWith('http://') || login.uri.startsWith('https://')) {
|
||||||
chrome.tabs.create({ url: login.uri });
|
$analytics.eventTrack('Launched Website From Listing');
|
||||||
}
|
chrome.tabs.create({ url: login.uri });
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.$on('syncCompleted', function (event, successfully) {
|
$scope.$on('syncCompleted', function (event, successfully) {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
.module('bit.vault')
|
.module('bit.vault')
|
||||||
|
|
||||||
.controller('vaultViewFolderController', function ($scope, loginService, folderService, $q, $state, $stateParams, toastr,
|
.controller('vaultViewFolderController', function ($scope, loginService, folderService, $q, $state, $stateParams, toastr,
|
||||||
syncService, $analytics, i18nService, stateService, utilsService) {
|
syncService, $analytics, i18nService, stateService, utilsService, $timeout) {
|
||||||
var stateKey = 'viewFolder',
|
var stateKey = 'viewFolder',
|
||||||
state = stateService.getState(stateKey) || {};
|
state = stateService.getState(stateKey) || {};
|
||||||
|
|
||||||
@ -64,7 +64,7 @@
|
|||||||
$scope.searchLogins();
|
$scope.searchLogins();
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(setScrollY, 200);
|
$timeout(setScrollY, 200);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,10 +132,12 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.launchWebsite = function (login) {
|
$scope.launchWebsite = function (login) {
|
||||||
if (login.uri.startsWith('http://') || login.uri.startsWith('https://')) {
|
$timeout(function () {
|
||||||
$analytics.eventTrack('Launched Website From Listing');
|
if (login.uri.startsWith('http://') || login.uri.startsWith('https://')) {
|
||||||
chrome.tabs.create({ url: login.uri });
|
$analytics.eventTrack('Launched Website From Listing');
|
||||||
}
|
chrome.tabs.create({ url: login.uri });
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
function resetList(logins) {
|
function resetList(logins) {
|
||||||
@ -169,12 +171,32 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.viewLogin = function (login) {
|
$scope.viewLogin = function (login) {
|
||||||
storeState();
|
if (login.clicked) {
|
||||||
$state.go('viewLogin', {
|
login.cancelClick = true;
|
||||||
loginId: login.id,
|
$scope.launchWebsite(login);
|
||||||
animation: 'in-slide-up',
|
return;
|
||||||
from: 'folder'
|
}
|
||||||
});
|
|
||||||
|
login.clicked = true;
|
||||||
|
|
||||||
|
$timeout(function () {
|
||||||
|
if (login.cancelClick) {
|
||||||
|
login.cancelClick = false;
|
||||||
|
login.clicked = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
storeState();
|
||||||
|
$state.go('viewLogin', {
|
||||||
|
loginId: login.id,
|
||||||
|
animation: 'in-slide-up',
|
||||||
|
from: 'folder'
|
||||||
|
});
|
||||||
|
|
||||||
|
// clean up
|
||||||
|
login.cancelClick = false;
|
||||||
|
login.clicked = false;
|
||||||
|
}, 200);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.clipboardError = function (e) {
|
$scope.clipboardError = function (e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user