Commit 8f957d86 authored by David Burke's avatar David Burke

Started virtual scroll in extension

parent 60c278b7
Pipeline #38681185 failed with stage
in 5 minutes and 5 seconds
This diff is collapsed.
import { CommonModule } from "@angular/common";
import { NgModule } from "@angular/core";
import { routing, routingStore } from "../app.routing";
import { ScrollingModule } from "@angular/cdk/scrolling";
import { StoreModule } from "@ngrx/store";
import { EffectsModule } from "@ngrx/effects";
import { InlineSVGModule } from "ng-inline-svg";
import { TooltipModule } from "ngx-tooltip";
import { HotkeyModule } from "angular2-hotkeys";
......@@ -9,11 +10,9 @@ import { HotkeyModule } from "angular2-hotkeys";
import { BackgroundComponent } from "./background/";
import { PopupComponent, PopupContainer, PopupItemComponent } from "./popup/";
import { popupReducer } from "./popup/popup.reducer";
import { SharedModule } from "../shared/";
import { StoreModule } from "@ngrx/store";
import { EffectsModule } from "@ngrx/effects";
import { PopupEffects } from "./popup/popup.effects";
import { routing, routingStore } from "../app.routing";
export const COMPONENTS = [
PopupComponent,
......@@ -31,6 +30,7 @@ export const COMPONENTS = [
routingStore,
SharedModule,
TooltipModule,
ScrollingModule,
StoreModule.forFeature("popup", popupReducer),
EffectsModule.forFeature([PopupEffects])
],
......
......@@ -38,19 +38,23 @@
</div>
<div class="popup__password-list-header" *ngIf="matchedSecrets.length > 0">All Passwords</div>
<cdk-virtual-scroll-viewport class="viewport" [itemSize]="69">
<div *cdkVirtualFor="let secret of secrets" class="item">
<app-popup-item
[secret]="secret"
[isSelected]="secret.id === selectedSecret"
[formFillMessage]="formFillMessage"
[usernameCopied]="secret.id === usernameCopied"
[passwordCopied]="secret.id === passwordCopied"
(openUrl)="openUrl.emit(secret)"
(onCopyUsername)="onCopyUsername.emit(secret)"
(onCopyPassword)="onCopyPassword.emit(secret)"
(setSelected)="setSelected.emit($event)"
(closeSelected)="setSelected.emit()"
(onDetail)="onDetail.emit(secret)">
></app-popup-item>
</div>
</cdk-virtual-scroll-viewport>
<div *ngFor="let secret of secrets">
<app-popup-item
[secret]="secret"
[isSelected]="secret.id === selectedSecret"
[formFillMessage]="formFillMessage"
[usernameCopied]="secret.id === usernameCopied"
[passwordCopied]="secret.id === passwordCopied"
(openUrl)="openUrl.emit(secret)"
(onCopyUsername)="onCopyUsername.emit(secret)"
(onCopyPassword)="onCopyPassword.emit(secret)"
(setSelected)="setSelected.emit($event)"
(closeSelected)="setSelected.emit()"
(onDetail)="onDetail.emit(secret)">
></app-popup-item>
</div>
</div>
......@@ -63,6 +63,8 @@
}
}
.viewport {
height: 350px;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment