|
| 1 | +<div class="feed-page"> |
| 2 | + <!-- <p class="search"> |
| 3 | + <mat-form-field appearance="fill" class="input-full-width"> |
| 4 | + <mat-label>Search in People</mat-label> |
| 5 | + <input matInput placeholder="name, display name, about or pubkey" type="search" (keyup.enter)="search()" [(ngModel)]="searchTerm" /> |
| 6 | + <mat-icon matSuffix>search</mat-icon> |
| 7 | + </mat-form-field> |
| 8 | + </p> --> |
| 9 | + |
| 10 | + <div class="options"> |
| 11 | + <mat-accordion> |
| 12 | + <mat-expansion-panel> |
| 13 | + <mat-expansion-panel-header> |
| 14 | + <mat-panel-title>{{ 'People.Options' | translate }}</mat-panel-title> |
| 15 | + <mat-panel-description></mat-panel-description> |
| 16 | + </mat-expansion-panel-header> |
| 17 | + |
| 18 | + <!-- <p> |
| 19 | + <mat-slide-toggle class="options-slider" [(ngModel)]="showBlocked" (change)="optionsUpdated($event, 1)">Show blocked</mat-slide-toggle> |
| 20 | + <mat-slide-toggle class="options-slider" [(ngModel)]="showMuted" (change)="optionsUpdated($event, 2)">Show muted</mat-slide-toggle> |
| 21 | + <mat-slide-toggle class="options-slider" [(ngModel)]="showCached" (change)="optionsUpdated($event, 3)">Show cached</mat-slide-toggle> |
| 22 | + </p> --> |
| 23 | + |
| 24 | + <mat-form-field class="options-field"> |
| 25 | + <mat-label>{{ 'People.Show' | translate }}</mat-label> |
| 26 | + <mat-select (selectionChange)="showChanged()" [(value)]="optionsService.values.peopleDisplayType"> |
| 27 | + <mat-option [value]="1">{{ 'People.Following' | translate }}</mat-option> |
| 28 | + <mat-option [value]="2">{{ 'People.Muted' | translate }}</mat-option> |
| 29 | + <mat-option [value]="3">{{ 'People.Blocked' | translate }}</mat-option> |
| 30 | + <mat-option [value]="0">{{ 'People.Cached' | translate }}</mat-option> |
| 31 | + </mat-select> |
| 32 | + </mat-form-field> |
| 33 | + |
| 34 | + <mat-form-field class="options-field"> |
| 35 | + <mat-label>{{ 'People.Sorting' | translate }}</mat-label> |
| 36 | + <mat-select (selectionChange)="updateSorting()" [(value)]="optionsService.values.peopleDisplaySort"> |
| 37 | + <mat-option value="name-asc">{{ 'People.NameAZ' | translate }}</mat-option> |
| 38 | + <mat-option value="name-desc">{{ 'People.NameZA' | translate }}</mat-option> |
| 39 | + <mat-option value="followed-asc">{{ 'People.FollowedNewest' | translate }}</mat-option> |
| 40 | + <mat-option value="followed-desc">{{ 'People.FollowedOldest' | translate }}</mat-option> |
| 41 | + <mat-option value="created-asc">{{ 'People.UpdatedNewest' | translate }}</mat-option> |
| 42 | + <mat-option value="created-desc">{{ 'People.UpdatedOldest' | translate }}</mat-option> |
| 43 | + <mat-option value="interesting-asc">{{ 'People.MostInteresting' | translate }}</mat-option> |
| 44 | + <mat-option value="interesting-desc">{{ 'People.LessInteresting' | translate }}</mat-option> |
| 45 | + </mat-select> |
| 46 | + </mat-form-field> |
| 47 | + |
| 48 | + <mat-form-field class="options-field"> |
| 49 | + <mat-label>{{ 'People.View' | translate }}</mat-label> |
| 50 | + <mat-select (selectionChange)="showChanged()" [(value)]="optionsService.values.peopleDisplayView"> |
| 51 | + <mat-option [value]="6">{{ 'People.LargeIcons' | translate }}</mat-option> |
| 52 | + <mat-option [value]="5">{{ 'People.MediumIcons' | translate }}</mat-option> |
| 53 | + <mat-option [value]="4">{{ 'People.SmallIcons' | translate }} </mat-option> |
| 54 | + <!-- <mat-option [value]="3">List</mat-option> --> |
| 55 | + <mat-option [value]="2">{{ 'People.Details' | translate }} </mat-option> |
| 56 | + <mat-option [value]="0">{{ 'People.Tiles' | translate }}</mat-option> |
| 57 | + <mat-option [value]="1">{{ 'People.Content' | translate }} </mat-option> |
| 58 | + </mat-select> |
| 59 | + </mat-form-field> |
| 60 | + |
| 61 | + <!-- <mat-slide-toggle class="options-slider" (change)="optionsService.save()" [(ngModel)]="optionsService.values.peopleDisplayAbout">Display about</mat-slide-toggle> |
| 62 | + <mat-slide-toggle class="options-slider" (change)="optionsService.save()" [(ngModel)]="optionsService.values.peopleDisplayDate">Display date</mat-slide-toggle> --> |
| 63 | + |
| 64 | + <p class="people-actions"> |
| 65 | + <!-- <button mat-stroked-button (click)="importFollowList()">Import Following List</button> --> |
| 66 | + <button mat-stroked-button (click)="dataService.publishContactsAndRelays()">{{ 'People.PublishFollowList' | translate }} </button> |
| 67 | + <button mat-stroked-button (click)="downloadFollowing()">{{ 'People.SavePublicFollowing' | translate }} </button> |
| 68 | + <!-- <button mat-stroked-button (click)="dataService.save()">Save People List (backup)</button> --> |
| 69 | + </p> |
| 70 | + </mat-expansion-panel> |
| 71 | + </mat-accordion> |
| 72 | + </div> |
| 73 | + |
| 74 | + <div class="people-list" [ngClass]="['people-list-' + optionsService.values.peopleDisplayView]"> |
| 75 | + <ng-template [ngIf]="!loading"> |
| 76 | + <ng-template [ngIf]="optionsService.values.peopleDisplayView == 0 || optionsService.values.peopleDisplayView == null"> |
| 77 | + <mat-card class="people-card people clickable" (click)="navigation.openProfile($event, profile)" *ngFor="let profile of sortedItems; trackBy: trackByFn"> |
| 78 | + <!-- ; trackBy: trackByFn track by won't update when changing circle. --> |
| 79 | + <div class="events-header"> |
| 80 | + <!-- <div [style.background-image]="utilities.getBannerBackgroundStyle(profile.banner)" class="profile-banner"></div> --> |
| 81 | + <app-event-header [profile]="profile"> |
| 82 | + <small> <span class="clickable" *ngIf="profile.created">{{ 'People.Followed' | translate }} {{ profile.created | ago }}</span> <app-directory-icon [pubkey]="profile.pubkey"></app-directory-icon> </small> |
| 83 | + </app-event-header> |
| 84 | + <app-profile-actions [profile]="profile"></app-profile-actions> |
| 85 | + </div> |
| 86 | + <div class="content clickable">{{ profile.about }}</div> |
| 87 | + </mat-card> |
| 88 | + </ng-template> |
| 89 | + |
| 90 | + <ng-template [ngIf]="optionsService.values.peopleDisplayView == 1"> |
| 91 | + <app-event-header [listType]="'content'" [iconSize]="'small'" [displayName]="true" [displayContent]="true" *ngFor="let profile of sortedItems; trackBy: trackByFn" [profile]="profile"></app-event-header> |
| 92 | + </ng-template> |
| 93 | + |
| 94 | + <ng-template [ngIf]="optionsService.values.peopleDisplayView == 2"> |
| 95 | + <app-event-header [listType]="'details'" [iconSize]="'small'" [displayName]="true" [displayContent]="true" *ngFor="let profile of sortedItems; trackBy: trackByFn" [profile]="profile"></app-event-header> |
| 96 | + </ng-template> |
| 97 | + |
| 98 | + <ng-template [ngIf]="optionsService.values.peopleDisplayView == 3"> |
| 99 | + <app-event-header [iconSize]="'small'" [displayName]="false" [displayContent]="false" *ngFor="let profile of sortedItems; trackBy: trackByFn" [profile]="profile"></app-event-header> |
| 100 | + </ng-template> |
| 101 | + |
| 102 | + <ng-template [ngIf]="optionsService.values.peopleDisplayView == 4"> |
| 103 | + <app-event-header [listType]="'icon'" [iconSize]="'small'" [displayName]="false" [displayContent]="false" *ngFor="let profile of sortedItems; trackBy: trackByFn" [profile]="profile"></app-event-header> |
| 104 | + </ng-template> |
| 105 | + <ng-template [ngIf]="optionsService.values.peopleDisplayView == 5"> |
| 106 | + <app-event-header [listType]="'icon'" [iconSize]="'medium'" [displayName]="false" [displayContent]="false" *ngFor="let profile of sortedItems; trackBy: trackByFn" [profile]="profile"></app-event-header> |
| 107 | + </ng-template> |
| 108 | + <ng-template [ngIf]="optionsService.values.peopleDisplayView == 6"> |
| 109 | + <app-event-header [listType]="'icon'" [iconSize]="'large'" [displayName]="false" [displayContent]="false" *ngFor="let profile of sortedItems; trackBy: trackByFn" [profile]="profile"></app-event-header> |
| 110 | + </ng-template> |
| 111 | + </ng-template> |
| 112 | + |
| 113 | + <ng-template [ngIf]="loading"><mat-spinner class="loading"></mat-spinner></ng-template> |
| 114 | + </div> |
| 115 | + |
| 116 | + <p class="centered">Count: {{sortedItems.length}}</p> |
| 117 | + |
| 118 | + <!-- |
| 119 | + <div *ngIf="items$ | withLoading | async as items"> |
| 120 | + <ng-template [ngIf]="items.value">Value: {{ items.value }}</ng-template> |
| 121 | + <ng-template [ngIf]="items.error">Error {{ items.error }}</ng-template> |
| 122 | + <ng-template [ngIf]="items.loading">Loading...</ng-template> |
| 123 | + </div> --> |
| 124 | + |
| 125 | + <!-- <div *ngIf="items$ | async as profiles"> --> |
| 126 | + <!-- <div class="centered" style="width: 100%"> |
| 127 | + <br /> |
| 128 | + <mat-spinner class="loading"></mat-spinner> |
| 129 | + </div> --> |
| 130 | + |
| 131 | + <!-- Count: {{ profiles.length }} --> |
| 132 | + <!-- </div> --> |
| 133 | + |
| 134 | + <!-- <p class="dimmed">People are those you are following. You can use circles to organize your people.</p> --> |
| 135 | +</div> |
0 commit comments