diff --git a/src/app/campaigns/campaign-details/components/campaign-details-container/campaign-details-container.component.ts b/src/app/campaigns/campaign-details/components/campaign-details-container/campaign-details-container.component.ts
index db262b72e..627f53ea6 100755
--- a/src/app/campaigns/campaign-details/components/campaign-details-container/campaign-details-container.component.ts
+++ b/src/app/campaigns/campaign-details/components/campaign-details-container/campaign-details-container.component.ts
@@ -27,6 +27,7 @@ export class CampaignDetailsContainerComponent implements OnInit {
private isDestroyed = new Subject();
constructor(
+
private campaignsStoreService: CampaignsStoreService,
private route: ActivatedRoute,
private meta: Meta,
@@ -54,7 +55,7 @@ export class CampaignDetailsContainerComponent implements OnInit {
)
.subscribe();
this.campaign$ = this.campaignsStoreService.campaign$;
- if (isPlatformServer(this.platformId)) {
+ /*if (isPlatformServer(this.platformId)) {
this.meta.addTag({
name: 'og:image:secure_url',
content: ``
@@ -138,7 +139,7 @@ export class CampaignDetailsContainerComponent implements OnInit {
name: 'twitter:image',
content: 'https://safeimagekit.com/picture.png'
});
- }
+ }*/
this.campaign$.pipe(takeUntil(this.isDestroyed)).subscribe((campaign) => {
this.campaign = campaign;
@@ -146,15 +147,17 @@ export class CampaignDetailsContainerComponent implements OnInit {
setTimeout(() => {
this.showmoonboy = campaign.id === this.campaignId;
}, 1000);
- this.ogImageUrl = campaign.coverSrcMobile.includes('ipfs') ? ipfsURL + campaign.coverSrcMobile.substring(27, campaign.coverSrcMobile.length) : campaign.coverSrcMobile;
-
+ /*this.ogImageUrl = campaign.coverSrcMobile.includes('ipfs') ? ipfsURL + campaign.coverSrcMobile.substring(27, campaign.coverSrcMobile.length) : campaign.coverSrcMobile;
+ this.meta.updateTag({ property: 'og:title', content: campaign.title });
+ this.meta.updateTag({ property: 'og:description', content: campaign.description });
+ this.meta.updateTag({ property: 'og:image', content: this.ogImageUrl });*/
- this.meta.updateTag(
+ /*this.meta.updateTag(
{
- itemprop: 'image',
+ property: 'og:image',
content: this.ogImageUrl
},
- `itemprop='image'`
+
);
this.meta.updateTag(
@@ -279,14 +282,16 @@ export class CampaignDetailsContainerComponent implements OnInit {
content: this.ogImageUrl
},
`name='twitter'`
- );
+ );*/
});
}
imageImported(image: any) {
this.campaignsStoreService.updateOneById({ cover: image });
}
-
+ limitDescription(description: string | undefined, maxLength: number = 200): string {
+ return description ? description.slice(0, maxLength) : '';
+ }
ngOnDestroy(): void {
this.isDestroyed.next('');
this.isDestroyed.unsubscribe();
diff --git a/src/app/campaigns/campaigns-routing.module.ts b/src/app/campaigns/campaigns-routing.module.ts
index 662898c42..d5b54a586 100755
--- a/src/app/campaigns/campaigns-routing.module.ts
+++ b/src/app/campaigns/campaigns-routing.module.ts
@@ -12,6 +12,9 @@ import { TransactionMessageStatusComponent } from '@app/campaigns/components/tra
import { CanLoadPublicModule } from '@core/services/public-pages-module.guard';
import { WelcomePageGuardService } from '@core/services/welcome-page-guard.service';
import { SocialsComponent } from './socials/socials.component';
+import { CampaignDetailComponent } from './campaign-details/components/campaign-detail/campaign-detail.component';
+import { RecoverGainsComponent } from './components/recover-gains/recover-gains.component';
+import { VerifyLinkComponent } from './components/verify-link/verify-link.component';
const routes: Routes = [
{
@@ -35,12 +38,27 @@ const routes: Routes = [
]
},
{
+ path:'campaign/:id',
+ component: CampaignDetailComponent
+ },
+ {
+ path: 'campaign/:id/verify-link',
+ component: VerifyLinkComponent,
+ canActivate: [AuthGuardService]
+ },
+ {
+ path: 'campaign/:id/recover-my-gains',
+ component: RecoverGainsComponent,
+ canActivate: [AuthGuardService]
+ },
+ /*{
path: 'campaign/:id',
loadChildren: () =>
import('./campaign-details/campaign-details.module').then(
(m) => m.CampaignDetailsModule
),
- },
+ canLoad: [CanLoadPublicModule]
+ },*/
{
path: 'welcome',
component: FarmWelcomeComponent
diff --git a/src/app/campaigns/campaigns.module.ts b/src/app/campaigns/campaigns.module.ts
index ceba3a0c7..8d5673b5e 100755
--- a/src/app/campaigns/campaigns.module.ts
+++ b/src/app/campaigns/campaigns.module.ts
@@ -40,6 +40,7 @@ import { cryptoReducerList } from '@app/core/store/crypto-prices/reducer/crypto.
import { CryptoEffectsList } from '@app/core/store/crypto-prices/effects/crypto.effects';
+import { CampaignDetailsModule } from './campaign-details/campaign-details.module';
@NgModule({
declarations: [
@@ -69,6 +70,7 @@ import { CryptoEffectsList } from '@app/core/store/crypto-prices/effects/crypto.
CommonModule,
CampaignsRoutingModule,
CampaignsSharedUiModule,
+ CampaignDetailsModule,
NgxTweetModule,
EffectsModule.forFeature([LinksListEffects]),
StoreModule.forFeature(
diff --git a/src/app/campaigns/components/campaigns-dashboard/campaigns-dashboard.component.html b/src/app/campaigns/components/campaigns-dashboard/campaigns-dashboard.component.html
index fca651a55..cd9db015f 100755
--- a/src/app/campaigns/components/campaigns-dashboard/campaigns-dashboard.component.html
+++ b/src/app/campaigns/components/campaigns-dashboard/campaigns-dashboard.component.html
@@ -36,7 +36,7 @@
{{ 'Wallet_updated_Warning' | translate }}
-
+
diff --git a/src/app/campaigns/components/campaigns-dashboard/campaigns-dashboard.component.scss b/src/app/campaigns/components/campaigns-dashboard/campaigns-dashboard.component.scss
index 9b752cdc3..f3ef90ab1 100755
--- a/src/app/campaigns/components/campaigns-dashboard/campaigns-dashboard.component.scss
+++ b/src/app/campaigns/components/campaigns-dashboard/campaigns-dashboard.component.scss
@@ -183,10 +183,11 @@
}
.bloc-cover {
margin-top: 43vh;
- margin-left: 20%;
+ margin-left: 5%;
}
.title-cover {
- left: 5%;
+ // width: 14em;
+ // left: 5%;
font-weight: 700;
font-size: 28px;
line-height: 120%;
@@ -199,8 +200,13 @@
line-height: 130%;
padding-right: 10%;
}
+ .button_container{
+ width: fit-content;
+ margin: auto;
+ }
.button-cover {
- margin-top: 2.5% !important;
+ margin: auto;
+ margin-top: 1% !important;
}
@media only screen {
diff --git a/src/app/campaigns/components/farm-post-card/farm-post-card.component.html b/src/app/campaigns/components/farm-post-card/farm-post-card.component.html
index f4d431f99..c001743a4 100755
--- a/src/app/campaigns/components/farm-post-card/farm-post-card.component.html
+++ b/src/app/campaigns/components/farm-post-card/farm-post-card.component.html
@@ -636,13 +636,13 @@
{{ 'wait_harvest' | translate }}
- {{ harvestAvailableIn }}
+ {{ this.prom.campaign.remuneration === 'publication' ? countHarvestDownTimerForPublication(): harvestAvailableIn }}
diff --git a/src/app/campaigns/components/farm-post-card/farm-post-card.component.ts b/src/app/campaigns/components/farm-post-card/farm-post-card.component.ts
index 37ea1229e..63e0c3d63 100755
--- a/src/app/campaigns/components/farm-post-card/farm-post-card.component.ts
+++ b/src/app/campaigns/components/farm-post-card/farm-post-card.component.ts
@@ -82,6 +82,25 @@ export class FarmPostCardComponent implements OnInit {
[atLastOneChecked(), requiredDescription()]
);
}
+ countHarvestDownTimerForPublication() {
+ // Provided end date in UNIX timestamp format (e.g., 1698192000)
+ const endDateTimestamp = this.prom.campaign.endDate * 1000; // Convert to milliseconds
+
+ // Current date
+ const currentDate = Date.now();
+
+ // Calculate the time difference in milliseconds
+ const timeDifference = endDateTimestamp - currentDate;
+
+ // Calculate days, hours, and minutes
+ const days = Math.floor(timeDifference / (1000 * 60 * 60 * 24));
+ const hours = Math.floor((timeDifference % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
+ const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60));
+ if(days === 0 && hours === 0 && minutes === 0) {
+ this.harvestAvailable = false;
+ } else this.harvestAvailable = true;
+ return `${days}d ${hours}h ${minutes}min`;
+ }
private countDownTimer(): void {
const timestampAcceptedDate: number = this.prom.acceptedDate * 1000;
@@ -142,11 +161,12 @@ export class FarmPostCardComponent implements OnInit {
)
.subscribe((prom: any) => {
this.prom = new Participation(prom);
-
+ this.countHarvestDownTimerForPublication();
});
let currencyName = this.prom.campaign.currency;
this.intervalId = setInterval(() => {
this.countDownTimer();
+
}, 1000);
if (currencyName === 'SATTBEP20') currencyName = 'SATT';
diff --git a/src/app/campaigns/components/participer/participer.component.css b/src/app/campaigns/components/participer/participer.component.css
index f06943441..2df737b7c 100755
--- a/src/app/campaigns/components/participer/participer.component.css
+++ b/src/app/campaigns/components/participer/participer.component.css
@@ -6,6 +6,12 @@
}
+.error-message-limit-participation {
+ text-align: center;
+ color: red;
+ margin-top: 3%;
+}
+
.input-amount {
-webkit-appearance: none;
appearance: none;
diff --git a/src/app/campaigns/components/participer/participer.component.html b/src/app/campaigns/components/participer/participer.component.html
index 7816f96af..09e640800 100755
--- a/src/app/campaigns/components/participer/participer.component.html
+++ b/src/app/campaigns/components/participer/participer.component.html
@@ -563,7 +563,9 @@
{{ 'monetize_your_post' | translate }}