-
-
+
+
+ {{'twoStepNewWindowMessage' | i18n}}
+
+
+
+
+
{{'noTwoStepProviders' | i18n}}
+
{{'noTwoStepProviders2' | i18n}}
-
-
-
{{'noTwoStepProviders' | i18n}}
-
{{'noTwoStepProviders2' | i18n}}
-
-
+
+
diff --git a/src/popup2/tabs.component.ts b/src/popup2/tabs.component.ts
index aae3c32c228..33dba4fc60f 100644
--- a/src/popup2/tabs.component.ts
+++ b/src/popup2/tabs.component.ts
@@ -13,6 +13,7 @@ import { Router } from '@angular/router';
@Component({
selector: 'app-tabs',
template: `
+
`,
+
+
`,
})
export class TabsComponent { }
diff --git a/src/popup2/vault/groupings.component.html b/src/popup2/vault/groupings.component.html
new file mode 100644
index 00000000000..6cebc13c8f7
--- /dev/null
+++ b/src/popup2/vault/groupings.component.html
@@ -0,0 +1,73 @@
+
+
+
+
+
+ {{'myVault' | i18n}}
+
+
+
+
+
+
+
+
+ {{'loading' | i18n}}
+
+
+
+
+
diff --git a/src/popup2/vault/groupings.component.ts b/src/popup2/vault/groupings.component.ts
index fa4ad445513..26d317c3fa1 100644
--- a/src/popup2/vault/groupings.component.ts
+++ b/src/popup2/vault/groupings.component.ts
@@ -1,22 +1,74 @@
+import * as template from './groupings.component.html';
+
import {
Component,
- ComponentFactoryResolver,
- NgZone,
- OnDestroy,
OnInit,
- Type,
- ViewChild,
- ViewContainerRef,
} from '@angular/core';
-import { Router } from '@angular/router';
+
+import { CipherType } from 'jslib/enums/cipherType';
+
+import { CipherView } from 'jslib/models/view/cipherView';
+
+import { CollectionService } from 'jslib/abstractions/collection.service';
+import { CipherService } from 'jslib/abstractions/cipher.service';
+import { FolderService } from 'jslib/abstractions/folder.service';
+
+import { GroupingsComponent as BaseGroupingsComponent } from 'jslib/angular/components/groupings.component';
@Component({
selector: 'app-vault-groupings',
- styles: [],
- template: `Groupings`,
+ template: template,
})
-export class GroupingsComponent {
- constructor() {
+export class GroupingsComponent extends BaseGroupingsComponent implements OnInit {
+ ciphers: CipherView[];
+ favoriteCiphers: CipherView[];
+ folderCounts = new Map
();
+ collectionCounts = new Map();
+ typeCounts = new Map();
+ constructor(collectionService: CollectionService, folderService: FolderService,
+ private cipherService: CipherService) {
+ super(collectionService, folderService);
+ }
+
+ async ngOnInit() {
+ this.load();
+ this.loaded = false;
+ await this.loadCiphers();
+ this.loaded = true;
+ }
+
+ async loadCiphers() {
+ this.ciphers = await this.cipherService.getAllDecrypted();
+ this.ciphers.forEach((c) => {
+ if (c.favorite) {
+ if (this.favoriteCiphers == null) {
+ this.favoriteCiphers = [];
+ }
+ this.favoriteCiphers.push(c);
+ }
+
+ if (this.typeCounts.has(c.type)) {
+ this.typeCounts.set(c.type, this.typeCounts.get(c.type) + 1);
+ } else {
+ this.typeCounts.set(c.type, 1);
+ }
+
+ if (this.folderCounts.has(c.folderId)) {
+ this.folderCounts.set(c.folderId, this.folderCounts.get(c.folderId) + 1);
+ } else {
+ this.folderCounts.set(c.folderId, 1);
+ }
+
+ if (c.collectionIds != null) {
+ c.collectionIds.forEach((colId) => {
+ if (this.collectionCounts.has(colId)) {
+ this.collectionCounts.set(colId, this.collectionCounts.get(colId) + 1);
+ } else {
+ this.collectionCounts.set(colId, 1);
+ }
+ });
+ }
+ });
}
}
diff --git a/src/scss/base.scss b/src/scss/base.scss
index 74b8188ac85..402dbe0855f 100644
--- a/src/scss/base.scss
+++ b/src/scss/base.scss
@@ -7,7 +7,7 @@
}
html, body {
- background-color: $background-color-alt2;
+ background-color: $background-color;
font-family: $font-family-sans-serif;
font-size: $font-size-base;
color: $text-color;
@@ -71,16 +71,16 @@ textarea {
resize: vertical;
}
-div::-webkit-scrollbar {
+content::-webkit-scrollbar {
width: 10px;
height: 10px;
}
-div::-webkit-scrollbar-track {
+content::-webkit-scrollbar-track {
background-color: transparent;
}
-div::-webkit-scrollbar-thumb {
+content::-webkit-scrollbar-thumb {
background-color: rgba(100,100,100,.2);
border-radius: 10px;
margin-right: 1px;
@@ -196,3 +196,29 @@ header {
}
}
}
+
+app-root {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ z-index: 980;
+}
+
+content {
+ position: absolute;
+ top: 44px;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ overflow: auto;
+
+ &.no-header {
+ top: 0;
+ }
+}
+
+.tab-page {
+ content {
+ bottom: 55px;
+ }
+}
diff --git a/src/scss/variables.scss b/src/scss/variables.scss
index e049dde9469..499bb0898ea 100644
--- a/src/scss/variables.scss
+++ b/src/scss/variables.scss
@@ -23,11 +23,10 @@ $brand-info: #555555;
$brand-warning: #bf7e16;
$brand-primary-accent: #286090;
-$background-color: white;
-$background-color-alt: #f9fafc;
-$background-color-alt2: #ecf0f5;
+$background-color: #f9fafc;
+$background-color-alt: #ecf0f5;
-$box-background-color: $background-color;
+$box-background-color: white;
$box-background-hover-color: $list-item-hover;
$box-border-color: $border-color;