Commit d1a0aad3 authored by Marcelo Rivera's avatar Marcelo Rivera

(feat): donate screen

1 merge request!459WIP: (feat): Minds Pro
Pipeline #74206734 passed with stages
in 27 minutes and 1 second
<div class="m-pro--channel-donate">
<m-wire--creator
[object]="currentChannel"
[opts]="{onComplete: onWireCompleted}"
[inModal]="false"
>
</m-wire--creator>
</div>
m-pro--channel-donate {
h1 {
font-size: 72px;
font-weight: 600;
margin: 0 0 0.4em;
.m-pro--channel-donate {
font-weight: 400;
max-width: 900px;
margin: auto;
position: relative;
padding:32px;
border-radius:6px;
background-color: var(--plain-background-color);
}
}
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { ProChannelService } from "../channel.service";
@Component({
selector: 'm-pro--channel-donate',
......@@ -7,4 +8,16 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
})
export class ProChannelDonateComponent {
get currentChannel() {
return this.channelService.currentChannel;
}
constructor(
public channelService: ProChannelService
) {
}
onWireCompleted() {
throw new Error('Not implemented');
}
}
......@@ -17,6 +17,7 @@ import { ProSettingsComponent } from './settings/settings.component';
import { ProUserMenuComponent } from "./channel/pro-user-menu/pro-user-menu.component";
import { ProChannelFooterComponent } from './channel/footer/footer.component';
import { LegacyModule } from "../legacy/legacy.module";
import { WireModule } from "../wire/wire.module";
const routes: Routes = [
{
......@@ -67,6 +68,7 @@ const routes: Routes = [
MindsFormsModule,
NewsfeedModule,
LegacyModule,
WireModule,
],
providers: [
ProService,
......
import { Component, Input, ViewChild, ElementRef, ChangeDetectorRef } from '@angular/core';
import { Component, Input, ViewChild, ElementRef, ChangeDetectorRef, Output, EventEmitter } from '@angular/core';
import { CurrencyPipe } from '@angular/common';
import { OverlayModalService } from '../../../services/ux/overlay-modal';
......@@ -76,6 +76,8 @@ export class WireCreatorComponent {
protected submitted: boolean;
@Input() inModal: boolean = true;
@Input('object') set data(object) {
this.wire.guid = object ? object.guid : null;
......@@ -99,6 +101,8 @@ export class WireCreatorComponent {
}
_opts: any;
@Input('opts')
set opts(opts: any) {
this._opts = opts;
this.setDefaults();
......@@ -124,7 +128,8 @@ export class WireCreatorComponent {
private web3Wallet: Web3WalletService,
private tokenContract: TokenContractService,
private router: Router,
) { }
) {
}
ngOnInit() {
this.load()
......@@ -332,8 +337,8 @@ export class WireCreatorComponent {
}
/**
* Round by 4
*/
* Round by 4
*/
roundAmount() {
this.wire.amount = Math.round(parseFloat(`${this.wire.amount}`) * 10000) / 10000;
}
......@@ -504,9 +509,11 @@ export class WireCreatorComponent {
this._opts.onComplete(this.wire);
}
setTimeout(() => {
this.overlayModal.dismiss();
}, 2500);
if (this.inModal) {
setTimeout(() => {
this.overlayModal.dismiss();
}, 2500);
}
}
} catch (e) {
this.error = (e && e.message) || 'Sorry, something went wrong';
......
......@@ -74,6 +74,7 @@ const wireRoutes : Routes = [
WireConsoleRewardsComponent,
WireConsoleSettingsComponent,
WireConsoleOverviewComponent,
WireCreatorComponent,
],
entryComponents: [
WireCreatorComponent,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment