Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • omadrid/front
  • minds/front
  • joe59/front
  • markharding/front
  • eiennohi/front
  • edgebal/front
  • msantang78/front
  • bhayward93/front
  • xorgy/front
  • duyquoc/front
  • benhayward.ben/front
  • mnurzia/front
  • priestd09/front
  • dknunn/front
  • Yersinia/front
  • literalpie/front
  • maruthi-adithya/front
  • javanick/front
  • juanmsolaro/front
  • ascenderking/front
  • fabiolalombardim/front
  • jim-toth/front
  • Shivathanu/front
  • pestixaba/front
  • project_connection/front
  • mul53/front
  • iamonuwa/front
  • manishoo/front
  • namesty/front
  • AaronTheBruce/front
  • bedriguler/front
  • th2tran/front
  • jun784/front
  • mdstevens044/front
  • CodingNagger/front
  • heenachauhan201/front
  • diazairic/front
  • m994/front
  • webprodev/minds_front
  • chaoukiammar/front
  • benn7/front
  • ung1807/front
  • vinliao/front-patch-1
  • suhailkakar/front
  • theokeist/minds-blog
45 results
Select Git revision
Show changes
Commits on Source (13)
Showing
with 363 additions and 21 deletions
......@@ -83,6 +83,7 @@ export class SentryErrorHandler implements ErrorHandler {
handleError(error) {
// const eventId = Sentry.captureException(error.originalError || error);
// Sentry.showReportDialog({ eventId });
console.error(error);
}
}
......
import { Injectable } from '@angular/core';
import { BehaviorSubject, Observable } from 'rxjs';
import { first } from 'rxjs/operators';
import { BehaviorSubject, Observable, of } from 'rxjs';
import { first, catchError } from 'rxjs/operators';
import { Client } from '../../services/api';
import { BlockListService } from './block-list.service';
......@@ -64,8 +64,17 @@ export class EntitiesService {
}
for (const feedItem of feed) {
if (!blockedGuids || blockedGuids.indexOf(feedItem.owner_guid) < 0)
entities.push(this.entities.get(feedItem.urn));
if (
this.entities.has(feedItem.urn) &&
(!blockedGuids || blockedGuids.indexOf(feedItem.owner_guid) < 0)
) {
const entity = this.entities.get(feedItem.urn);
try {
if (await entity.pipe(first()).toPromise()) {
entities.push(entity);
}
} catch (err) {}
}
}
return entities;
......
......@@ -10,12 +10,13 @@
<ng-container *ngIf="type == 'newsfeed' || type == 'offers'">
<ng-container>
<div class="m-boost-console--booster--posts-list">
<ng-container *ngFor="let entity of feed$ | async">
<minds-card
[object]="entity | async"
class="m-border"
hostClass="mdl-card"
*ngFor="let entity of feed$ | async"
></minds-card>
</ng-container>
</div>
</ng-container>
......@@ -47,11 +48,13 @@
class="mdl-cell mdl-cell--6-col"
*ngFor="let entity of feed$ | async"
>
<ng-container *ngIf="(entity | async)?.thumbnail_src">
<minds-card
[object]="entity | async"
hostClass="mdl-shadow--2dp"
></minds-card>
<minds-button type="boost" [object]="entity | async"></minds-button>
</ng-container>
</div>
</div>
</ng-container>
......
......@@ -41,8 +41,10 @@
</p>
<p>In order to install this version you must:</p>
<ul>
<li>Be running a minimum of Android 5 (Lollipop).</li>
<li>
Update Phone settings to "enable downloads from unverified source"
Update Phone settings to "Allow installation of apps from unknown
sources".
</li>
<li>Download and install!</li>
</ul>
......
......@@ -16,11 +16,13 @@
<a
class="m-page--sidebar--navigation--item"
routerLink="/wallet/usd/earnings"
routerLink="/wallet/usd/transactions"
routerLinkActive="m-page--sidebar--navigation--item-active"
>
<i class="material-icons">history</i>
<span i18n="@@MONETIZATION__REVENUE__CONSOLE__EARNINGS">Earnings</span>
<span i18n="@@MONETIZATION__REVENUE__CONSOLE__EARNINGS"
>Transactions</span
>
</a>
<a
......@@ -50,6 +52,7 @@
</i>
<span>Back to the Token Wallet</span>
</a>
<m-walletUsd__balance></m-walletUsd__balance>
<router-outlet></router-outlet>
</div>
</div>
<div class="m-revenue--options m-border">
<div class="m-revenue--options-requirements" *ngIf="account.requirement">
<h3>Account Requirements</h3>
<p>
You are required to complete the following action in order to receive
payouts:
<ng-container
*ngIf="account.requirement === 'individual.verification.document'"
>
<b (click)="file.click()">Upload Photo ID</b>
<br />
<br />
<button (click)="file.click()" class="m-btn m-btn--action m-btn--slim">
<ng-container *ngIf="!editing">Select & Upload</ng-container>
<ng-container *ngIf="editing">Uploading...</ng-container>
</button>
<input
type="file"
#file
name="file"
(change)="uploadRequirement(file)"
accept="image/*"
style="display: none;"
/>
</ng-container>
<ng-container *ngIf="account.requirement.indexOf('tos_acceptance.') > -1">
<b>
Accept the
<a href="https://stripe.com/legal" target="_blank">
Stripe Services Agreement
</a>
</b>
<br />
<br />
<button (click)="acceptTos()" class="m-btn m-btn--action m-btn--slim">
<ng-container *ngIf="!editing">Accept Terms</ng-container>
<ng-container *ngIf="editing">Accepting...</ng-container>
</button>
</ng-container>
</p>
</div>
<div class="m-revenue--options-payout-method">
<h3 i18n="@@MONETIZATION__REVENUE__OPTIONS__PAYOUT_METHOD_TITLE">
Payout Method
......
......@@ -102,8 +102,12 @@
border-radius: 2px;
}
.m-revenue--options-cancel {
.m-revenue--options-cancel,
.m-revenue--options-requirements {
margin-top: 32px;
&.m-revenue--options-requirements {
margin-top: 0;
}
padding: 16px;
h3 {
......
......@@ -3,7 +3,7 @@ import { ActivatedRoute, Router } from '@angular/router';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { ChartColumn } from '../../../common/components/chart/chart.component';
import { Client } from '../../../services/api';
import { Client, Upload } from '../../../services/api';
@Component({
moduleId: module.id,
......@@ -18,12 +18,14 @@ export class RevenueOptionsComponent {
account: null,
country: 'US',
};
account;
error: string = '';
leaving: boolean = false;
leaveError: string = '';
constructor(
private client: Client,
private upload: Upload,
private cd: ChangeDetectorRef,
private fb: FormBuilder,
private router: Router
......@@ -42,6 +44,7 @@ export class RevenueOptionsComponent {
this.inProgress = true;
this.client.get('api/v2/payments/stripe/connect').then(({ account }) => {
this.inProgress = false;
this.account = account;
this.payoutMethod.country = account.country;
this.form.controls.country.setValue(account.country);
if (account.bankAccount.last4) {
......@@ -97,6 +100,25 @@ export class RevenueOptionsComponent {
this.detectChanges();
}
async uploadRequirement(fileInput: HTMLInputElement) {
const file = fileInput ? fileInput.files[0] : null;
this.editing = true;
this.detectChanges();
await this.upload.post('api/v2/payments/stripe/connect/photoid', [file]);
this.editing = false;
this.account = null;
this.getSettings();
}
async acceptTos() {
this.editing = true;
this.detectChanges();
await this.client.put('api/v2/payments/stripe/connect/terms');
this.editing = false;
this.account = null;
this.getSettings();
}
detectChanges() {
this.cd.markForCheck();
this.cd.detectChanges();
......
......@@ -45,7 +45,6 @@ m-notifications--flyout {
max-height: calc(95vh - 200px);
overflow-y: scroll;
padding: 0;
white-space: pre-line;
.mdl-cell--12-col {
padding: 0;
......
......@@ -53,6 +53,17 @@
>
</a>
<a
class="m-page--sidebar--navigation--item"
routerLink="/settings/tiers"
routerLinkActive="m-page--sidebar--navigation--item-active"
>
<i class="material-icons">card_giftcard</i>
<span i18n="@@SETTINGS__NAVIGATION__SUBSCRIPTIONS_NAV"
>Subscription Tiers</span
>
</a>
<a
class="m-page--sidebar--navigation--item"
routerLink="/settings/billing"
......
......@@ -26,6 +26,7 @@ import { SettingsWireComponent } from './wire/wire.component';
import { WireModule } from '../wire/wire.module';
import { SettingsP2PMediaComponent } from './p2pmedia/p2pmedia.component';
import { SettingsBlockedChannelsComponent } from './blocked-channels/blocked-channels.component';
import { SettingsTiersComponent } from './tiers/tiers.component';
const settingsRoutes: Routes = [
{
......@@ -43,6 +44,7 @@ const settingsRoutes: Routes = [
{ path: 'reported-content', component: SettingsReportedContentComponent },
{ path: 'p2pmedia', component: SettingsP2PMediaComponent },
{ path: 'blocked-channels', component: SettingsBlockedChannelsComponent },
{ path: 'tiers', component: SettingsTiersComponent },
],
},
];
......@@ -76,6 +78,7 @@ const settingsRoutes: Routes = [
SettingsWireComponent,
SettingsP2PMediaComponent,
SettingsBlockedChannelsComponent,
SettingsTiersComponent,
],
providers: [SettingsService],
exports: [
......
<div class="m-settings--section m-layout__row m-border">
<div
class="minds-error mdl-color--red mdl-color-text--white"
[hidden]="!error"
>
{{ error }}
</div>
<div class="m-layout__spacer"></div>
<button
class="m-btn m-btn--slim m-btn--action"
*ngIf="!isSaving && !isSaved"
(click)="save()"
>
<ng-container i18n="@@M__ACTION__SAVE">Save</ng-container>
</button>
<button class="m-btn m-btn--slim" *ngIf="isSaved">
<ng-container i18n="@@M__COMMON__SAVED">Saved</ng-container>
</button>
<div
id="p2"
class="mdl-progress mdl-js-progress mdl-progress__indeterminate"
[hidden]="!isSaving"
></div>
</div>
<div class="m-border m-settings--section">
<h4>Subscription Tiers</h4>
<p>
Create tiers below to incentivise supporters to wire you. These tiers will
be displayed on the sidebar of your channel page on in the wire screen.
</p>
<m-wire__subscriptionTiers
[user]="session.getLoggedInUser()"
[editing]="true"
(isSaving)="isSaving = $event"
(isSaved)="isSaved = $event"
[saveEventListener]="triggerSave"
>
</m-wire__subscriptionTiers>
</div>
m-settings__tiers .m-settings--section {
display: block;
@include m-theme() {
background-color: themed($m-white);
}
textarea {
padding: 16px;
width: 100%;
}
m-wire-channel-table {
display: block;
margin-top: $minds-margin * 2;
table {
width: 100%;
.m-wire-channel--reward-amount {
display: inline-flex;
width: 100%;
}
}
}
}
import { Component, EventEmitter } from '@angular/core';
import { Session } from '../../../services/session';
import { Client } from '../../../services/api';
@Component({
selector: 'm-settings__tiers',
templateUrl: 'tiers.component.html',
})
export class SettingsTiersComponent {
isSaving = false;
isSaved = false;
triggerSave = new EventEmitter(true);
error: string;
constructor(public session: Session, public client: Client) {}
save() {
this.triggerSave.next(true);
}
}
<div class="m-walletUsd__balance m-border">
<div class="m-layout__row">
<div class="m-layout__cell">
<label>Future Payouts</label>
<span>{{ balance | number }} {{ currency | uppercase }}</span>
</div>
<div class="m-layout__spacer"></div>
<div class="m-layout_cell">
<label>Payout Schedule:</label>
<span>{{ interval | titlecase }}</span>
<m-tooltip icon="help" i18n="@@MINDS__WALLET__USD__PAYOUT__SCHEDULE">
<ng-container *ngIf="interval === 'daily'">
Daily payouts are sent {{ delay }} days after a payment has been
processed
</ng-container>
<ng-container *ngIf="interval === 'monthly'">
Monthly payouts will be issued on the {{ anchor }} day of the month
</ng-container>
</m-tooltip>
</div>
</div>
</div>
.m-walletUsd__balance {
padding: $minds-padding * 2;
margin-bottom: $minds-margin * 2;
@include m-theme() {
background-color: themed($m-white);
}
label {
font-weight: 600;
}
span {
margin-left: 8px;
}
m-tooltip {
vertical-align: middle;
i {
font-size: 16px;
color: #666;
margin-left: 4px;
}
}
}
import { Component, ViewChild, ComponentFactoryResolver } from '@angular/core';
import { RevenueLedgerComponent } from '../../monetization/revenue/ledger.component';
import { Client } from '../../../services/api/client';
@Component({
selector: 'm-walletUsd__balance',
templateUrl: './balance.component.html',
})
export class WalletUSDBalanceComponent {
balance: number;
currency: string;
interval: string;
delay: number;
anchor: number;
constructor(private client: Client) {}
ngOnInit() {
this.load();
}
async load() {
const { account } = <any>(
await this.client.get('api/v2/payments/stripe/connect')
);
this.balance =
(account.totalBalance.amount + account.pendingBalance.amount) / 100;
this.currency = account.totalBalance.currency;
this.interval = account.payoutInterval;
this.delay = account.payoutDelay;
this.anchor = account.payoutAnchor;
}
}
<table class="m-walletUsdTransactions__table m-border">
<tr>
<td>Date</td>
<td>User</td>
<td>Gross</td>
<td>Net</td>
</tr>
<tr *ngFor="let transaction of transactions">
<td>{{ transaction.timestamp * 1000 | date: 'medium' }}</td>
<td>
<a
*ngIf="transaction.customer_user"
[routerLink]="['/', transaction.customer_user.username]"
>
<span>@</span>{{ transaction.customer_user.username }}
</a>
</td>
<td>{{ transaction.gross / 100 | number: '1.2-2' }} USD</td>
<td>
{{ transaction.net / 100 | number: '1.2-2' }}
{{ transaction.currency | uppercase }}
</td>
</tr>
</table>
.m-walletUsdTransactions__table {
width: 100%;
@include m-theme() {
background-color: themed($m-white);
}
> tr:first-of-type() {
font-weight: bold;
}
td {
padding: $minds-padding * 2;
font-size: 13px;
@include m-theme() {
border-bottom: 1px solid themed($m-grey-50);
}
}
}
import { Component, ViewChild, ComponentFactoryResolver } from '@angular/core';
import { Router } from '@angular/router';
import { DynamicHostDirective } from '../../../common/directives/dynamic-host.directive';
import { RevenueLedgerComponent } from '../../monetization/revenue/ledger.component';
import { Session } from '../../../services/session';
import { Client } from '../../../services/api/client';
@Component({
selector: 'm-walletUsd__transactions',
templateUrl: './transactions.component.html',
})
export class WalletUSDTransactionsComponent {
transactions = [];
constructor(
private router: Router,
private session: Session,
private client: Client
) {}
ngOnInit() {
this.load();
}
async load() {
const { transactions } = <any>(
await this.client.get('api/v2/payments/stripe/transactions')
);
this.transactions = transactions;
}
}