Skip to content
Commits on Source (11)
......@@ -14973,6 +14973,11 @@
"integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==",
"dev": true
},
"qrcodejs2": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/qrcodejs2/-/qrcodejs2-0.0.2.tgz",
"integrity": "sha1-Rlr+Xjnxn6zsuTLBH3oYYQkUauE="
},
"qs": {
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
......
......@@ -98,6 +98,18 @@ m-app {
width: 300px;
}
.m-page__goBack {
display: flex;
align-items: center;
font-size: 13px;
font-weight: bold;
text-decoration: none;
margin-bottom: 8px;
@include m-theme() {
color: themed($m-grey-600);
}
}
.m-page--sidebar--navigation--item {
cursor: pointer;
display: block;
......
import { Cookie } from '../../services/cookie';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { environment } from '../../../environments/environment';
/**
* API Class
......@@ -12,7 +13,7 @@ export class MindsHttpClient {
return new MindsHttpClient(http);
}
constructor(public http: HttpClient) {}
constructor(public http: HttpClient) { }
/**
* Return a GET request
......@@ -68,6 +69,7 @@ export class MindsHttpClient {
const headers = new HttpHeaders({
'X-XSRF-TOKEN': XSRF_TOKEN,
'X-VERSION': environment.version,
});
return Object.assign(options, {
......
......@@ -32,6 +32,7 @@ import {
import { Scheduler } from './components/scheduler/scheduler';
import { Modal } from './components/modal/modal.component';
import { MindsRichEmbed } from './components/rich-embed/rich-embed';
import { QRCodeComponent } from './components/qr-code/qr-code.component';
import { MDL_DIRECTIVES } from './directives/material';
import { AutoGrow } from './directives/autogrow';
......@@ -137,6 +138,7 @@ import { ShareModalComponent } from '../modules/modals/share/share';
MindsRichEmbed,
TagcloudComponent,
DropdownComponent,
QRCodeComponent,
AutoGrow,
InlineAutoGrow,
......@@ -223,6 +225,7 @@ import { ShareModalComponent } from '../modules/modals/share/share';
MindsRichEmbed,
TagcloudComponent,
DropdownComponent,
QRCodeComponent,
AutoGrow,
InlineAutoGrow,
......
......@@ -66,3 +66,40 @@ minds-button-thumbs-down {
}
}
}
.m-selector {
position: relative;
select {
padding: 8px 16px;
max-width: 100%;
appearance: none;
display: block;
width: 100%;
font-family: 'Roboto', Helvetica, sans-serif;
font-size: 13px;
cursor: pointer;
font-weight: 600;
@include m-theme() {
border: 1px solid themed($m-grey-100);
}
}
&::before {
content: '\25bc';
position: absolute;
pointer-events: none;
top: 0;
bottom: 1px;
padding-top: 0.7em;
line-height: 1;
right: 0;
width: 2em;
text-align: center;
transform: scale(0.84, 0.42);
filter: progid:DXImageTransform.Microsoft.Matrix(M11=.84, M12=0, M21=0, M22=.42, SizingMethod='auto expand');
@include m-theme() {
color: themed($m-grey-500);
}
}
}
import { Component, Input, ElementRef } from '@angular/core';
declare var require: any;
let QRCode: any;
@Component({
selector: 'm-qr-code',
template: '',
})
export class QRCodeComponent {
qrcode;
@Input() data: string = '';
constructor(public el: ElementRef) {}
ngOnInit() {
if (!QRCode) {
QRCode = require('qrcodejs2');
}
this.qrcode = new QRCode(this.el.nativeElement, {
colorDark: '#000',
colorLight: '#FFF',
correctLevel: QRCode.CorrectLevel['M'],
height: 300,
text: this.data || ' ',
useSVG: true,
width: 300,
});
}
}
......@@ -52,6 +52,15 @@
View (PDF)
</a>
</li>
<li>
Site Admin -
<a
href="https://cdn-assets.minds.com/jobs/admin.pdf"
target="_blank"
>
View (PDF)
</a>
</li>
</ul>
</div>
<div
......
......@@ -71,24 +71,23 @@ minds-button-remind {
.minds-boost-button {
font-size: 12px;
font-weight: 400;
height: auto;
min-height: 0;
line-height: 18px;
text-transform: capitalize;
text-transform: uppercase;
align-self: center;
padding: 3px 0;
min-width: 62px;
min-width: 72px;
width: auto;
margin: -3px 0;
display: block;
@include m-theme() {
background-color: themed($m-blue) !important;
}
flex: 0 !important;
&:hover {
@include m-theme() {
background-color: rgba(themed($m-blue-dark), 0.9) !important;
}
span {
min-width: 72px;
text-align: center;
vertical-align: middle;
}
}
......
.tabs .m-wire-button {
transform: scale(0.8) translateY(-4px);
// transform: scale(0.8) translateY(-4px);
margin: -3px 0;
}
.m-pin-button {
overflow: visible;
......@@ -95,9 +96,9 @@ minds-activity {
padding-left: 8px;
margin: auto;
padding: 3px 0 3px 8px;
padding: 2px 0 2px 8px;
font-size: 14px;
line-height: 9px;
line-height: 8px;
border-radius: 3px;
vertical-align: middle;
display: flex;
......@@ -125,7 +126,7 @@ minds-activity {
}
.m-activity--metrics-metric {
font-size: 10px;
font-size: 9px;
display: inline-block;
vertical-align: middle;
......
......@@ -405,28 +405,28 @@
<minds-button-thumbs-up [object]="activity"></minds-button-thumbs-up>
<minds-button-thumbs-down [object]="activity"></minds-button-thumbs-down>
<m-wire-button
*ngIf="session.getLoggedInUser().guid != (activity.remind_object ? activity.remind_object.owner_guid : activity.owner_guid)"
[object]="activity.remind_object ? activity.remind_object : activity"
*ngIf="session.getLoggedInUser().guid != activity.owner_guid"
[object]="activity"
(done)="wireSubmitted($event)"
></m-wire-button>
<button
class="m-btn m-btn--action m-btn--slim minds-boost-button"
*ngIf="session.getLoggedInUser().guid == activity.owner_guid"
id="boost-actions"
(click)="showBoost()"
>
<span i18n="verb|@@M__ACTION__BOOST">Boost</span>
</button>
<minds-button-comment
[object]="activity"
(click)="openComments()"
></minds-button-comment>
<minds-button-remind [object]="activity"></minds-button-remind>
<a
class="mdl-button mdl-color-text--white mdl-button--colored minds-boost-button"
*ngIf="session.getLoggedInUser().guid == activity.owner_guid"
id="boost-actions"
(click)="showBoost()"
>
<ng-container i18n="verb|@@M__ACTION__BOOST">Boost</ng-container>
</a>
</div>
<!-- Activity metrics -->
<div
class="impressions-tag m-activity--metrics"
[class.m-activity--metrics-wire]="!session.getLoggedInUser() || session.getLoggedInUser().guid != activity.owner_guid"
class="impressions-tag m-activity--metrics m-activity--metrics-wire"
*ngIf="!activity.hide_impressions && !hideTabs"
>
<div class="m-activity--metrics-inner m-border">
......
<div class="m-page">
<div class="m-page--sidebar">
<m-wallet--balance-usd></m-wallet--balance-usd>
<m-wallet--balance-tokens></m-wallet--balance-tokens>
<div class="m-page--sidebar--navigation">
<a
class="m-page__goBack"
routerLink="/wallet/tokens"
style="margin-top: 8px"
>
<i class="material-icons">
keyboard_arrow_left
</i>
<span>Back to the Token Wallet</span>
</a>
<a
class="m-page--sidebar--navigation--item"
routerLink="/wallet/usd/earnings"
......@@ -33,6 +44,12 @@
</div>
<div class="m-page--main">
<a class="m-page__goBack" routerLink="/wallet/tokens">
<i class="material-icons">
keyboard_arrow_left
</i>
<span>Back to the Token Wallet</span>
</a>
<router-outlet></router-outlet>
</div>
</div>
......@@ -4,6 +4,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { ChartColumn } from '../../../common/components/chart/chart.component';
import { Client } from '../../../services/api';
import { Session } from '../../../services/session';
@Component({
moduleId: module.id,
......@@ -15,6 +16,16 @@ export class RevenueConsoleComponent {
private client: Client,
private cd: ChangeDetectorRef,
private fb: FormBuilder,
private router: Router
private router: Router,
public session: Session
) {}
ngOnInit() {
if (
!this.session.getLoggedInUser().merchant ||
this.session.getLoggedInUser().merchant.deleted
) {
this.router.navigate(['/wallet/usd/onboarding']);
}
}
}
......@@ -23,7 +23,7 @@
<div class="m-revenue--options-payout-method-bank-account">
<div class="m-revenue--options-payout-method-bank--name">
{{ payoutMethod.account.bank }}
{{ payoutMethod.account.bank_name }}
</div>
<div class="m-revenue--options-payout-method-bank--number">
****{{ payoutMethod.account.last4 }}
......
......@@ -40,29 +40,28 @@ export class RevenueOptionsComponent {
getSettings() {
this.inProgress = true;
this.client
.get('api/v1/monetization/settings')
.then(({ bank, country }) => {
this.inProgress = false;
this.payoutMethod.country = country;
this.form.controls.country.setValue(country);
if (bank.last4) {
this.payoutMethod.account = bank;
}
this.detectChanges();
});
this.client.get('api/v2/payments/stripe/connect').then(({ account }) => {
this.inProgress = false;
this.payoutMethod.country = account.country;
this.form.controls.country.setValue(account.country);
if (account.bankAccount.last4) {
this.payoutMethod.account = account.bankAccount;
}
this.detectChanges();
});
}
addBankAccount() {
this.inProgress = true;
this.error = '';
this.editing = false;
// this.editing = false;
this.detectChanges();
this.client
.post('api/v1/monetization/settings', this.form.value)
.post('api/v2/payments/stripe/connect/bank', this.form.value)
.then((response: any) => {
this.inProgress = false;
this.editing = false;
this.getSettings();
})
.catch(e => {
......@@ -76,7 +75,7 @@ export class RevenueOptionsComponent {
this.leaving = true;
this.detectChanges();
this.client
.delete('api/v1/monetization/settings/account')
.delete('api/v2/payments/stripe/connect')
.then((response: any) => {
(<any>window).Minds.user.merchant = [];
this.router.navigate(['/newsfeed']);
......
......@@ -24,7 +24,7 @@
></minds-activity>
<m-newsfeed--boost-rotator
interval="4"
interval="3"
*ngIf="showBoostRotator"
></m-newsfeed--boost-rotator>
......
......@@ -248,7 +248,7 @@ describe('NotificationsComponent', () => {
fixture.detectChanges();
expect(comp.notification).not.toBeNull();
const notification = fixture.debugElement.query(By.css('p'));
expect(notification.nativeElement.innerHTML).toBe(
expect(notification.nativeElement.innerHTML).toContain(
'name tagged you in a post'
);
});
......@@ -276,7 +276,7 @@ describe('NotificationsComponent', () => {
fixture.detectChanges();
expect(comp.notification).not.toBeNull();
const notification = fixture.debugElement.query(By.css('p'));
expect(notification.nativeElement.innerHTML).toBe(
expect(notification.nativeElement.innerHTML).toContain(
'name tagged you in a comment'
);
});
......@@ -518,7 +518,7 @@ describe('NotificationsComponent', () => {
fixture.detectChanges();
expect(comp.notification).not.toBeNull();
const notification = fixture.debugElement.query(By.css('p'));
expect(notification.nativeElement.innerHTML).toBe(
expect(notification.nativeElement.innerHTML).toContain(
'You can gain more reach by boosting your content. Hit the blue boost icon on your posts.'
);
});
......
<div class="m-btc__wrapper">
<p>
Please scan the following QR code, or send <b>{{ amount }} BTC</b> to
<b>{{ address }}</b
>.
</p>
<m-qr-code [data]="qrdata"> </m-qr-code>
</div>
.m-btc__wrapper {
m-qr-code {
width: 300px;
height: 300px;
display: block;
position: relative;
}
}
import {
Component,
ChangeDetectorRef,
ChangeDetectionStrategy,
} from '@angular/core';
@Component({
selector: 'm-btc',
templateUrl: 'btc.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class BTCComponent {
address: string = '1DWPuJjcZWzsRPCwss4gYqgeUpkj5AD1yu';
amount: string = '0.01';
set data(data) {
this.address = data.address;
this.amount = data.amount;
}
get qrdata() {
return 'bitcoin:' + this.address + '?amount=' + this.amount;
}
}