Skip to content

Commit

Permalink
Pull in latest changes (#15)
Browse files Browse the repository at this point in the history
* add notification transformation for NFT Transfers, fix console error when there are no fees in TransactionFeeMap (deso-protocol#526)

* Fix calculation of ETH exchange rate including fee (deso-protocol#530)

* add supply-stats route to show total supply and rich list (deso-protocol#531)

* Fix preview and home screen icons for DeSo (deso-protocol#532)

* Add support for managing sign-up bonus configurations (deso-protocol#529)

* save current progress on updating admin panel

* add support for modifying the sign up bonus config for a single country, update to use default jumio USD cents instead of DeSo nanos

* refresh country bonuses after updating default jumio USD cents

* add tooltip disclaimer about free DESO amount

* update copy

* simplify loops in GetMessages that handles encryption/decryption (deso-protocol#533)

* simplify loops in GetMessages that handles encryption/decryption

* message -> Message

* Fix admin jumio checkboxes (deso-protocol#534)

* use country sign up bonus config inferred from IP address when computing referral amount to display for sign up bonus (deso-protocol#535)

* use flatMap to flatten array of message before decryption (deso-protocol#536)

* Upload referral csv directly instead of parsing on the frontend (deso-protocol#537)

* top diamonded list fix (deso-protocol#480)

* use altumbase for daily gainers leaderboard (deso-protocol#538)

* use altumbase for daily gainers leaderboard

* fix import styling

* [stable] Release 1.2.9

* add disclaimer on referrals page about amounts varying by locality of ID AND add support for setting default kickback amount (deso-protocol#539)

* add disclaimer on referrals page about amounts varying by locality of ID

* add support for updating the default kickback amount for referrers

* add referral code, jumio starter DESO txn Hash, and referrer DeSo Txn hash to User Admin Data (deso-protocol#540)

* make referral link relative to window origin (deso-protocol#541)

* Ln/count keys with deso (deso-protocol#542)

* save current progress

* update some styling on the supply monitoring page

* update supply stats page to show count of keys holding DESO

* Update src/app/supply-monitoring-stats-page/supply-monitoring-stats/supply-monitoring-stats.component.html

* fix admin panel jumio kickback usd cents (deso-protocol#544)

* add support for NFT transfers, burns, and acceptance of transfers (deso-protocol#545)

* add support for NFT transfers, burns, and acceptance of transfers

* fix styling

* change font color to gray for pending ownership

* add fas class to fix issue with icons not appearing in select serial number component (deso-protocol#547)

* Buy Now NFTs and NFT Splits (deso-protocol#546)

* [stable] Release 2.0.0 (deso-protocol#550)

* [stable] Release 2.0.1

* nft notification enhancements (deso-protocol#551)

* save current progress on notifications

* Update NFT notifications and fix some small bugs

* make global vars private again

* remove console logging

* Ln/update sell nft modal (deso-protocol#554)

* show additional royalties in sell nft modal

* remove service fee which is no longer user

* Messages V3 (deso-protocol#543)

* Messages V3

* V3 support

* Messages V3 final

* Add comments & fix version

* Fix circular dependancies

* Revert "Messages V3 (deso-protocol#543)" (deso-protocol#555)

This reverts commit 9d98ea7.

* if get user metadata throws an error, swallow it and return null (deso-protocol#556)

* [stable] Release 2.0.2

* Ln/dao coins (deso-protocol#548)

* save current progress on DAO coin UI

* add support for transferring DAO coins in the UI, add inputs for other fields for DAO coin transaction

* add burn support, add DAO coin tab to profile, use number abbreviation to keep DAO coin numbers manageable, move utility func for parsing hex balances to global vars

* add some frontend validation in transfer modal

* fix up DAO modals - add balances and validations, hit isHodling endpoint if transfer restriction status is DAO Members only

* fix alignment on DAO coin page

* disable mint and burn if the amount is less than or equal to 0

* add notifications for DAO coin txns

* add sweet alerts before DAO actions, only show profile owner if transfer restriction status is profile owner only and logged in user is not profile owner

* address TGS feedback

* Fix errors when user does not have DAO coin yet

* Messages v3 (deso-protocol#557)

* Messages V3

* V3 support

* Messages V3 final

* Add comments & fix version

* Fix circular dependancies

* Add senderGroupKeyName to TransferNFT

* update Query ETH RPC to remove JWT requirement (deso-protocol#558)

* Add support for Pearl node (deso-protocol#561)

* Posts/Users pages are blank when user not logged in (deso-protocol#560)

* fix: metadata fails when user not logged in

this additional checks makes sure verification / node.deso.org metadata is only requested if loggedInUserPublicKey is ok. Currently it requests metadata from `https://node.deso.org/api/v0/get-user-metadata/undefined` which returns status 404 error and prevents post/user pages from showing the content.

* align with diamondapp

use same approach as DiamondApp

* [stable] Release 2.0.4 (deso-protocol#562)

* display media content in replies (deso-protocol#564)

* allow media when creating comments (deso-protocol#565)

* Add support for twitter images.. (deso-protocol#568)

* Add support for twitter images..

this will show images hosted on twitter (they have link like pbs.twing.com ex: https://pbs.twimg.com/media/FO9LbSjaQAEFE26.jpg)

before 
![image](https://user-images.githubusercontent.com/55331140/160470352-bde7f317-fcc7-4680-9180-f9487a7892bc.png)

after
![image](https://user-images.githubusercontent.com/55331140/160470432-5168c8a3-ad78-44e9-a147-3afc1fd11803.png)

will be helpful for those projects which are building bridge between twitter and deso.

* Update Caddyfile

Co-authored-by: Lazy Nina <81658138+lazynina@users.noreply.github.com>

* added Mousai embedding support to frontend (deso-protocol#563)

* Added support for embedding Mousai streaming link in frontend

* Fixed prettier/prettier issue

* Added tests for Mousai embedding functionality

* improved regex matching for mousai links

* added the mousai's url in Caddyfile

* Removed the test-cases that prevent tests from running properly

Co-authored-by: Lazy Nina <81658138+lazynina@users.noreply.github.com>

* Replaced `jasmin.arrayContaining` call with a more logically sounding alternative (based on the available variables)

Co-authored-by: Lazy Nina <81658138+lazynina@users.noreply.github.com>

* Updated `regex` based on the suggestion provided by @lazynina

Co-authored-by: Lazy Nina <81658138+lazynina@users.noreply.github.com>

* Updated `regex` based on the suggestion provided by @lazynina

Co-authored-by: Lazy Nina <81658138+lazynina@users.noreply.github.com>

* Added proper height to Mousai link

* Update src/lib/services/embed-url-parser-service/embed-url-parser-service.ts

Co-authored-by: Lazy Nina <81658138+lazynina@users.noreply.github.com>

* Update src/lib/services/embed-url-parser-service/embed-url-parser-service.ts

Co-authored-by: Lazy Nina <81658138+lazynina@users.noreply.github.com>

Co-authored-by: Lazy Nina <81658138+lazynina@users.noreply.github.com>

* [stable] Release 2.1.0 (deso-protocol#569)

* update reporting links (deso-protocol#571)

* update reporting links

* add /content to path

* Remove jumio messaging and referrals (deso-protocol#573)

* [stable] Release 2.2.0

* [stable] Release 2.2.1

Bumping release to fix a CI issue

* Add support for resetting by phone number for super admins (deso-protocol#570)

* Adjust DAO Coin base units to be 10^18 (deso-protocol#574)

* Adjust DAO Coin base units to be 10^18

* Fix dao coin base units

* Add panel to allow configuration of hot feed (deso-protocol#576)

* Fix Max send bug (deso-protocol#577)

* Added # (number sign) support for parsing Mousai links (deso-protocol#578)

* Fix mousai embed to escape # character in URL (deso-protocol#579)

* Updates to feeds (deso-protocol#583)

* Add hot feed post multiplier for individual posts (deso-protocol#584)

* Support for piñata IPFS gateways (deso-protocol#580)

* Formatting + remove free deso (deso-protocol#585)

* Formatting + remove free deso

* Removed additional free deso text

* remove duplicate fns

Co-authored-by: Lazy Nina <81658138+lazynina@users.noreply.github.com>
Co-authored-by: NikolaiL <nikolai1973@gmail.com>
Co-authored-by: maebeam <maebeam0@gmail.com>
Co-authored-by: diamondhands0 <81935176+diamondhands0@users.noreply.github.com>
Co-authored-by: diamondhands <diamondhands@bitcloutdev.com>
Co-authored-by: Piotr Nojszewski <29924594+AeonSw4n@users.noreply.github.com>
Co-authored-by: Tijno (@tijn on Deso) <69529928+tijno@users.noreply.github.com>
Co-authored-by: ItsAditya.eth <55331140+AdityaChaudhary0005@users.noreply.github.com>
Co-authored-by: Farsad Fakhim <fakhim.farsad@gmail.com>
Co-authored-by: triplegreenshell <94129308+triplegreenshell@users.noreply.github.com>
Co-authored-by: Martijn van Halen <martijn.vanhalen@gmail.com>
Co-authored-by: TylerFischer@Deso <98359380+DeSoDog@users.noreply.github.com>
  • Loading branch information
13 people authored Jul 28, 2022
1 parent 2f4b486 commit 012a5ce
Show file tree
Hide file tree
Showing 17 changed files with 1,048 additions and 82 deletions.
3 changes: 2 additions & 1 deletion Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ header @html Content-Security-Policy "
*.arweave.net
*.pearl.app
*.twimg.com
cloudflare-ipfs.com;
cloudflare-ipfs.com
*.mypinata.cloud;
font-src 'self'
https://fonts.googleapis.com
https://fonts.gstatic.com
Expand Down
330 changes: 329 additions & 1 deletion src/app/admin/admin.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,310 @@

<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>&nbsp;
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
Expand Down Expand Up @@ -289,7 +593,8 @@
<!-- 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">
<div class="d-flex pt-10px">
<div>By Public Key or Username: </div>
<input
[(ngModel)]="removePhonePubKeyorUsername"
(keydown.enter)="(submitRemovePhoneNumber)"
Expand All @@ -311,6 +616,29 @@
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.
Expand Down
Loading

0 comments on commit 012a5ce

Please sign in to comment.