Skip to content
Commits on Source (9)
......@@ -12,7 +12,8 @@ stages:
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- dist
- dist/en
- dist/vi
policy: pull
test:
......@@ -22,7 +23,7 @@ test:
- npm install # Should be cached...
- npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
build:staging:
build:review:
stage: build
script:
- npm install # TODO: Why is this needed?
......@@ -35,9 +36,6 @@ build:staging:
paths:
- dist
policy: push
only:
variables:
- $CI_COMMIT_MESSAGE =~ /-subdomain/
except:
refs:
- master
......@@ -55,7 +53,7 @@ build:production:en:
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- dist
- dist/en
policy: push
only:
refs:
......@@ -73,7 +71,7 @@ build:production:i18n:
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- dist
- dist/vi
policy: push
only:
refs:
......@@ -87,41 +85,55 @@ prepare:
- docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY}
- docker build -t $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF -f containers/front-init/Dockerfile dist/.
- docker push $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF
environment:
name: staging
except:
refs:
- master
- test/gitlab-ci
deploy:staging:
deploy:review:
stage: deploy
image: minds/helm-eks:latest
script:
- aws eks update-kubeconfig --name=sandbox
- STAGING_SUBDOMAIN=$(echo $CI_COMMIT_MESSAGE | sed -n 's/.* -subdomain=\([^ ]*\).*/\1/p')
- echo "Subdomain will be setup at $STAGING_SUBDOMAIN"
- git clone --branch=sandbox-wip https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/minds/helm-charts.git
- "helm upgrade \
--install \
--reuse-values \
--set frontInit.image.repository=$CI_REGISTRY_IMAGE/front-init \
--set frontInit.image.tag=$CI_BUILD_REF \
--set domain=$STAGING_SUBDOMAIN.$STAGING_DOMAIN \
--set elasticsearch.clusterName=$STAGING_SUBDOMAIN-elasticsearch \
--set domain=$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN \
--set elasticsearch.clusterName=$CI_BUILD_REF_SLUG--elasticsearch \
--wait \
$STAGING_SUBDOMAIN \
$CI_BUILD_REF_SLUG \
./helm-charts/minds"
environment:
name: staging
only:
variables:
- $CI_COMMIT_MESSAGE =~ /-subdomain/
name: review/$CI_COMMIT_REF_NAME
url: https://$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN
on_stop: deploy:review:stop
except:
refs:
- master
- test/gitlab-ci
deploy:review:stop:
stage: deploy
image: minds/helm-eks:latest
script:
- aws eks update-kubeconfig --name=sandbox
- helm del --purge $CI_BUILD_REF_SLUG
environment:
name: review/$CI_COMMIT_REF_NAME
url: https://$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN
action: stop
variables:
GIT_STRATEGY: none
when: manual
except:
refs:
- master
- test/gitlab-ci
deploy:production:
stage: deploy
image: minds/ci:latest
......
......@@ -79,6 +79,14 @@ 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';
......@@ -90,7 +98,6 @@ 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: /(^|\s|\W)@(\w*[a-zA-Z_-]+\w*)/gim,
rule: /(^|\W)@([a-z0-9_\-\.]+[a-z0-9_])(\W|$)/gmi,
replace: (m) => {
return `${m.match[1]}<a class="tag" href="/${m.match[2]}" target="_blank">@${m.match[2]}</a>`;
return `${m.match[1]}<a class="tag" href="/${m.match[2]}" target="_blank">@${m.match[2]}</a>${m.match[3]}`;
}
}
};
......
......@@ -68,7 +68,7 @@
*ngIf="(!group['is:creator'] || (session.isAdmin()) && !group['is:invited'])"
>
</minds-groups-join-button>
<button class="m-btn m-btn--slim m-btn--with-icon" [class.m-pulsating--small]="group.hasGathering" style="margin-left: 8;" (click)="videochat.activate(group)" *ngIf="!group.videoChatDisabled">
<button class="m-btn m-btn--slim m-btn--with-icon" [class.m-pulsating--small]="group.hasGathering$ | async" style="margin-left: 8;" (click)="videochat.activate(group)" *ngIf="!group.videoChatDisabled">
<span class="m-gatheringIcon">Gathering</span>
<i class="material-icons">video_call</i>
</button>
......
import { Component, ViewChild, ChangeDetectorRef, HostListener, Input } from '@angular/core';
import { ActivatedRoute, ChildActivationEnd, NavigationEnd, Router } from '@angular/router';
import { ChangeDetectorRef, Component, HostListener, ViewChild } from '@angular/core';
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
import { Subscription } from 'rxjs';
import { interval, Subscription } from 'rxjs';
import { GroupsService } from '../groups-service';
......@@ -16,7 +16,7 @@ import { Client } from '../../../services/api';
import { HashtagsSelectorComponent } from '../../hashtags/selector/selector.component';
import { VideoChatService } from '../../videochat/videochat.service';
import { UpdateMarkersService } from '../../../common/services/update-markers.service';
import { filter } from "rxjs/operators";
import { filter, map, startWith, throttle } from "rxjs/operators";
@Component({
selector: 'm-groups--profile',
......@@ -181,12 +181,18 @@ export class GroupsProfile {
this.updateMarkersSubscription.unsubscribe();
this.updateMarkersSubscription = this.updateMarkers.getByEntityGuid(this.guid).subscribe((marker => {
// this.updateMarkersSubscription = this.updateMarkers.markers.subscribe(markers => {
if (!marker)
return;
this.group.hasGathering = marker && marker.entity_guid == this.group.guid
&& marker.marker == 'gathering-heartbeat'
&& marker.updated_timestamp > (Date.now() / 1000) - 60;
this.group.hasGathering$ = interval(1000).pipe(
throttle(() => interval(2000)), //only allow once per 2 seconds
startWith(0),
map(() => [marker].filter(marker => marker.entity_guid == this.group.guid
&& marker.marker == 'gathering-heartbeat'
&& marker.updated_timestamp > (Date.now() / 1000) - 60 //1 minute tollerance
).length > 0)
);
let hasMarker =
(marker.read_timestamp < marker.updated_timestamp)
......
......@@ -42,73 +42,6 @@
</section>
<ng-container *mExperiment="'Homepage200619';bucket:'base'">
<section class="m-homepage--section m-homepage" style="padding-top:0; padding-bottom: 0;">
<div class="m-homepage--section--grid">
<h2 style="text-align: center; width: 100%" i18n="@@MINDS__HOME__HOMEPAGE__OUT_CORE_PRINCIPLES">Our core principles</h2>
</div>
<div class="m-homepage--section--grid">
<div class="m-homepage--section--grid-col">
<i class="material-icons">language</i>
<h4 class="" i18n="@@HOMEPAGE__NONPARTISAN_SUBTITLE">
Nonpartisan (r)evolution of ideas and <b>global consciousness</b>
</h4>
</div>
<div class="m-homepage--section--grid-col">
<i class="material-icons">record_voice_over</i>
<h4 class="" i18n="@@HOMEPAGE__REAL_WORLD_SOLUTIONS_SUBTITLE">
<b>Real world solutions</b> with free speech,
co-ownership and open discourse
</h4>
</div>
<div class="m-homepage--section--grid-col">
<i class="material-icons">favorite</i>
<h4 class="" i18n="@@HOMEPAGE__PRIVACY_AND_TRANSPARENCY_SUBTITLE">
Privacy and transparency with encryption and
<b>open source software</b>
</h4>
</div>
</div>
</section>
<section class="m-marketing--section" style="padding-top: 8px; padding-bottom: 16px;">
<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.3.pdf">Whitepaper (PDF)</a>
<a class="m-btn m-btn--slim m-btn--action" target="_blank" routerLink="/tokens">Get Tokens</a>
</div>
</section>
<span class="mdl-color--grey-100" style="width: 100%; height: 1px; display: block;"></span>
<div class="mdl-grid mdl-grid--no-spacing m-homepage--stream">
<h4 class="mdl-color-text--blue-grey-200 mdl-cell--12-col" i18n="@@HOMEPAGE__FEATURED_POSTS_TITLE">Featured Posts</h4>
<section class="mdl-cell mdl-cell--4-col">
<minds-activity [object]="activity" *ngFor="let activity of stream[1]"></minds-activity>
</section>
<section class="mdl-cell mdl-cell--4-col">
<minds-activity [object]="activity" *ngFor="let activity of stream[2]"></minds-activity>
</section>
<section class="mdl-cell mdl-cell--4-col">
<minds-activity [object]="activity" *ngFor="let activity of stream[3]"></minds-activity>
</section>
<div [hidden]="!inProgress" style="width:100%; text-align:center; ">
<div class="mdl-spinner mdl-js-spinner is-active" [mdl] style="margin: 16px auto;"></div>
</div>
<div class="m-homepage--fader" [hidden]="inProgress" *ngIf="false">
<div class="m-homepage--fader--load-more" (click)="loadStream()" i18n="@@MINDS__HOME__HOMEPAGE__SEE_MORE_ACTION">Click To See more</div>
</div>
</div>
</ng-container>
<div class="mdl-grid mdl-grid--no-spacing m-homepage--footer">
<section class="mdl-cell mdl-cell--12-col m-footer">
......
......@@ -94,7 +94,7 @@ export class NotificationsComponent {
this.inProgress = true;
this.client.get(`api/v1/notifications/${this._filter}`, { limit: 24, offset: this.offset })
this.client.get(`api/v1/notifications/${this._filter}`, { limit: 12, offset: this.offset })
.then((data: any) => {
if (!data.notifications) {
......