Merge branch 'tiny-ui-improvements' into next

This commit is contained in:
Marcos Zuriaga 2021-09-18 16:53:19 +02:00
commit 977fe00138
No known key found for this signature in database
GPG key ID: 7D15585354D072FF
14 changed files with 278 additions and 67 deletions

View file

@ -144,12 +144,19 @@
display: flex;
flex-direction: column;
min-height: 0;
flex: 1 1 100%; }
flex: 1 1 100%;
z-index: 51;
background: var(--color-main-background); }
.app-sidebar-tabs__nav {
background: var(--color-background-hover); }
.app-sidebar-tabs__nav ul {
display: flex;
justify-content: stretch; }
.theme--dark .app-sidebar-tabs__nav {
background: var(--color-background-darker); }
.app-sidebar-tabs__tab.active {
color: var(--color-text-light);
border-bottom-color: var(--color-primary-element);
@ -488,7 +495,7 @@
height: 100%;
width: 100%; }
.icon-image {
.icon-image-size {
width: 16px; }
.angularjs-datetime-picker {
@ -506,7 +513,7 @@
display: inline-block; }
#app-sidebar .sidebar .sidebar-icon {
margin-right: 15px; }
#app-sidebar .sidebar .sidebar-icon .icon-image {
#app-sidebar .sidebar .sidebar-icon .icon-image-size {
width: 44px; }
#app-sidebar .sidebar .sidebar-icon i {
width: 44px; }
@ -1112,7 +1119,8 @@
#app-navigation li a.taginput {
opacity: 1; }
#app-navigation li a {
overflow: visible; }
overflow: visible;
padding-left: 44px !important; }
#app-navigation li a tags-input {
opacity: 1.0; }
#app-navigation li a tags-input li {
@ -1244,6 +1252,9 @@
text-align: left;
padding: 3px 5px; }
h3 {
font-weight: bold; }
/**
* Nextcloud - passman
*
@ -1298,6 +1309,82 @@
.custom-search-dialog .ui-dialog-buttonpane.ui-helper-clearfix {
display: none; }
/**
* Replace productive toastify lib for Nextcloud github installations
*/
.toastify.dialogs {
min-width: 200px;
background: none;
background-color: var(--color-main-background);
color: var(--color-main-text);
box-shadow: 0 0 6px 0 var(--color-box-shadow);
padding: 12px;
padding-right: 34px;
margin-top: 45px;
position: fixed;
z-index: 10100;
border-radius: var(--border-radius); }
.toastify.dialogs .toast-undo-button,
.toastify.dialogs .toast-close {
position: absolute;
top: 0;
right: 0;
overflow: hidden;
box-sizing: border-box;
min-width: 44px;
height: 100%;
padding: 12px;
white-space: nowrap;
background-repeat: no-repeat;
background-position: center;
background-color: transparent;
min-height: 0; }
.toastify.dialogs .toast-undo-button.toast-close,
.toastify.dialogs .toast-close.toast-close {
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6Ii8+Cjwvc3ZnPgo=);
text-indent: 200%;
opacity: 0.4; }
.toastify.dialogs .toast-undo-button.toast-undo-button,
.toastify.dialogs .toast-close.toast-undo-button {
margin: 3px;
height: calc(100% - 2 * 3px); }
.toastify.dialogs .toast-undo-button:hover,
.toastify.dialogs .toast-undo-button:focus,
.toastify.dialogs .toast-undo-button:active,
.toastify.dialogs .toast-close:hover,
.toastify.dialogs .toast-close:focus,
.toastify.dialogs .toast-close:active {
cursor: pointer;
opacity: 1; }
.toastify.dialogs.toastify-top {
right: 10px; }
.toastify.dialogs.toast-with-click {
cursor: pointer; }
.toastify.dialogs.toast-error {
border-left: 3px solid var(--color-error); }
.toastify.dialogs.toast-info {
border-left: 3px solid var(--color-primary); }
.toastify.dialogs.toast-warning {
border-left: 3px solid var(--color-warning); }
.toastify.dialogs.toast-success {
border-left: 3px solid var(--color-success); }
.toastify.dialogs.toast-undo {
border-left: 3px solid var(--color-success); }
.theme--dark .toastify.dialogs .toast-close.toast-close {
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6IiBzdHlsZT0iZmlsbC1vcGFjaXR5OjE7ZmlsbDojZmZmZmZmIi8+Cjwvc3ZnPgo=); }
.app-passman {
overflow-x: hidden; }

