Removing sponsor. Link to Enterprise sponsor
This commit is contained in:
parent
251de2be11
commit
1008ab6222
@ -15,7 +15,6 @@ import { TermsOfServiceComponent } from './components/terms-of-service/terms-of-
|
||||
import { PrivacyPolicyComponent } from './components/privacy-policy/privacy-policy.component';
|
||||
import { TrademarkPolicyComponent } from './components/trademark-policy/trademark-policy.component';
|
||||
import { BisqMasterPageComponent } from './components/bisq-master-page/bisq-master-page.component';
|
||||
import { SponsorComponent } from './components/sponsor/sponsor.component';
|
||||
import { PushTransactionComponent } from './components/push-transaction/push-transaction.component';
|
||||
import { BlocksList } from './components/blocks-list/blocks-list.component';
|
||||
import { LiquidMasterPageComponent } from './components/liquid-master-page/liquid-master-page.component';
|
||||
@ -373,10 +372,6 @@ let routes: Routes = [
|
||||
path: 'status',
|
||||
component: StatusViewComponent
|
||||
},
|
||||
{
|
||||
path: 'sponsor',
|
||||
component: SponsorComponent,
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule)
|
||||
@ -642,10 +637,6 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') {
|
||||
path: 'status',
|
||||
component: StatusViewComponent
|
||||
},
|
||||
{
|
||||
path: 'sponsor',
|
||||
component: SponsorComponent,
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule)
|
||||
|
@ -27,8 +27,8 @@
|
||||
|
||||
<br><br>
|
||||
<div class="sponsor-button">
|
||||
<button [hidden]="showNavigateToSponsor" type="button" class="btn btn-primary" (click)="sponsor()" i18n="about.become-a-sponsor">Become a sponsor ❤️</button>
|
||||
<ng-container *ngIf="showNavigateToSponsor" i18n="about.navigate-to-sponsor">Navigate to <a href="https://mempool.space/sponsor" target="_blank">https://mempool.space/sponsor</a> to sponsor</ng-container>
|
||||
<button [hidden]="showNavigateToSponsor" type="button" class="btn btn-primary" (click)="sponsor()" i18n="about.become-a-enterprise-sponsor">Become an enterprise sponsor ❤️</button>
|
||||
<ng-container *ngIf="showNavigateToSponsor" i18n="about.navigate-to-sponsor">Navigate to <a href="https://mempool.space/enterprise" target="_blank">https://mempool.space/enterprise</a> to become an enterprise sponsor</ng-container>
|
||||
</div>
|
||||
|
||||
<div class="enterprise-sponsor">
|
||||
|
@ -65,6 +65,10 @@
|
||||
height: 45px;
|
||||
width: 100%;
|
||||
}
|
||||
img {
|
||||
width: 67px;
|
||||
height: 67px;
|
||||
}
|
||||
}
|
||||
|
||||
.alliances {
|
||||
|
@ -61,9 +61,9 @@ export class AboutComponent implements OnInit {
|
||||
);
|
||||
}
|
||||
|
||||
sponsor() {
|
||||
sponsor(): void {
|
||||
if (this.officialMempoolSpace && this.stateService.env.BASE_MODULE === 'mempool') {
|
||||
this.router.navigateByUrl('/sponsor');
|
||||
this.router.navigateByUrl('/enterprise');
|
||||
} else {
|
||||
this.showNavigateToSponsor = true;
|
||||
}
|
||||
|
@ -1,157 +0,0 @@
|
||||
<div class="container-xl">
|
||||
|
||||
<app-svg-images name="officialMempoolSpace" class="logo" style="width: 140px; height: 35px; margin: 30px;" width="500" height="126" viewBox="0 0 500 126"></app-svg-images>
|
||||
|
||||
<div class="sponsor-page">
|
||||
|
||||
<h1 i18n="sponsor.title">Sponsor</h1>
|
||||
|
||||
<p *ngIf="!sponsorsEnabled; else sponsorForm">
|
||||
<ng-container i18n="about.navigate-to-sponsor">Navigate to <a href="https://mempool.space/sponsor" target="_blank">https://mempool.space/sponsor</a> to sponsor</ng-container>
|
||||
</p>
|
||||
|
||||
<ng-template #sponsorForm>
|
||||
<div [hidden]="donationStatus !== 1">
|
||||
|
||||
<form [formGroup]="donationForm" (submit)="submitDonation()" class="form">
|
||||
|
||||
<div class="flex-container">
|
||||
|
||||
<div class="card" (click)="setSelection(0.001)" [class.shiny-border]="donationForm.get('selection').value === 0.001">
|
||||
<div class="card-header">Support the Project</div>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">100K <span class="symbol">sats</span></h5>
|
||||
<p class="card-text">Make a donation and support the project</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card middle-card" (click)="setSelection(0.01)" [class.shiny-border]="donationForm.get('selection').value === 0.01">
|
||||
<div class="card-header">Community Sponsor</div>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">1M <span class="symbol">sats</span></h5>
|
||||
<p class="card-text">Display your Twitter profile photo on our About page</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" (click)="setSelection(1)" [class.shiny-border]="donationForm.get('selection').value === 1">
|
||||
<div class="card-header">Enterprise Sponsor</div>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">1 <span class="symbol">BTC</span></h5>
|
||||
<p class="card-text">Backlink to your organization's website</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="donation-form">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">@</span>
|
||||
</div>
|
||||
<input formControlName="handle" class="form-control" type="text" placeholder="Twitter handle (Optional)">
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<button class="btn btn-primary" type="submit" [disabled]="donationForm.invalid" i18n="about.sponsor.request-invoice">Request invoice</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<div *ngIf="donationStatus === 2">
|
||||
|
||||
<form [formGroup]="paymentForm">
|
||||
<div class="btn-group btn-group-toggle" ngbRadioGroup formControlName="method">
|
||||
|
||||
<label ngbButtonLabel class="btn-primary">
|
||||
<input ngbButton type="radio" value="chain"> <fa-icon [icon]="['fas', 'link']" [fixedWidth]="true" title="Onchain"></fa-icon>
|
||||
</label>
|
||||
|
||||
<label ngbButtonLabel class="btn-primary" *ngIf="donationObj.addresses.BTC_LightningLike">
|
||||
<input ngbButton type="radio" value="lightning"> <fa-icon [icon]="['fas', 'bolt']" [fixedWidth]="true" title="Lightning"></fa-icon>
|
||||
</label>
|
||||
|
||||
<label ngbButtonLabel class="btn-primary" *ngIf="donationObj.addresses.LBTC">
|
||||
<input ngbButton type="radio" value="lbtc"> <fa-icon [icon]="['fas', 'tint']" [fixedWidth]="true" title="Liquid Bitcoin"></fa-icon>
|
||||
</label>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<ng-template [ngIf]="paymentForm.get('method').value === 'chain'">
|
||||
|
||||
<div class="qr-wrapper">
|
||||
<a [href]="bypassSecurityTrustUrl('bitcoin:' + donationObj.addresses.BTC + '?amount=' + donationObj.amount)" target="_blank">
|
||||
<app-qrcode imageUrl="/resources/bitcoin-logo.png" [size]="200" [data]="'bitcoin:' + donationObj.addresses.BTC + '?amount=' + donationObj.amount"></app-qrcode>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="input-group input-group-sm info-group">
|
||||
<input type="text" class="form-control" readonly [value]="donationObj.addresses.BTC">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-secondary" type="button" ><app-clipboard [text]="donationObj.addresses.BTC"></app-clipboard></button>
|
||||
</div>
|
||||
</div>
|
||||
<p>{{ donationObj.amount }} <span class="symbol">BTC</span></p>
|
||||
|
||||
</ng-template>
|
||||
|
||||
<ng-template [ngIf]="paymentForm.get('method').value === 'lightning'">
|
||||
|
||||
<div class="qr-wrapper">
|
||||
<a [href]="bypassSecurityTrustUrl('lightning:' + donationObj.addresses.BTC_LightningLike)" target="_blank">
|
||||
<app-qrcode imageUrl="/resources/bitcoin-logo.png" [size]="200" [data]="donationObj.addresses.BTC_LightningLike.toUpperCase()"></app-qrcode>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="input-group input-group-sm info-group">
|
||||
<input type="text" class="form-control" readonly [value]="donationObj.addresses.BTC_LightningLike">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-secondary" type="button"><app-clipboard [text]="donationObj.addresses.BTC_LightningLike"></app-clipboard></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="input-group input-group-sm info-group">
|
||||
<input type="text" class="form-control" readonly value="036f7fad4938521ddc6fc87ab7d6c6a091cef23cad87564a1f55adb806c017575e@103.99.170.198:9735">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-secondary" type="button"><app-clipboard [text]="'036f7fad4938521ddc6fc87ab7d6c6a091cef23cad87564a1f55adb806c017575e@103.99.170.198:9735'"></app-clipboard></button>
|
||||
</div>
|
||||
</div>
|
||||
<p>{{ donationObj.amount }} <span class="symbol">BTC</span></p>
|
||||
|
||||
</ng-template>
|
||||
|
||||
<ng-template [ngIf]="paymentForm.get('method').value === 'lbtc' || paymentForm.get('method').value === 'tlbtc'">
|
||||
|
||||
<div class="qr-wrapper">
|
||||
<a [href]="bypassSecurityTrustUrl('liquidnetwork:' + donationObj.addresses.LBTC + '?amount=' + donationObj.amount + '&assetid=6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d')" target="_blank">
|
||||
<app-qrcode imageUrl="/resources/liquid-bitcoin.png" [size]="200" [data]="'liquidnetwork:' + donationObj.addresses.LBTC + '?amount=' + donationObj.amount + '&assetid=6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d'"></app-qrcode>
|
||||
</a>
|
||||
</div>
|
||||
<br>
|
||||
<div class="input-group input-group-sm info-group">
|
||||
<input type="text" class="form-control" readonly [value]="donationObj.addresses.LBTC" />
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-secondary" type="button" ><app-clipboard [text]="donationObj.addresses.LBTC"></app-clipboard></button>
|
||||
</div>
|
||||
</div>
|
||||
<p>{{ donationObj.amount }} <span class="symbol">BTC</span></p>
|
||||
|
||||
</ng-template>
|
||||
|
||||
<p i18n="about.sponsor.waiting-for-transaction">Waiting for transaction... </p>
|
||||
<div class="spinner-border text-light"></div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="donationStatus === 3" class="donation-confirmed">
|
||||
<h2>
|
||||
<span i18n="about.sponsor.donation-confirmed">Donation confirmed!</span>
|
||||
<span i18n="about.sponsor.thank-you">Thank you!</span>
|
||||
</h2>
|
||||
|
||||
<div class="order-details">
|
||||
Order ID <span>{{ donationObj.id }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,133 +0,0 @@
|
||||
.sponsor-page {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.qr-wrapper {
|
||||
background-color: #FFF;
|
||||
padding: 10px;
|
||||
display: inline-block;
|
||||
padding-bottom: 5px;
|
||||
margin: 20px auto 0px;
|
||||
}
|
||||
|
||||
.info-group {
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: 240px;
|
||||
height: 220px;
|
||||
background-color: #1d1f31;
|
||||
border: 2px solid #1d1f31;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
transition: 100ms all;
|
||||
margin: 30px 30px 20px 30px;
|
||||
@media(min-width: 476px) {
|
||||
margin: 30px 100px 20px 100px;
|
||||
}
|
||||
@media(min-width: 851px) {
|
||||
margin: 60px 20px 40px 20px;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
font-weight: bold;
|
||||
span {
|
||||
font-weight: 100;
|
||||
}
|
||||
}
|
||||
|
||||
&.bigger {
|
||||
height: 220px;
|
||||
width: 240px;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: #5058926b;
|
||||
border: 2px solid #505892;
|
||||
transform: scale(1.1) translateY(-10px);
|
||||
margin-top: 70px;
|
||||
|
||||
.card-header {
|
||||
background-color: #505892;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.donation-form {
|
||||
max-width: 280px;
|
||||
margin: auto;
|
||||
button {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.card-header {
|
||||
background-color: #171929;
|
||||
}
|
||||
|
||||
.flex-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.middle-card {
|
||||
width: 280px;
|
||||
height: 260px;
|
||||
margin-top: 40px;
|
||||
&:hover {
|
||||
margin-top: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
.shiny-border {
|
||||
background-color: #5058926b;
|
||||
border: 2px solid #505892;
|
||||
transform: scale(1.1) translateY(-10px);
|
||||
margin-top: 70px;
|
||||
box-shadow: 0px 0px 100px #9858ff52;
|
||||
.card-header {
|
||||
background-color: #505892;
|
||||
}
|
||||
|
||||
&.middle-card {
|
||||
margin-top: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
.input-group {
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.donation-confirmed {
|
||||
h2 {
|
||||
margin-top: 50px;
|
||||
span {
|
||||
display: block;
|
||||
&:last-child {
|
||||
color: #9858ff;
|
||||
font-weight: bold;
|
||||
font-size: 2rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.order-details {
|
||||
margin-top: 50px;
|
||||
span {
|
||||
color: #d81b60;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card-body {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
}
|
@ -1,88 +0,0 @@
|
||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { delay, retryWhen, switchMap, tap } from 'rxjs/operators';
|
||||
import { ApiService } from 'src/app/services/api.service';
|
||||
import { SeoService } from 'src/app/services/seo.service';
|
||||
import { StateService } from 'src/app/services/state.service';
|
||||
import { WebsocketService } from 'src/app/services/websocket.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-sponsor',
|
||||
templateUrl: './sponsor.component.html',
|
||||
styleUrls: ['./sponsor.component.scss']
|
||||
})
|
||||
export class SponsorComponent implements OnInit, OnDestroy {
|
||||
sponsorsEnabled = this.stateService.env.OFFICIAL_MEMPOOL_SPACE;
|
||||
donationForm: FormGroup;
|
||||
paymentForm: FormGroup;
|
||||
requestSubscription: Subscription | undefined;
|
||||
donationObj: any;
|
||||
donationStatus = 1;
|
||||
|
||||
constructor(
|
||||
private formBuilder: FormBuilder,
|
||||
private apiService: ApiService,
|
||||
private sanitizer: DomSanitizer,
|
||||
private stateService: StateService,
|
||||
private websocketService: WebsocketService,
|
||||
private seoService: SeoService,
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.seoService.setTitle($localize`:@@dfd99c62b5b308fc5b1ad7adbbf9d526d2b31516:Sponsor`);
|
||||
this.websocketService.want(['blocks']);
|
||||
|
||||
this.paymentForm = this.formBuilder.group({
|
||||
'method': 'chain'
|
||||
});
|
||||
|
||||
this.donationForm = this.formBuilder.group({
|
||||
selection: [0.01],
|
||||
handle: [''],
|
||||
});
|
||||
}
|
||||
|
||||
submitDonation() {
|
||||
if (this.donationForm.invalid) {
|
||||
return;
|
||||
}
|
||||
this.requestSubscription = this.apiService.requestDonation$(
|
||||
this.donationForm.get('selection').value,
|
||||
this.donationForm.get('handle').value
|
||||
)
|
||||
.pipe(
|
||||
tap((response) => {
|
||||
this.donationObj = response;
|
||||
this.donationStatus = 2;
|
||||
}),
|
||||
switchMap(() => this.apiService.checkDonation$(this.donationObj.id)
|
||||
.pipe(
|
||||
retryWhen((errors) => errors.pipe(delay(2000)))
|
||||
)
|
||||
)
|
||||
).subscribe(() => {
|
||||
this.donationStatus = 3;
|
||||
/*
|
||||
if (this.donationForm.get('handle').value) {
|
||||
this.sponsors.unshift({ handle: this.donationForm.get('handle').value });
|
||||
}
|
||||
*/
|
||||
});
|
||||
}
|
||||
|
||||
setSelection(amount: number): void {
|
||||
this.donationForm.get('selection').setValue(amount);
|
||||
}
|
||||
|
||||
bypassSecurityTrustUrl(text: string): SafeUrl {
|
||||
return this.sanitizer.bypassSecurityTrustUrl(text);
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
if (this.requestSubscription) {
|
||||
this.requestSubscription.unsubscribe();
|
||||
}
|
||||
}
|
||||
}
|
@ -64,7 +64,6 @@ import { DifficultyComponent } from '../components/difficulty/difficulty.compone
|
||||
import { TermsOfServiceComponent } from '../components/terms-of-service/terms-of-service.component';
|
||||
import { PrivacyPolicyComponent } from '../components/privacy-policy/privacy-policy.component';
|
||||
import { TrademarkPolicyComponent } from '../components/trademark-policy/trademark-policy.component';
|
||||
import { SponsorComponent } from '../components/sponsor/sponsor.component';
|
||||
import { PushTransactionComponent } from '../components/push-transaction/push-transaction.component';
|
||||
import { AssetsFeaturedComponent } from '../components/assets/assets-featured/assets-featured.component';
|
||||
import { AssetGroupComponent } from '../components/assets/asset-group/asset-group.component';
|
||||
@ -139,7 +138,6 @@ import { ToggleComponent } from './components/toggle/toggle.component';
|
||||
TermsOfServiceComponent,
|
||||
PrivacyPolicyComponent,
|
||||
TrademarkPolicyComponent,
|
||||
SponsorComponent,
|
||||
PushTransactionComponent,
|
||||
AssetsNavComponent,
|
||||
AssetsFeaturedComponent,
|
||||
@ -242,7 +240,6 @@ import { ToggleComponent } from './components/toggle/toggle.component';
|
||||
TermsOfServiceComponent,
|
||||
PrivacyPolicyComponent,
|
||||
TrademarkPolicyComponent,
|
||||
SponsorComponent,
|
||||
PushTransactionComponent,
|
||||
AssetsNavComponent,
|
||||
AssetsFeaturedComponent,
|
||||
|
Loading…
x
Reference in New Issue
Block a user