Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

743 harvest transaction hash redirection #748

Merged
merged 3 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,18 @@
onerror="this.src='/assets/Images/campagne/twitter_cover.svg'"
class="cmp-img2"
/>
<ng-container *ngIf="prom.typeSN === 3 && prom.mediaUrl.includes('mp4')">
<ng-container *ngIf="prom.typeSN === 3 && prom.mediaUrl.includes('mp4')">
<video [src]="prom.mediaUrl" autoplay loop [muted]="true"></video>
</ng-container>

<ng-container *ngIf="prom.typeSN === 3 && !prom.mediaUrl.includes('mp4')">
<ng-container *ngIf="prom.typeSN === 3 && !prom.mediaUrl.includes('mp4')">
<img
[src]="prom.mediaUrl"
onerror="this.src='/assets/Images/campagne/instagramm.svg'"
class="cmp-img2"
/>
[src]="prom.mediaUrl"
onerror="this.src='/assets/Images/campagne/instagramm.svg'"
class="cmp-img2"
/>
</ng-container>



<img
*ngIf="prom.typeSN === 5"
[src]="prom.mediaUrl"
Expand All @@ -73,14 +72,25 @@

<img
*ngIf="prom.typeSN === 7"
[src]="prom.mediaUrl.toString().startsWith('https') ? prom.mediaUrl: safeImageUrl(prom.mediaUrl)"
[src]="
prom.mediaUrl.toString().startsWith('https')
? prom.mediaUrl
: safeImageUrl(prom.mediaUrl)
"
onerror="this.src='/assets/Images/tiktoksign.svg'"
class="cmp-img2"
/>

<!-- <img *ngIf="prom.typeSN == 1" src="/assets/Images/campagne/facebook_cover_gain.svg" class="cmp-img2"> -->
<!-- <img *ngIf="prom.typeSN == 4" src="/assets/Images/campagne/twitter_cover.svg" class="cmp-img2" [routerLink]="['/home/campaign/', prom.campaign._id]" /> -->
<a [href]="prom.typeSN == 7 ? 'https://www.threads.net/@skymage.skandert/CuhaaNvIJrh' : prom.link" target="_blank" class="icon_link hide-row-version"
<a
[href]="
prom.typeSN === 7
? 'https://www.threads.net/@skymage.skandert/CuhaaNvIJrh'
: prom.link
"
target="_blank"
class="icon_link hide-row-version"
><img src="/assets/Images/campagne/gains-link.svg"
/></a>
<img
Expand Down Expand Up @@ -151,34 +161,32 @@
</div>
<div class="div-date">
<h2
class="under_gains date"
*ngIf="localId === 'en' && prom.applyDate"
class="under_gains date"
*ngIf="localId === 'en' && prom.applyDate"
>
<!-- h:mm:ss a -->
<span>
<img src="assets/Images/calender.svg" width="16px" />
{{ prom.applyDate | date: 'MM/dd/yyyy':undefined:localId || '' }}
</span>
<!-- <span class="span-hours">
<!-- h:mm:ss a -->
<span>
<img src="assets/Images/calender.svg" width="16px" />
{{ prom.applyDate | date: 'MM/dd/yyyy':undefined:localId || '' }}
</span>
<!-- <span class="span-hours">
<img src="assets/Images/clock-link.svg" width="16px" />
{{ prom.applyDate | date: 'h:mm ':undefined:localId || '' }}
</span> -->
</h2>
<h2
class="under_gains date"
*ngIf="localId === 'fr' && prom.applyDate"
class="under_gains date"
*ngIf="localId === 'fr' && prom.applyDate"
>
<span>
<img src="assets/Images/calender.svg" width="16px" />
{{ prom.applyDate | date: 'dd/MM/yyyy ':undefined:localId || '' }}
</span>
<!-- <span class="span-hours">
<span>
<img src="assets/Images/calender.svg" width="16px" />
{{ prom.applyDate | date: 'dd/MM/yyyy ':undefined:localId || '' }}
</span>
<!-- <span class="span-hours">
<img src="assets/Images/clock-link.svg" width="16px" />
{{ prom.applyDate | date: 'h:mm ':undefined:localId || '' }}
</span>-->
</h2>


</div>
</div>