File diff suppressed because one or more lines are too long

View file

@ -345,11 +345,19 @@
$scope.filtered_credentials = [];
$scope.$watch('[selectedtags, filterOptions, delete_time, active_vault.credentials]', function () {
$scope.applyUserFilters(true);
}, true);
$scope.applyUserFilters = function(noFilterReset) {
if (!$scope.active_vault) {
return;
}
if ($scope.active_vault.credentials) {
var credentials = angular.copy($scope.active_vault.credentials);
if ($scope.active_vault.credentials.length > 0) {
$scope.filterSpecialCredentials(noFilterReset);
credentials = angular.copy($scope.filtered_credentials);
}
var filtered_credentials = $filter('credentialSearch')(credentials, $scope.filterOptions);
filtered_credentials = $filter('tagFilter')(filtered_credentials, $scope.selectedtags);
filtered_credentials = $filter('filter')(filtered_credentials, {hidden: 0});
@ -362,7 +370,7 @@
}
}
}
}, true);
};
$scope.no_credentials_label=[];
$scope.no_credentials_label.all=true;
@ -379,11 +387,17 @@
$scope.no_credentials_label.expired=false;
};
$scope.currentSpecialFilter = "all";
//watch for special tags
$scope.$on('filterSpecial', function(event, args) {
$scope.currentSpecialFilter = args;
$scope.applyUserFilters(args !== "all");
});
$scope.filterSpecialCredentials = function(noFilterReset) {
$scope.disableAllLabels();
switch (args) {
switch ($scope.currentSpecialFilter) {
case "strength_good":
$scope.filterStrength(3,1000);
$scope.no_credentials_label.s_good=true;
@ -401,11 +415,11 @@
$scope.no_credentials_label.expired=true;
break;
case "all":
$scope.filterAll();
$scope.filterAll(noFilterReset);
$scope.no_credentials_label.all=true;
break;
}
});
};
$scope.getListSizes = function(){
var l = $scope.filtered_credentials;
@ -425,13 +439,15 @@
return result;
};
$scope.filterAll = function(){
$scope.selectedtags=[];
$scope.filterAll = function(noFilterReset){
if (noFilterReset == null || noFilterReset === false) {
$scope.filterOptions.filterText="";
$scope.selectedtags=[];
}
var creds_filtered=[];
for (var i = 0; i < $scope.active_vault.credentials.length; i++) {
if($scope.active_vault.credentials[i].delete_time===0){
if($scope.active_vault.credentials[i].delete_time===0 || $scope.delete_time > 0){
creds_filtered.push($scope.active_vault.credentials[i]);
}
}

View file

@ -134,6 +134,8 @@
if(string !== "nav_trashbin"){
$scope.delete_time=0;
$rootScope.$broadcast('set_delete_time', $scope.delete_time);
} else {
string = "all";
}
$scope.selectedTags =[];

View file

@ -32,7 +32,7 @@
angular.module('passmanApp').directive('credentialIcon', [
'$window', function($window) {
return {
template: '<img ng-src="{{ iconUrl }}" class="icon-image">',
template: '<img ng-src="{{ iconUrl }}" class="icon-image-size">',
restrict: 'E',
scope: {
credential: '=',

File diff suppressed because one or more lines are too long

View file

@ -34,6 +34,7 @@
@import 'share_credential';
@import 'settings';
@import 'searchboxexpander';
@import 'toastify';
.app-passman{
overflow-x: hidden;

View file

@ -28,7 +28,7 @@
}
//fix for different heights of passwordicon
.icon-image{
.icon-image-size{
width: 16px;
}
@ -53,7 +53,7 @@
display: inline-block;
.sidebar-icon {
margin-right: 15px;
.icon-image{
.icon-image-size{
width: 44px;
}
i {

View file

@ -125,6 +125,7 @@
}
a {
overflow: visible;
padding-left: 44px!important;
tags-input {
opacity: 1.0;
li {

View file

@ -25,12 +25,24 @@
flex-direction: column;
min-height: 0;
flex: 1 1 100%;
z-index: 51;
background: var(--color-main-background);
}
.app-sidebar-tabs__nav ul {
.app-sidebar-tabs__nav {
background: var(--color-background-hover);
ul {
display: flex;
justify-content: stretch;
}
}
.theme--dark {
.app-sidebar-tabs__nav {
background: var(--color-background-darker);
}
}
.app-sidebar-tabs__tab.active {
color: var(--color-text-light);

View file

@ -84,3 +84,6 @@
padding: 3px 5px;
}
}
h3 {
font-weight: bold;
}

89
sass/toastify.scss Normal file
View file

@ -0,0 +1,89 @@
/**
* Replace productive toastify lib for Nextcloud github installations
*/
.toastify.dialogs {
min-width: 200px;
background: none;
background-color: var(--color-main-background);
color: var(--color-main-text);
box-shadow: 0 0 6px 0 var(--color-box-shadow);
padding: 12px;
padding-right: 34px;
margin-top: 45px;
position: fixed;
z-index: 10100;
border-radius: var(--border-radius)
}
.toastify.dialogs .toast-undo-button,
.toastify.dialogs .toast-close {
position: absolute;
top: 0;
right: 0;
overflow: hidden;
box-sizing: border-box;
min-width: 44px;
height: 100%;
padding: 12px;
white-space: nowrap;
background-repeat: no-repeat;
background-position: center;
background-color: transparent;
min-height: 0
}
.toastify.dialogs .toast-undo-button.toast-close,
.toastify.dialogs .toast-close.toast-close {
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6Ii8+Cjwvc3ZnPgo=);
text-indent: 200%;
opacity: .4
}
.toastify.dialogs .toast-undo-button.toast-undo-button,
.toastify.dialogs .toast-close.toast-undo-button {
margin: 3px;
height: calc(100% - 2 * 3px)
}
.toastify.dialogs .toast-undo-button:hover,
.toastify.dialogs .toast-undo-button:focus,
.toastify.dialogs .toast-undo-button:active,
.toastify.dialogs .toast-close:hover,
.toastify.dialogs .toast-close:focus,
.toastify.dialogs .toast-close:active {
cursor: pointer;
opacity: 1
}
.toastify.dialogs.toastify-top {
right: 10px
}
.toastify.dialogs.toast-with-click {
cursor: pointer
}
.toastify.dialogs.toast-error {
border-left: 3px solid var(--color-error)
}
.toastify.dialogs.toast-info {
border-left: 3px solid var(--color-primary)
}
.toastify.dialogs.toast-warning {
border-left: 3px solid var(--color-warning)
}
.toastify.dialogs.toast-success {
border-left: 3px solid var(--color-success)
}
.toastify.dialogs.toast-undo {
border-left: 3px solid var(--color-success)
}
.theme--dark .toastify.dialogs .toast-close.toast-close {
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6IiBzdHlsZT0iZmlsbC1vcGFjaXR5OjE7ZmlsbDojZmZmZmZmIi8+Cjwvc3ZnPgo=)
}

View file

@ -1,6 +1,6 @@
<div class="cell fa fa-lock" ng-if="!credential.url && !credential.icon"></div>
<div class="cell fa fa-lock" ng-if="!credential.url && (!credential.icon || (credential.icon && !credential.icon.type))"></div>
<div class="cell" ng-if="credential.url || credential.icon">
<div class="cell" ng-if="credential.url || (credential.icon && credential.icon.type !== false)">
<span class="icon">
<credential-icon credential="credential"></credential-icon>
</span>

View file

@ -152,7 +152,7 @@
<credential-icon credential="selectedCredential"></credential-icon>
</span>
<span class="icon sidebar-icon" ng-if="!selectedCredential.url && (!selectedCredential.icon || (selectedCredential.icon && !selectedCredential.icon.type))">
<i class="fa fa-lock fa-3x icon-image"></i>
<i class="fa fa-lock fa-3x icon-image-size"></i>
</span>
<h2 class="sidebar-label">{{selectedCredential.label}}</h2>
</div>