-
Notifications
You must be signed in to change notification settings - Fork 137
Expand file tree
/
Copy pathadmin.component.html
More file actions
1756 lines (1699 loc) · 55.2 KB
/
admin.component.html
File metadata and controls
1756 lines (1699 loc) · 55.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<div *ngIf="globalVars.nodeInfo != null">
<!-- Top Bar -->
<div
*ngIf="!isMobile"
class="global__top-bar__height d-flex align-items-center w-100 px-15px fs-18px font-weight-bold fc-default justify-content-between border-bottom border-color-grey"
>
<div class="d-flex align-items-center">
<top-bar-mobile-navigation-control
class="mr-15px d-lg-none d-inline-block"
></top-bar-mobile-navigation-control>
Admin
</div>
</div>
<!-- Selector -->
<div class="fs-15px border-bottom border-color-grey">
<div class="m-15px">
<select
#rightBarSelect
id="right-bar-chart-select"
class="form-control w-100 fs-15px text-grey5 font-weight-bold cursor-pointer"
(change)="_tabClicked($event)"
[(ngModel)]="activeTab"
>
<option
*ngFor="let option of adminTabs"
[value]="option"
class="fs-15px text-grey5 font-weight-bold"
>
{{ option }}
</option>
</select>
</div>
</div>
<!-- Post Whitelist Selector -->
<div
style="overflow-y: scroll"
class="disable-scrollbars"
*ngIf="activeTab == 'Posts' && adminPosts.length != 0 && !loadingPosts"
>
<div
class="w-100 d-flex justify-content-start py-10px pl-15px fs-15px fc-muted border-bottom border-color-grey light-grey-divider"
>
Select posts below to show them in the featured feed.
</div>
<tab-selector
[tabs]="adminPostTabs"
[activeTab]="activePostTab"
(tabClick)="_postTabClicked($event)"
></tab-selector>
<div
*ngIf="activePostTab == POSTS_BY_DESO_TAB"
class="w-100 px-15px py-5px fs-15px border-bottom border-color-grey d-flex"
style="justify-content: flex-start; align-items: center"
>
<div>
<mat-form-field appearance="fill" class="pb-0">
<mat-label
for="time-window"
class="pr-10px mb-0"
style="height: auto; vertical-align: middle"
>
Time Window:
</mat-label>
<mat-select
id="time-window"
style="height: auto; vertical-align: middle"
[(value)]="selectedTimeWindow"
>
<mat-option
*ngFor="let timeWindow of timeWindowOptions | keyvalue"
[value]="timeWindow.value"
>
{{ timeWindow.key }}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="p-15px">
<a
class="btn btn-primary"
style="vertical-align: middle; float: right; text-align: center"
(click)="_searchPostsByDESO()"
>
Search
</a>
</div>
</div>
<simple-center-loader
*ngIf="searchingForPostsByDESO; else showPosts"
></simple-center-loader>
<ng-template #showPosts>
<div *ngFor="let post of activePosts; let ii = index">
<div
*ngIf="post.ProfileEntryResponse"
class="border-bottom border-color-grey"
>
<!--
The post.parentPost stuff is a hack to make it so that a new comment shows up
in the feed with the "replying to @[parentPost.Username]" content diplayed.
post.parentPost is set in appendCommentAfterParentPost
-->
<feed-post
*ngIf="post.ProfileEntryResponse"
[includePaddingOnPost]="true"
[post]="post"
[showIconRow]="true"
[showAdminRow]="true"
[showReplyingToContent]="!!post.parentPost"
[parentPost]="post.parentPost"
[contentShouldLinkToThread]="false"
(addToGlobalFeed)="addToGlobalFeed(ii)"
></feed-post>
</div>
</div>
</ng-template>
<div
*ngIf="!loadingPosts && activePostTab == 'Posts'"
class="w-100 py-15px d-flex align-items-center justify-content-center cursor-pointer creator-leaderboard__load-more"
(click)="_loadPosts()"
>
<div *ngIf="!loadingMore" class="fs-15px">Load More</div>
<div *ngIf="loadingMore" class="fs-15px">Loading...</div>
</div>
</div>
<div
*ngIf="activeTab == 'Posts' && adminPosts.length == 0 && !loadingPosts"
class="d-flex flex-column align-items-center justify-content-center"
style="height: 400px"
>
<div class="fc-muted fs-15px">No posts found.</div>
</div>
<simple-center-loader
*ngIf="activeTab == 'Posts' && loadingPosts"
></simple-center-loader>
<!-- Hot Feed -->
<div
style="overflow-y: scroll"
class="disable-scrollbars"
*ngIf="activeTab == 'Hot Feed'"
>
<div
*ngIf="globalVars.showSuperAdminTools()"
class="w-100 d-flex justify-content-start py-10px pl-15px fs-15px fc-muted border-bottom border-color-grey light-grey-divider"
>
Update the hot feed algorithm by updating the values below.
</div>
<!-- Update HotFeed Interaction Cap (Super Admin Only) -->
<div class="fs-15px font-weight-bold mt-15px mb-5px px-15px">
Update Interaction Cap - Global Hot Feed (max $DESO locked)
<div
class="d-flex align-items-center justify-content-between font-weight-normal mt-5px"
>
<input
[(ngModel)]="hotFeedInteractionCap"
type="number"
min="0"
class="form-control fs-15px lh-15px w-100"
placeholder="Enter new hot feed interaction cap."
/>
<button
*ngIf="!updatingHotFeedInteractionCap"
(click)="updateHotFeedInteractionCap()"
class="btn btn-outline-primary fs-15px ml-5px"
style="width: fit-content"
>
Update
</button>
<button
*ngIf="updatingHotFeedInteractionCap"
class="btn btn-dark fs-15px ml-5px"
style="width: fit-content"
disabled
>
Updating...
</button>
</div>
</div>
<!-- Update HotFeed Interaction Cap For Tag Feed (Super Admin Only) -->
<div class="fs-15px font-weight-bold mt-15px mb-5px px-15px">
Update Interaction Cap - Tag Specific Feeds (max $DESO locked)
<div
class="d-flex align-items-center justify-content-between font-weight-normal mt-5px"
>
<input
[(ngModel)]="hotFeedTagInteractionCap"
type="number"
min="0"
class="form-control fs-15px lh-15px w-100"
placeholder="Enter new hot feed tag interaction cap."
/>
<button
*ngIf="!updatingHotFeedTagInteractionCap"
(click)="updateHotFeedTagInteractionCap()"
class="btn btn-outline-primary fs-15px ml-5px"
style="width: fit-content"
>
Update
</button>
<button
*ngIf="updatingHotFeedTagInteractionCap"
class="btn btn-dark fs-15px ml-5px"
style="width: fit-content"
disabled
>
Updating...
</button>
</div>
</div>
<!-- Update HotFeed Time Decay Blocks (Super Admin Only) -->
<div class="fs-15px font-weight-bold mt-15px mb-15px px-15px">
Update Time Decay Blocks For Global Feed
<div
class="d-flex align-items-center justify-content-between font-weight-normal mt-5px"
>
<input
[(ngModel)]="hotFeedTimeDecayBlocks"
type="number"
min="0"
class="form-control fs-15px lh-15px w-100"
placeholder="Enter new hot feed time decay blocks."
/>
<button
*ngIf="!updatingHotFeedTimeDecayBlocks"
(click)="updateHotFeedTimeDecayBlocks()"
class="btn btn-outline-primary fs-15px ml-5px"
style="width: fit-content"
>
Update
</button>
<button
*ngIf="updatingHotFeedTimeDecayBlocks"
class="btn btn-dark fs-15px ml-5px"
style="width: fit-content"
disabled
>
Updating...
</button>
</div>
</div>
<!-- Update HotFeed Time Decay Blocks for Tag feed (Super Admin Only) -->
<div class="fs-15px font-weight-bold mt-15px mb-15px px-15px">
Update Time Decay Blocks For Tag Feed
<div
class="d-flex align-items-center justify-content-between font-weight-normal mt-5px"
>
<input
[(ngModel)]="hotFeedTagTimeDecayBlocks"
type="number"
min="0"
class="form-control fs-15px lh-15px w-100"
placeholder="Enter new hot feed tag time decay blocks."
/>
<button
*ngIf="!updatingHotFeedTagTimeDecayBlocks"
(click)="updateHotFeedTagTimeDecayBlocks()"
class="btn btn-outline-primary fs-15px ml-5px"
style="width: fit-content"
>
Update
</button>
<button
*ngIf="updatingHotFeedTagTimeDecayBlocks"
class="btn btn-dark fs-15px ml-5px"
style="width: fit-content"
disabled
>
Updating...
</button>
</div>
</div>
<!-- Update HotFeed Transaction Type Multipliers (Super Admin Only) -->
<div class="fs-15px font-weight-bold mt-15px mb-15px px-15px">
Update Transaction Type Multipliers
<div
*ngFor="let txnTypeMultiplier of hotFeedTxnTypeMultiplierMap | keyvalue"
class="d-flex align-items-center font-weight-normal mt-5px"
>
<input
class="form-control fs-15px lh-15px col-4"
[placeholder]="txnTypeMultiplier.key"
/>
<input
[(ngModel)]="hotFeedTxnTypeMultiplierMap[txnTypeMultiplier.key]"
type="number"
class="form-control fs-15px lh-15px col-7 ml-5px"
placeholder="Multiplier Basis Points"
/>
</div>
<div
class="d-flex align-items-center justify-content-between font-weight-normal mt-5px mb-5px"
>
<input
[(ngModel)]="hotFeedTxnTypeMultiplierNewKey"
class="form-control fs-15px lh-15px col-4"
placeholder="Transaction Type"
/>
<input
[(ngModel)]="hotFeedTxnTypeMultiplierNewValue"
type="number"
class="form-control fs-15px lh-15px col-7 ml-5px"
placeholder="Multiplier Basis Points"
/>
<span
(click)="addMultiplierToTxnTypeMultiplier()"
class="fs-16px col-1 fc-blue cursor-pointer"
>
+
</span>
</div>
<button
*ngIf="!updatingHotFeedTxnTypeMultiplierMap"
(click)="updateHotFeedTxnTypeMultiplierMap()"
class="btn btn-outline-primary fs-15px"
style="width: fit-content"
>
Update
</button>
<button
*ngIf="updatingHotFeedTxnTypeMultiplierMap"
class="btn btn-dark fs-15px"
style="width: fit-content"
disabled
>
Updating...
</button>
</div>
<!-- Update HotFeed User Posts Multiplier (Super Admin Only) -->
<div class="fs-15px font-weight-bold mt-15px mb-15px px-15px">
Update User Posts Multiplier
<span class="font-weight-normal">(boost all of a user's posts)</span>
<div
class="d-flex align-items-center justify-content-between font-weight-normal mt-5px"
>
<input
[(ngModel)]="hotFeedUserForPostsMultiplier"
class="form-control fs-15px lh-15px w-100"
placeholder="Username"
/>
<input
[(ngModel)]="hotFeedUserPostsMultiplier"
type="number"
class="form-control fs-15px lh-15px w-100 ml-5px"
placeholder="Posts Multiplier"
/>
<button
*ngIf="!updatingHotFeedUserPostsMultiplier"
(click)="updateHotFeedUserPostsMultiplier()"
class="btn btn-outline-primary fs-15px ml-5px"
style="width: fit-content"
>
Update
</button>
<button
*ngIf="updatingHotFeedUserPostsMultiplier"
class="btn btn-dark fs-15px ml-5px"
style="width: fit-content"
disabled
>
Updating...
</button>
</div>
</div>
<!-- Update HotFeed User Interaction Multiplier (Super Admin Only) -->
<div class="fs-15px font-weight-bold mt-15px mb-15px px-15px">
Update User Interaction Multiplier
<span class="font-weight-normal"
>(boost all of a user's interactions)</span
>
<div
class="d-flex align-items-center justify-content-between font-weight-normal mt-5px"
>
<input
[(ngModel)]="hotFeedUserForInteractionMultiplier"
class="form-control fs-15px lh-15px w-100"
placeholder="Username"
/>
<input
[(ngModel)]="hotFeedUserInteractionMultiplier"
type="number"
class="form-control fs-15px lh-15px w-100 ml-5px"
placeholder="Interaction Multiplier"
/>
<button
*ngIf="!updatingHotFeedUserInteractionMultiplier"
(click)="updateHotFeedUserInteractionMultiplier()"
class="btn btn-outline-primary fs-15px ml-5px"
style="width: fit-content"
>
Update
</button>
<button
*ngIf="updatingHotFeedUserInteractionMultiplier"
class="btn btn-dark fs-15px ml-5px"
style="width: fit-content"
disabled
>
Updating...
</button>
</div>
</div>
<!-- Look Up HotFeed User Multipliers (Super Admin Only) -->
<div class="fs-15px font-weight-bold mt-15px mb-15px px-15px">
<i class="fa fa-search"></i> Look Up User Interaction Multipliers
<div
class="d-flex align-items-center justify-content-between font-weight-normal mt-5px"
>
<input
[(ngModel)]="hotFeedUserForSearch"
class="form-control fs-15px lh-15px w-100"
placeholder="Username"
/>
<button
*ngIf="!searchingHotFeedUserMultipliers"
(click)="searchForHotFeedUserMultipliers()"
class="btn btn-outline-primary fs-15px ml-5px"
style="width: fit-content"
>
Search
</button>
<button
*ngIf="searchingHotFeedUserMultipliers"
class="btn btn-dark fs-15px ml-5px"
style="width: fit-content"
disabled
>
Searching...
</button>
</div>
</div>
<div
*ngIf="hotFeedUserSearchResults"
class="px-15px pb-15px"
style="white-space: pre"
>
{{ hotFeedUserSearchResults }}
</div>
<div
class="w-100 d-flex justify-content-start py-10px pl-15px fs-15px fc-muted border-bottom border-color-grey light-grey-divider mb-5px"
>
Select posts below to whitelist.
</div>
<simple-center-loader
*ngIf="loadingHotFeed && hotFeedPosts.length == 0; else showHotFeed"
></simple-center-loader>
<ng-template #showHotFeed>
<div *ngFor="let post of hotFeedPosts; let ii = index">
<div
*ngIf="post.ProfileEntryResponse"
class="border-bottom border-color-grey"
>
<!--
The post.parentPost stuff is a hack to make it so that a new comment shows up
in the feed with the "replying to @[parentPost.Username]" content diplayed.
post.parentPost is set in appendCommentAfterParentPost
-->
<feed-post
*ngIf="post.ProfileEntryResponse"
[includePaddingOnPost]="true"
[post]="post"
[showIconRow]="true"
[showAdminRow]="true"
[showReplyingToContent]="!!post.parentPost"
[parentPost]="post.parentPost"
[contentShouldLinkToThread]="false"
(addToGlobalFeed)="addToGlobalFeed(ii)"
></feed-post>
</div>
</div>
</ng-template>
<div
*ngIf="hotFeedPosts.length > 0"
class="w-100 py-15px d-flex align-items-center justify-content-center cursor-pointer creator-leaderboard__load-more"
(click)="_loadHotFeed()"
>
<div *ngIf="!loadingMoreHotFeed" class="fs-15px">Load More</div>
<div *ngIf="loadingMoreHotFeed" class="fs-15px">Loading...</div>
</div>
</div>
<!-- Profile Blacklisting -->
<div *ngIf="activeTab == 'Profiles'" class="w-100 d-flex flex-column">
<div
class="w-100 d-flex justify-content-start py-10px pl-15px fs-15px fc-muted border-bottom border-color-grey light-grey-divider"
>
☠️ Use the controls below to remove profiles from the UI. Profiles that
are "Blacklisted" will be removed everywhere. Profiles that are
"Greylisted" will be selectively removed.
</div>
<!-- BLACKLIST -->
<div class="fs-15px font-weight-bold mt-15px mb-15px px-15px">
Remove profile everywhere:
<div class="d-flex">
<input
[(ngModel)]="blacklistPubKeyOrUsername"
(keydown.enter)="updateProfileModerationLevel('blacklist')"
class="form-control w-100 fs-15px lh-15px"
placeholder="Enter a username or public key."
/>
<button
*ngIf="!submittingBlacklistUpdate"
(click)="updateProfileModerationLevel('blacklist')"
class="btn btn-dark fs-15px ml-5px"
style="width: 150px"
>
Blacklist
</button>
<button
*ngIf="submittingBlacklistUpdate"
class="btn btn-dark fs-15px ml-5px"
disabled
>
Working...
</button>
</div>
<div
*ngIf="updateProfileSuccessType === 'blacklist'"
class="font-weight-normal fs-12px"
style="color: green"
>
<i class="far fa-check-circle"></i>
Successfully added user to blacklist.
</div>
</div>
<!-- USERNAME BLACKLIST -->
<div class="fs-15px font-weight-bold mt-15px mb-15px px-15px">
Remove username everywhere:
<div class="d-flex">
<input
[(ngModel)]="blacklistUsername"
(keydown.enter)="updateUsernameBlacklist(true, true)"
class="form-control w-100 fs-15px lh-15px"
placeholder="Enter a username."
/>
<button
*ngIf="!submittingUsernameBlacklistUpdate"
(click)="updateUsernameBlacklist(true, true)"
class="btn btn-dark fs-15px ml-5px"
style="width: 150px"
>
Blacklist
</button>
<button
*ngIf="submittingUsernameBlacklistUpdate"
class="btn btn-dark fs-15px ml-5px"
disabled
>
Working...
</button>
</div>
</div>
<!-- GRAYLIST -->
<div class="fs-15px font-weight-bold mt-15px mb-15px px-15px">
Remove profile from leaderboards:
<div class="d-flex">
<input
[(ngModel)]="graylistPubKeyOrUsername"
(keydown.enter)="updateProfileModerationLevel('graylist')"
class="form-control w-100 fs-15px lh-15px"
placeholder="Enter a username or public key."
/>
<button
*ngIf="!submittingGraylistUpdate"
(click)="updateProfileModerationLevel('graylist')"
class="btn btn-secondary fs-15px ml-5px"
style="width: 150px; background-color: #606060 !important"
>
Graylist
</button>
<button
*ngIf="submittingGraylistUpdate"
class="btn btn-secondary fs-15px ml-5px"
style="background-color: #606060 !important"
disabled
>
Working...
</button>
</div>
<div
*ngIf="updateProfileSuccessType === 'graylist'"
class="font-weight-normal fs-12px"
style="color: green"
>
<i class="far fa-check-circle"></i>
Successfully added user to graylist.
</div>
</div>
<!-- USERNAME GRAYLIST -->
<div class="fs-15px font-weight-bold mt-15px mb-15px px-15px">
Remove username from leaderboards:
<div class="d-flex">
<input
[(ngModel)]="graylistUsername"
(keydown.enter)="updateUsernameBlacklist(true, true)"
class="form-control w-100 fs-15px lh-15px"
placeholder="Enter a username."
/>
<button
*ngIf="!submittingUsernameGraylistUpdate"
(click)="updateUsernameBlacklist(true, true)"
class="btn btn-secondary fs-15px ml-5px"
style="width: 150px; background-color: #606060 !important"
>
Graylist
</button>
<button
*ngIf="submittingUsernameGraylistUpdate"
class="btn btn-secondary fs-15px ml-5px"
style="background-color: #606060 !important"
disabled
>
Working...
</button>
</div>
</div>
<!-- REMOVE FROM BLACKLISTS -->
<div
class="fs-15px font-weight-bold mt-15px px-15px pb-30px"
>
Remove profile from blacklist and graylist:
<div class="d-flex">
<input
[(ngModel)]="unrestrictPubKeyOrUsername"
(keydown.enter)="updateProfileModerationLevel('unrestrict')"
class="form-control w-100 fs-15px lh-15px"
placeholder="Enter a username or public key."
/>
<button
*ngIf="!submittingUnrestrictUpdate"
(click)="updateProfileModerationLevel('unrestrict')"
class="btn btn-danger fs-15px ml-5px border border-color-grey"
style="width: 150px"
>
Unrestrict
</button>
<button
*ngIf="submittingUnrestrictUpdate"
class="btn btn-danger fs-15px ml-5px border border-color-grey"
disabled
>
Working...
</button>
</div>
<div
*ngIf="updateProfileSuccessType === 'restrict'"
class="font-weight-normal fs-12px"
style="color: green"
>
<i class="far fa-check-circle"></i>
Successfully removed user from blacklist and graylist.
</div>
</div>
<!-- REMOVE USERNAME FROM BLACKLISTS -->
<div
class="fs-15px font-weight-bold mt-15px px-15px pb-30px border-bottom border-color-grey"
>
Remove username from blacklist and graylist:
<div class="d-flex">
<input
[(ngModel)]="unrestrictUsername"
(keydown.enter)="updateUsernameBlacklist(true, false)"
class="form-control w-100 fs-15px lh-15px"
placeholder="Enter a username."
/>
<button
*ngIf="!submittingUnrestrictUsernameUpdate"
(click)="updateUsernameBlacklist(true, false)"
class="btn btn-danger fs-15px ml-5px border border-color-grey"
style="width: 150px"
>
Unrestrict
</button>
<button
*ngIf="submittingUnrestrictUsernameUpdate"
class="btn btn-danger fs-15px ml-5px border border-color-grey"
disabled
>
Working...
</button>
</div>
</div>
<div
class="w-100 d-flex justify-content-start py-10px pl-15px fs-15px fc-muted border-bottom border-color-grey light-grey-divider"
>
⭐ Use the controls below to Whitelist profiles. Profiles that are
Whitelisted will automatically have up to five of their posts added to the
global feed per day.
</div>
<!-- WHITELIST -->
<div class="fs-15px font-weight-bold mt-15px mb-15px px-15px">
Whitelist user:
<div class="d-flex">
<input
[(ngModel)]="whitelistPubKeyOrUsername"
(keydown.enter)="whitelistClicked()"
class="form-control w-100 fs-15px lh-15px"
placeholder="Enter a username or public key."
/>
<button
*ngIf="!submittingWhitelistUpdate"
(click)="whitelistClicked()"
class="btn-default btn-light fs-15px ml-5px border border-color-grey"
style="width: 150px"
>
Whitelist
</button>
<button
*ngIf="submittingWhitelistUpdate"
class="btn-default btn-light fs-15px ml-5px border border-color-grey"
disabled
>
Working...
</button>
</div>
<div
*ngIf="whitelistUpdateSuccess"
class="font-weight-normal fs-12px"
style="color: green"
>
<i class="far fa-check-circle"></i>
Successfully added user to whitelist.
</div>
</div>
<!-- REMOVE FROM WHITELIST -->
<div
class="fs-15px font-weight-bold mt-15px px-15px pb-30px border-bottom border-color-grey"
>
Remove user from whitelist:
<div class="d-flex">
<input
[(ngModel)]="unwhitelistPubKeyOrUsername"
(keydown.enter)="unwhitelistClicked()"
class="form-control w-100 fs-15px lh-15px"
placeholder="Enter a username or public key."
/>
<button
*ngIf="!submittingUnwhitelistUpdate"
(click)="unwhitelistClicked()"
class="btn-default btn-light fs-15px ml-5px border border-color-grey"
style="width: 150px"
>
<i class="far fa-times-circle"></i>
Remove
</button>
<button
*ngIf="submittingUnwhitelistUpdate"
class="btn-default btn-light fs-15px ml-5px border border-color-grey"
disabled
>
Working...
</button>
</div>
<div
*ngIf="unwhitelistUpdateSuccess"
class="font-weight-normal fs-12px"
style="color: green"
>
<i class="far fa-check-circle"></i>
Successfully removed user from whitelist.
</div>
</div>
<div
class="w-100 d-flex justify-content-start py-10px pl-15px fs-15px fc-muted border-bottom border-color-grey light-grey-divider"
>
📞 Enter a username or public key below to wipe their phone registration.
</div>
<!-- Allow phone number re-registration -->
<div
class="fs-15px font-weight-bold mt-15px pb-30px px-15px border-bottom border-color-grey"
>
Allow phone number re-registration:
<div class="d-flex pt-10px">
<div>By Public Key or Username:</div>
<input
[(ngModel)]="removePhonePubKeyorUsername"
(keydown.enter)="(submitRemovePhoneNumber)"
class="form-control w-100 fs-15px lh-15px"
placeholder="Enter a username or public key."
/>
<button
*ngIf="!submittingRemovePhone"
(click)="submitRemovePhoneNumber()"
class="btn-default btn-light fs-15px ml-5px border border-color-grey"
>
Allow
</button>
<button
*ngIf="submittingRemovePhone"
class="btn-default btn-light fs-15px ml-5px border border-color-grey"
disabled
>
Working...
</button>
</div>
<div class="d-flex pt-10px">
<div>By Phone Number:</div>
<input
[(ngModel)]="removePhoneNum"
(keydown.enter)="(submitRemovePhoneByNumber)"
class="form-control w-100 fs-15px lh-15px"
placeholder="Enter a Phone Number."
/>
<button
*ngIf="!submittingRemovePhoneByNumber"
(click)="submitRemovePhoneByNumber()"
class="btn-default btn-light fs-15px ml-5px border border-color-grey"
>
Allow
</button>
<button
*ngIf="submittingRemovePhoneByNumber"
class="btn-default btn-light fs-15px ml-5px border border-color-grey"
disabled
>
Working...
</button>
</div>
<div
*ngIf="updateProfileSuccessType === 'phone'"
class="font-weight-normal fs-12px"
style="color: green"
>
<i class="far fa-check-circle"></i>
Success.
</div>
</div>
<div
class="w-100 d-flex justify-content-start py-10px pl-15px fs-15px fc-muted border-bottom border-color-grey light-grey-divider"
>
🖥️ Dump blacklist / whitelist data.
</div>
<!-- PUBLIC KEYS IN THE DB -->
<div
(click)="_toggleDbDetails()"
class="fs-15px px-15px py-15px cursor-pointer"
>
<i *ngIf="!dbDetailsOpen" class="fas fa-caret-right"></i>
<i *ngIf="dbDetailsOpen" class="fas fa-caret-down"></i>
<span class="ml-15px">
<span *ngIf="!dbDetailsLoading">See what's in global state</span>
<span *ngIf="dbDetailsLoading">Loading...</span>
</span>
<div *ngIf="dbDetailsOpen && !dbDetailsLoading">
<div class="mt-15px mb-15px">
--- Returned
<span class="fc-blue">{{ userMetadataMapLength }}</span>
UserMetadata entries ---
</div>
<div *ngFor="let item of userMetadataMap | keyvalue: descOrder">
<ul class="mb-5px">
<li>
<span
*ngIf="usernameMap[item.key]"
class="font-weight-bold fc-blue"
>{{ usernameMap[item.key] }}:</span
>
{{ item.key.slice(0, 15) }}...
<ul>
<li>
RemoveEverywhere:
<span class="fc-blue">{{ item.value.RemoveEverywhere }}</span>
</li>
<li>
RemoveFromLeaderboard:
<span class="fc-blue">{{
item.value.RemoveFromLeaderboard
}}</span>
</li>
<li>
WhitelistPosts:
<span class="fc-blue">{{ item.value.WhitelistPosts }}</span>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div
class="w-100 d-flex justify-content-start py-10px pl-15px fs-15px fc-muted border-bottom border-color-grey light-grey-divider"
>
🚀 Get User Admin Data.
</div>
<!-- Get User Admin Data -->
<div class="fs-15px font-weight-bold mt-15px mb-15px px-15px">
Check Admin Data for Public Key:
<div class="d-flex">
<input
[(ngModel)]="getUserAdminDataPublicKey"
(keydown.enter)="getUserAdminDataClicked()"
class="form-control w-100 fs-15px lh-15px"
placeholder="Enter a public key."
/>
<button
*ngIf="!submittingGetUserAdminData"
(click)="getUserAdminDataClicked()"
class="btn-default btn-light fs-15px ml-5px border border-color-grey"
style="width: 150px"
>
Search
</button>
<button
*ngIf="submittingGetUserAdminData"
class="btn-default btn-light fs-15px ml-5px border border-color-grey"
disabled
>
Working...
</button>
</div>
<div *ngIf="getUserAdminDataResponse" class="font-weight-normal fs-12px">
<div class="admin__get-user-admin-data-line pt-15px">
<span>Username:</span>
{{ getUserAdminDataResponse.Username }}
</div>
<div class="admin__get-user-admin-data-line pt-5px">
<span>Currently Verified:</span>
{{ getUserAdminDataResponse.IsVerified }}
</div>
<div class="admin__get-user-admin-data-line pt-5px">
<span>Last Verifier:</span>
{{ getUserAdminDataResponse.LastVerifierPublicKey }}
</div>
<div class="admin__get-user-admin-data-line pt-5px">
<span>Last Verify Remover:</span>
{{ getUserAdminDataResponse.LastVerifyRemoverPublicKey }}
</div>
<div class="admin__get-user-admin-data-line pt-15px">
<span>Currently Whitelisted:</span>
{{ getUserAdminDataResponse.IsWhitelisted }}
</div>
<div class="admin__get-user-admin-data-line pt-5px">
<span>Last Whitelister:</span>
{{ getUserAdminDataResponse.LastWhitelisterPublicKey }}
</div>
<div class="admin__get-user-admin-data-line pt-5px">
<span>Last Whitelist Remover:</span>
{{ getUserAdminDataResponse.LastWhitelistRemoverPublicKey }}
</div>
<div class="admin__get-user-admin-data-line pt-15px">
<span>Currently Graylisted:</span>
{{ getUserAdminDataResponse.IsGraylisted }}
</div>
<div class="admin__get-user-admin-data-line pt-5px">
<span>Last Graylister:</span>
{{ getUserAdminDataResponse.LastGraylisterPublicKey }}
</div>
<div class="admin__get-user-admin-data-line pt-5px">
<span>Last Graylist Remover:</span>
{{ getUserAdminDataResponse.LastGraylistRemoverPublicKey }}
</div>
<div class="admin__get-user-admin-data-line pt-15px">
<span>Currently Blacklisted:</span>
{{ getUserAdminDataResponse.IsBlacklisted }}
</div>
<div class="admin__get-user-admin-data-line pt-5px">
<span>Last Blacklister:</span>
{{ getUserAdminDataResponse.LastBlacklisterPublicKey }}
</div>
<div class="admin__get-user-admin-data-line pt-5px">
<span>Last Blacklist Remover:</span>
{{ getUserAdminDataResponse.LastBlacklistRemoverPublicKey }}
</div>
<div class="admin__get-user-admin-data-line pt-15px">
<span>PhoneNumber:</span>
{{ getUserAdminDataResponse.PhoneNumber }}
</div>
<div class="admin__get-user-admin-data-line pt-5px">
<span>Email:</span>
{{ getUserAdminDataResponse.Email }}
</div>