Expand Down Expand Up @@ -610,10 +618,14 @@
class="buttom_camp3"
(click)="getMyGains(prom)"
[disabled]="!harvestAvailable"
*ngIf="prom.type === 'harvest' && !isOwner && prom.campaign.remuneration !== 'publication'"
*ngIf="
prom.type === 'harvest' &&
!isOwner &&
prom.campaign.remuneration !== 'publication'
"
[ngClass]="{ graybtn: !harvestAvailable }"
>
<span class="btn-participe-gain" *ngIf="harvestAvailable === true">
<span class="btn-participe-gain" *ngIf="harvestAvailable === true">
<img
class="hourglass mb-3"
src="/assets/Images/newImages/recover-hand.svg"
Expand All @@ -633,14 +645,17 @@
}}.svg"
/>
</span>
<span
<span
class="btn-apply-text text-orange"
*ngIf="harvestAvailable === false "
*ngIf="harvestAvailable === false"
>
<img class="" src="/assets/Images/campagne/hourglass.svg" style="margin-top:-4px;" />
<img
class=""
src="/assets/Images/campagne/hourglass.svg"
style="margin-top: -4px"
/>
<span> {{ 'wait_harvest' | translate }}</span>



<span> {{ harvestAvailableIn }} </span>
</span>
</button>
Expand All @@ -651,11 +666,17 @@
class="buttom_camp3"
(click)="getMyGains(prom)"
[disabled]="prom.campaign.type !== 'finished' || !harvestAvailable"
*ngIf="prom.type === 'harvest' && !isOwner && prom.campaign.remuneration === 'publication'"
[ngClass]="{ graybtn: prom.campaign.type === 'apply' || !harvestAvailable }"
*ngIf="
prom.type === 'harvest' &&
!isOwner &&
prom.campaign.remuneration === 'publication'
"
[ngClass]="{
graybtn: prom.campaign.type === 'apply' || !harvestAvailable
}"
>
<span class="btn-participe-gain" *ngIf=" harvestAvailable">
<img
<span class="btn-participe-gain" *ngIf="harvestAvailable">
<img
class="hourglass mb-3"
src="/assets/Images/newImages/recover-hand.svg"
/>
Expand All @@ -674,19 +695,21 @@
}}.svg"
/>
</span>
<span
<span
class="btn-apply-text text-orange"
*ngIf="harvestAvailable === false "
*ngIf="harvestAvailable === false"
>
<img class="" src="/assets/Images/campagne/hourglass.svg" style="margin-top:-4px;" />
<img
class=""
src="/assets/Images/campagne/hourglass.svg"
style="margin-top: -4px"
/>
<span> {{ 'wait_harvest' | translate }}</span>


<span> {{ harvestAvailableIn}} </span>

<span> {{ harvestAvailableIn }} </span>
</span>
</button>


<!-- link indisponible-->
<button
type="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export class CopyTransactionHashComponent {
this.networkWallet = bttscan + this.transactionHash;
} else if (this.tokenStorageService.getNetwork() === 'TRON') {
this.networkWallet = tronScan + this.transactionHash;
} else if (this.tokenStorageService.getNetwork() === 'ARTHERA') {
this.networkWallet = artheraScan + this.transactionHash;
}
}
}
Expand All @@ -66,21 +68,20 @@ export class CopyTransactionHashComponent {
}, 2000);
}

redirect(network:string) {
redirect(network: string) {
if (network === 'BEP20') {
this.urlSmartContrat = bscan + this.transactionHash;
} else if (network === 'ERC20') {
} else if (this.tokenStorageService.getNetwork() === 'ERC20') {
this.urlSmartContrat = etherscan + this.transactionHash;
} else if (network === 'POLYGON') {
} else if (this.tokenStorageService.getNetwork() === 'POLYGON') {
this.urlSmartContrat = polygonscan + this.transactionHash;
} else if (network === 'BTTC') {
} else if (this.tokenStorageService.getNetwork() === 'BTTC') {
this.urlSmartContrat = bttscan + this.transactionHash;
} else if (network === 'TRON') {
} else if (this.tokenStorageService.getNetwork() === 'TRON') {
this.urlSmartContrat = tronScan + this.transactionHash;
} else if(network === 'ARTHERA') {
} else if (this.tokenStorageService.getNetwork() === 'ARTHERA') {
this.urlSmartContrat = artheraScan + this.transactionHash;
}


return this.urlSmartContrat;
}
}
Loading