Commit 5522bf43 authored by Ben Hayward's avatar Ben Hayward

Update src/app/modules/legacy/components/cards/remind/remind.ts,...

Update src/app/modules/legacy/components/cards/remind/remind.ts, src/app/modules/hashtags/service/topbar.service.ts, src/app/modules/legacy/components/cards/activity/activity.html, src/app/modules/modals/remind-composer/remind-composer.ts files
1 merge request!436[Sprint/InterestingIguana](feat) Show error on hashtag limit when editing post #867
Pipeline #70759734 passed with stages
in 27 minutes and 39 seconds
......@@ -96,7 +96,7 @@ export class TopbarHashtagsService {
* Credit to Arnaud Valensi - http://geekcoder.org/js-extract-hashtags-from-text/
*/
sliceHashTags(inputText: any) {
sliceHashTags(inputText: string) {
const regex = /(?:^|\s)(?:#)([a-zA-Z\d]+)/gm;
let matches = [];
let match;
......
......@@ -29,7 +29,7 @@
>
<i class="material-icons">trending_up</i>
<a i18n="@@MINDS__CARDS__ACTIVITY__BOOSTED_LABEL" [hidden]="activity.boosted_onchain">Boosted</a>
<a i18n="@@MINDS__CARDS__ACTIVITY__BOOSTED_LABEL_ONCHAIN" [hidden]="!activity.boosted_onchain">Boosted Onchain</a>
<a i18n="@@MINDS__CARDS__ACTIVITY__BOOSTED_LABEL_ONCHAIN" [hidden]="!activity.boosted_onchain" [routerLink]="['/token']">Boosted Onchain</a>
</div>
<div class="mdl-card__supporting-text is-boosted" *ngIf="isUnlisted()">
<i class="material-icons unlisted">visibility_off</i>
......
......@@ -15,6 +15,7 @@ import { AttachmentService } from '../../../../../services/attachment';
export class Remind {
minds = window.Minds;
errorString: string = '';
activity: any;
@Input() boosted: boolean = false;
......
......@@ -73,6 +73,9 @@ export class RemindComposerModal {
this.closed.next(true);
}
/**
* Save the remind and close the popup.
*/
send() {
if (this.hashtagsService.sliceHashTags(this.message).length > 5) {
this.error = `You have exceeded the maximum 5 hashtags in a post`;
......
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