...
 
Commits (15)
......@@ -70,7 +70,6 @@ export class Minds {
this.onboardingService.onClose.subscribe(() => {
this.showOnboarding = false;
this.router.navigate(['/newsfeed']);
});
this.onboardingService.onOpen.subscribe(async () => {
......
......@@ -102,7 +102,7 @@
>
<a
target="_blank"
[href]="minds.cdn_assets_url + 'assets/documents/Whitepaper-v0.3.pdf'"
[href]="minds.cdn_assets_url + 'assets/documents/Whitepaper-v0.5.pdf'"
>
<i class="material-icons">description</i>
<span>Whitepaper</span>
......
......@@ -105,7 +105,7 @@
class="m-dropdownList__item m-user-menuDropdown__Item"
(click)="closeMenu()"
>
<a target="_blank" [href]="minds.cdn_assets_url + 'assets/documents/Whitepaper-v0.3.pdf'">
<a target="_blank" [href]="minds.cdn_assets_url + 'assets/documents/Whitepaper-v0.5.pdf'">
<i class="material-icons">description</i>
<span i18n>Whitepaper</span>
</a>
......
......@@ -40,9 +40,9 @@
i18n-title
>
<img [src]="minds.cdn_assets_url + 'assets/logos/bulb.svg'"
(touchstart)="touchStart()"
(mouseenter)="mouseEnter()"
(mouseleave)="mouseLeave()"
(touchstart)="touchStart()"
(mouseenter)="mouseEnter()"
(mouseleave)="mouseLeave()"
/>
</a>
<ng-container *ngIf="getCurrentUser()">
......
......@@ -4,6 +4,7 @@ import {
Component,
ComponentFactoryResolver,
OnInit,
OnDestroy,
ViewChild
} from "@angular/core";
import { Session } from "../../../services/session";
......@@ -16,7 +17,7 @@ import { ThemeService } from "../../../common/services/theme.service";
templateUrl: 'v2-topbar.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class V2TopbarComponent implements OnInit {
export class V2TopbarComponent implements OnInit, OnDestroy {
minds = window.Minds;
timeout;
isTouchScreen = false;
......@@ -65,7 +66,7 @@ export class V2TopbarComponent implements OnInit {
mouseEnter() {
if (this.session.isLoggedIn()) {
this.timeout = setTimeout(() => {
if(!this.isTouchScreen) {
if (!this.isTouchScreen) {
this.themeService.toggleUserThemePreference();
}
}, 5000);
......@@ -77,8 +78,9 @@ export class V2TopbarComponent implements OnInit {
}
ngOnDestroy() {
if (this.timeout)
if (this.timeout) {
clearTimeout(this.timeout);
}
}
}
......@@ -79,14 +79,6 @@ describe('TagPipe', () => {
expect(transformedString).toContain('<a class="tag"');
});
it('should transform when @ followed by `.com`', () => {
const pipe = new TagsPipe(featuresServiceMock);
const string = 'textstring @name.com';
const transformedString = pipe.transform(<any>string);
expect(transformedString).toContain('<a class="tag"');
expect(transformedString).toContain('@name.com');
});
it('should transform to an email', () => {
const pipe = new TagsPipe(featuresServiceMock);
const string = 'textstring@name.com';
......@@ -98,6 +90,7 @@ describe('TagPipe', () => {
const pipe = new TagsPipe(featuresServiceMock);
const string = 'textstring name';
const transformedString = pipe.transform(<any>string);
expect(transformedString).toEqual(string);
expect(transformedString).not.toContain('<a class="tag"');
});
......
......@@ -39,9 +39,9 @@ export class TagsPipe implements PipeTransform {
}
},
at: {
rule: /(^|\W)@([a-z0-9_\-\.]+[a-z0-9_])(\W|$)/gmi,
rule: /(^|\s|\W)@(\w*[a-zA-Z_-]+\w*)/gim,
replace: (m) => {
return `${m.match[1]}<a class="tag" href="/${m.match[2]}" target="_blank">@${m.match[2]}</a>${m.match[3]}`;
return `${m.match[1]}<a class="tag" href="/${m.match[2]}" target="_blank">@${m.match[2]}</a>`;
}
}
};
......
......@@ -35,9 +35,9 @@
<section class="m-marketing--section">
<div class="m-blockchain--marketing--links">
<a class="m-btn m-btn--slim m-btn--action" target="_blank" href="https://cdn-assets.minds.com/front/dist/assets/documents/Whitepaper-v0.4.pdf">Whitepaper (PDF)</a>
<a class="m-btn m-btn--slim m-btn--action" target="_blank" href="https://cdn-assets.minds.com/front/dist/assets/documents/Whitepaper-v0.5.pdf">Whitepaper (PDF)</a>
<a class="m-btn m-btn--slim m-btn--action" target="_blank" routerLink="/wallet/tokens/101">Token 101</a>
<a class="m-btn m-btn--slim m-btn--action" target="_blank" href="https://cdn-assets.minds.com/front/dist/assets/documents/Specs-v0.4.pdf">Specs (PDF)</a>
<a class="m-btn m-btn--slim m-btn--action" target="_blank" href="https://cdn-assets.minds.com/front/dist/assets/documents/Specs-v0.5.pdf">Specs (PDF)</a>
</div>
</section>
......
......@@ -50,7 +50,7 @@
</td>
<td class="m-blockchain--marketing--pledge--input" style="text-align: left">
<m-tooltip anchor="left" i18n="@@MINDS__TOPBAR__TOP__OPEN_TRENDING_ITEM_TOOLTIP">
<span m-tooltip--anchor class="m-blockchain--marketing--pledges--eth-subtext">1 Token = $0.15 USD = {{ 1 / rate}} ETH</span>
<span m-tooltip--anchor class="m-blockchain--marketing--pledges--eth-subtext">1 Token = $1.25 USD = {{ 1 / rate}} ETH</span>
<ng-container>
ETH amount is based on the current USD/ETH rate and is updated in regular intervals
......
......@@ -37,7 +37,7 @@ export class BlockchainPurchaseComponent implements OnInit {
};
//amount: number = 0.25;
tokens: number = 500;
tokens: number = 30;
address: string = '';
ofac: boolean = false;
......
......@@ -119,6 +119,10 @@ m--blockchain--transaction-overlay {
.m--blockchain--transaction-overlay--field {
margin: ($minds-padding * 2) 0;
.m-btn {
margin-right: $minds-margin;
}
.mdl-checkbox {
.mdl-checkbox__label {
......
......@@ -61,7 +61,7 @@
</div>
<!-- Additional block -->
<div class="mdl-cell mdl-cell--12-col m-additional-block mdl-color-text--blue-grey-200">
<div class="m-blog--footer mdl-cell mdl-cell--12-col m-additional-block mdl-color-text--blue-grey-200">
<div class="m-license-info">
<i class="material-icons">public</i>
......
......@@ -8,4 +8,8 @@
max-width: 100%;
margin: 0;
}
.m-blog--footer {
flex-wrap: wrap;
justify-content: center;
}
}
\ No newline at end of file
......@@ -58,7 +58,7 @@
<i class="material-icons">public</i>
</li>
<li class="m-commentRibbon__item"
*ngIf="comment.owner_guid == session.getLoggedInUser()?.guid || session.isAdmin() || parent.owner_guid == session.getLoggedInUser()?.guid || canEdit"
*ngIf="comment.owner_guid == session.getLoggedInUser()?.guid || session.isAdmin() || parent.owner_guid == session.getLoggedInUser()?.guid || canDelete"
(click)="delete(); toggle.value = false"
title="Delete"
i18n-title="@@M__ACTION__DELETE"
......
......@@ -78,6 +78,7 @@ export class CommentComponentV2 implements OnChanges {
translateToggle: boolean = false;
commentAge$: Observable<number>;
@Input() canEdit: boolean = false;
@Input() canDelete: boolean = false;
@Output() onReply = new EventEmitter();
......
......@@ -51,6 +51,7 @@
[parent]="parent"
[level]="level"
[canEdit]="canEdit"
[canDelete]="canDelete"
[showReplies]="comment.show_replies"
(delete)="delete(i)"
(saved)="edited(i, $event)"
......
......@@ -33,6 +33,7 @@ export class CommentsThreadComponent {
@Input() entity;
@Input() entityGuid;
@Input() canEdit: boolean = false;
@Input() canDelete: boolean = false;
@Input() readonly: boolean = false;
@Input() conversation: boolean = false;
@Input() limit: number = 12;
......@@ -201,7 +202,10 @@ export class CommentsThreadComponent {
guid: guid,
parent_path: parent_path,
});
// if the list is scrolled to the bottom
let scrolledToBottom = this.scrollView.nativeElement.scrollTop + this.scrollView.nativeElement.clientHeight >= this.scrollView.nativeElement.scrollHeight;
if (comment) {
await this.loadBlockedUsers();
this.comments.push(comment);
......@@ -209,8 +213,11 @@ export class CommentsThreadComponent {
this.detectChanges();
this.commentsScrollEmitter.emit('bottom');
this.scrollToBottom.next(true);
if (scrolledToBottom) {
this.commentsScrollEmitter.emit('bottom');
this.scrollToBottom.next(true);
}
} catch (err) { };
});
......
......@@ -2,6 +2,7 @@
[entity]="entity"
[parent]="entity"
[canEdit]="canEdit"
[canDelete]="canDelete"
[readonly]="readonly"
[level]="0"
[limit]="limit"
......
......@@ -56,6 +56,7 @@ export class CommentsTreeComponent {
@Input() scrollable: boolean = false;
@Input() readonly: boolean = false;
@Input() canEdit: boolean = false;
@Input() canDelete: boolean = false;
private shouldReuseRouteFn;
......@@ -89,8 +90,8 @@ export class CommentsTreeComponent {
if (this.entity.entity_guid)
this.guid = this.entity.entity_guid;
this.parent = this.entity;
if (!this.canEdit) {
this.canEdit = this.entity.owner_guid == this.session.getLoggedInUser().guid;
if (!this.canDelete) {
this.canDelete = this.entity.owner_guid == this.session.getLoggedInUser().guid;
}
}
......
......@@ -4,7 +4,7 @@
[limit]="24"
[entity]="group"
[conversation]="true"
[canEdit]="group['is:moderator'] || group['is:creator']"
[canDelete]="group['is:moderator'] || group['is:creator']"
[readonly]="!group['is:member']"
[scrollable]="true"
>
......
......@@ -240,7 +240,7 @@
<m-comments__tree
*ngIf="commentsToggle"
[entity]="activity"
[canEdit]="canDelete"
[canDelete]="canDelete"
>
</m-comments__tree>
......
import { ChangeDetectorRef, Component, EventEmitter, Input, Output } from '@angular/core';
import { Client } from "../../../../services/api/client";
import { Session } from "../../../../services/session";
import { Router } from "@angular/router";
@Component({
selector: 'm-channel--onboarding--rewards',
......@@ -89,7 +88,6 @@ export class TokenRewardsOnboardingComponent {
protected client: Client,
protected cd: ChangeDetectorRef,
protected session: Session,
protected router: Router,
) {
}
......@@ -139,4 +137,4 @@ export class TokenRewardsOnboardingComponent {
join() {
this.onClose.emit();
}
}
\ No newline at end of file
}
......@@ -6,7 +6,7 @@
<div class="m-layout--spacer"></div>
<div class="m-token-101--whitepaper">
<a class="m-btn m-btn--action" href="https://cdn-assets.minds.com/front/dist/assets/documents/Whitepaper-v0.3.pdf" target="_blank" i18n="@@WALLET__TOKENS__101__DOWNLOAD_WHITEPAPER_ACTION">
<a class="m-btn m-btn--action" href="https://cdn-assets.minds.com/front/dist/assets/documents/Whitepaper-v0.5.pdf" target="_blank" i18n="@@WALLET__TOKENS__101__DOWNLOAD_WHITEPAPER_ACTION">
Download Whitepaper
</a>
</div>
......
File added
File added