Conversation
src/app/backend-api.service.ts
Outdated
| static RoutePathGetNFTsForUser = "/api/v0/get-nfts-for-user"; | ||
| static RoutePathGetNFTBidsForUser = "/api/v0/get-nft-bids-for-user"; | ||
| static RoutePathGetNFTShowcase = "/api/v0/get-nft-showcase"; | ||
| static RoutePathGetNFTShowcasePreview = "/api/v0/admin/get-nft-showcase-preview"; |
There was a problem hiding this comment.
move this to live with the rest of the admin routes below.
src/app/creator-profile-page/creator-profile-top-card/creator-profile-top-card.component.html
Show resolved
Hide resolved
| this.activeTab = tab; | ||
| this.router.navigate([], { | ||
| relativeTo: this.route, | ||
| queryParams: { feedTab: this.activeTab }, |
There was a problem hiding this comment.
let's not call the query param feedTab. I think we call it feedTab in the feed component and this could cause some issues when merging queryParams.
| showShowcaseManagementTab() { | ||
| return ( | ||
| this.activeTab === NftDropMgrComponent.SHOWCASE_MANAGEMENT && | ||
| this.posts.length > 0 && | ||
| (!this.loading || this.loadingNewDrop) | ||
| ); | ||
| } | ||
|
|
||
| showShowcasePreviewTab() { | ||
| return ( | ||
| this.activeTab === NftDropMgrComponent.SHOWCASE_PREVIEW_TAB && | ||
| this.posts.length > 0 && | ||
| (!this.loading || this.loadingNewDrop) | ||
| ); | ||
| } |
There was a problem hiding this comment.
we should avoid using these functions to determine what should be shown. Instead, we should have a container div that is conditionally shown *ngIf="posts.length && (!loading || loadingNewDrop)", inside of which we show the showcase management *ngIf="activeTab === NftDropMgrComponent.SHOWCASE_MANAGEMENT" and show the preview *ngIf="activeTab === NftDropMgrComponent.SHOWCASE_PREVIEW_TAB"
| @@ -1,14 +1,17 @@ | |||
| import { Component, OnInit } from "@angular/core"; | |||
| import {Component, Input, OnInit} from "@angular/core"; | |||
There was a problem hiding this comment.
| import {Component, Input, OnInit} from "@angular/core"; | |
| import { Component, Input, OnInit } from "@angular/core"; |
| showcaseComingSoon() { | ||
| return !this.loading && (!this.nftCollections || !has(this.nftCollections, length)); | ||
| } | ||
|
|
There was a problem hiding this comment.
we should be able to kill this function and just use the constants to define the conditional
| import { GlobalVarsService } from "../global-vars.service"; | ||
| import { InfiniteScroller } from "../infinite-scroller"; | ||
| import { IAdapter, IDatasource } from "ngx-ui-scroll"; | ||
| import { has } from "lodash"; |
There was a problem hiding this comment.
| import { has } from "lodash"; |
| console.log('Here is the showcase idx'); | ||
| console.log(this.showcaseIdx); | ||
| console.log(this.showcaseIdx === undefined); |
There was a problem hiding this comment.
| console.log('Here is the showcase idx'); | |
| console.log(this.showcaseIdx); | |
| console.log(this.showcaseIdx === undefined); |
| <!--Admin panel--> | ||
| <div *ngIf="showShowcaseManagementTab()" class="p-15px fs-15px"> | ||
| <b *ngIf="!loadingNewDrop">NFTs in this drop:</b> | ||
| <div #uiScroll *uiScroll="let post of datasource" [ngClass]="{'d-flex align-items-center mt-15px border border-color-grey br-8px': !loadingNewDrop}"> |
There was a problem hiding this comment.
this uiScroll directive needs to be moved into a separate component. If you switch back and forth between the tabs, you're going to lose the Showcase Management view. You'll see an error that looks like the below:
ERROR TypeError: Cannot read property 'dispose' of undefined
at UiScrollComponent.ngOnDestroy (ngx-ui-scroll.js:57)
at executeOnDestroys (core.js:7405)
at cleanUpView (core.js:7318)
at destroyViewTree (core.js:7144)
at destroyLView (core.js:7296)
at ViewContainerRef.remove (core.js:23208)
at ViewContainerRef.clear (core.js:23116)
at NgIf._updateView (common.js:3535)
at NgIf.set ngIf [as ngIf] (common.js:3502)
at setInputsForProperty (core.js:10961)
|
some weird behavior when switching between drops still. let's revisit this later. |
Shouldn't be deployed until deso-protocol/backend#98 is deployed