1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 17:23:37 +00:00

added support for sidebar

This commit is contained in:
Kyle Spearrin
2017-09-28 10:39:31 -04:00
parent 915546aa0f
commit 6fa5582883
10 changed files with 72 additions and 16 deletions

View File

@@ -175,12 +175,10 @@
params = providers[constants.twoFactorProvider.email];
$scope.twoFactorEmail = params.Email;
if (chrome.extension.getViews({ type: 'popup' }).length > 0) {
if (chrome.extension.getViews({ type: 'popup' }).length > 0 && !utilsService.inSidebar($window)) {
SweetAlert.swal({
title: 'Two-step Login',
text: 'Clicking outside the popup window to check your email for your verification code will ' +
'cause this popup to close. ' +
'Do you want to open this popup in a new window so that it does not close?',
title: i18nService.twoStepLogin,
text: i18nService.popup2faCloseMessage,
showCancelButton: true,
confirmButtonText: i18nService.yes,
cancelButtonText: i18nService.no

View File

@@ -109,6 +109,10 @@ angular
});
};
$scope.refresh = function () {
loadVault();
};
$scope.$on('syncCompleted', function (event, successfully) {
if ($scope.loaded) {
setTimeout(loadVault, 500);

View File

@@ -1,7 +1,10 @@
<div class="header header-search">
<div class="left">
<div class="left" ng-if="!main.inSidebar">
<a href="" ng-click="main.expandVault()"><i class="fa fa-external-link fa-rotate-270 fa-lg"></i></a>
</div>
<div class="left" ng-if="main.inSidebar">
<a href="" ng-click="refresh()"><i class="fa fa-refresh fa-lg"></i></a>
</div>
<div class="search" ng-style="{'visibility': main.disableSearch ? 'hidden' : 'visible'}">
<input type="search" placeholder="{{i18n.searchVault}}" id="search" ng-model="searchText" ng-change="searchVault()" />
<i class="fa fa-search"></i>
@@ -16,7 +19,7 @@
<div class="list-grouped">
<a href="#" stop-click ng-click="fillLogin(login)" class="list-grouped-item condensed"
title="{{i18n.autoFill}} {{login.name}}"
ng-repeat="login in theLogins = (logins | orderBy: [sortUriMatch, sortLastUsed, 'name', 'username'])
ng-repeat="login in theLogins = (logins | orderBy: [sortUriMatch, sortLastUsed, 'name', 'username'])
track by $index">
<span class="btn-list" stop-prop stop-click title="{{i18n.copyPassword}}"
ngclipboard ngclipboard-error="clipboardError(e)"

View File

@@ -10,6 +10,7 @@ angular
self.smBody = !self.xsBody && $window.screen.availHeight <= 800;
self.lgBody = !self.xsBody && !self.smBody && utilsService && !utilsService.isFirefox() && !utilsService.isEdge();
self.disableSearch = utilsService.isEdge();
self.inSidebar = utilsService.inSidebar($window);
$scope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams) {
if (toParams.animation) {

View File

@@ -35,6 +35,7 @@
font-weight: bold;
display: block;
padding: 12px 0;
text-align: center;
}
.left {
@@ -167,6 +168,7 @@
i {
display: block;
margin-bottom: 2px;
text-align: center;
}
}