mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 01:03:35 +00:00
37 lines
1.5 KiB
JavaScript
37 lines
1.5 KiB
JavaScript
angular
|
|
.module('bit.tools')
|
|
|
|
.controller('toolsController', function ($scope, SweetAlert, i18nService, $analytics, utilsService) {
|
|
$scope.i18n = i18nService;
|
|
$scope.showExport = !utilsService.isEdge();
|
|
$scope.launchWebVault = function (createOrg) {
|
|
$analytics.eventTrack('Launch Web Vault' + (createOrg ? ' For Share' : ''));
|
|
chrome.tabs.create({ url: 'https://vault.bitwarden.com/#/' + (createOrg ? '?org=free' : '') });
|
|
};
|
|
|
|
$scope.launchiOS = function () {
|
|
$analytics.eventTrack('Launch iOS');
|
|
chrome.tabs.create({ url: 'https://itunes.apple.com/us/app/bitwarden-free-password-manager/id1137397744?mt=8' });
|
|
};
|
|
|
|
$scope.launchAndroid = function () {
|
|
$analytics.eventTrack('Launch Android');
|
|
chrome.tabs.create({ url: 'https://play.google.com/store/apps/details?id=com.x8bit.bitwarden' });
|
|
};
|
|
|
|
$scope.launchImport = function () {
|
|
SweetAlert.swal({
|
|
title: i18nService.importItems,
|
|
text: i18nService.importItemsConfirmation,
|
|
showCancelButton: true,
|
|
confirmButtonText: i18nService.yes,
|
|
cancelButtonText: i18nService.cancel
|
|
}, function (confirmed) {
|
|
if (confirmed) {
|
|
$analytics.eventTrack('Launch Web Vault For Import');
|
|
chrome.tabs.create({ url: 'https://help.bitwarden.com/article/import-data/' });
|
|
}
|
|
});
|
|
};
|
|
});
|