Skip to content
Commits on Source (9)
......@@ -6,8 +6,16 @@ services:
stages:
- test
- build
- prepare
- deploy
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- dist/en
- dist/vi
policy: pull
test:
image: circleci/node:8-browsers
stage: test
......@@ -15,7 +23,25 @@ test:
- npm install # Should be cached...
- npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
build:
build:review:
stage: build
script:
- npm install # TODO: Why is this needed?
- npm run postinstall
- npm install -g gulp-cli
- gulp build.sass && gulp build.sass ##weird build needs to be run twice for now
- sh build/base-locale.sh dist
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- dist
policy: push
except:
refs:
- master
- test/gitlab-ci
build:production:en:
stage: build
script:
- npm install # TODO: Why is this needed?
......@@ -25,25 +51,95 @@ build:
- sh build/base-locale.sh dist https://cdn-assets.minds.com/front/dist
- sh build/i18n-locales-all.sh dist https://cdn-assets.minds.com/front/dist
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- dist
- dist/en
policy: push
only:
refs:
- master
- test/gitlab-ci
deploy:
build:production:i18n:
stage: build
script:
- npm install # TODO: Why is this needed?
- npm run postinstall
- npm install -g gulp-cli
- gulp build.sass --deploy-url=https://cdn-assets.minds.com/front/dist/en && gulp build.sass --deploy-url=https://cdn-assets.minds.com/front/dist/en ##weird build needs to be run twice for now
- sh build/i18n-locales-all.sh dist https://cdn-assets.minds.com/front/dist
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- dist/vi
policy: push
only:
refs:
- master
- test/gitlab-ci
prepare:
stage: prepare
image: minds/ci:latest
script:
- 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
except:
refs:
- master
- test/gitlab-ci
deploy:review:
stage: deploy
image: minds/helm-eks:latest
script:
- aws eks update-kubeconfig --name=sandbox
- 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=$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN \
--set elasticsearch.clusterName=$CI_BUILD_REF_SLUG--elasticsearch \
--wait \
$CI_BUILD_REF_SLUG \
./helm-charts/minds"
environment:
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
script:
- apk add --no-cache python py-pip
- pip install awscli
- aws s3 sync dist $REPOSITORY_URL
- aws ecs update-service --service=$SERVICE --force-new-deployment --region us-east-1 --cluster=$CLUSTER
cache:
paths:
- dist
policy: pull
only:
refs:
- master
......
FROM alpine:edge
COPY . dist
## Hack to make initial laguage load
COPY en/index.php dist/index.php
\ No newline at end of file
......@@ -11,7 +11,8 @@
<m-sort-selector
[algorithm]="algorithm"
[period]="period"
[customType]="customType"
[allowedCustomTypes]="['activities', 'images', 'videos', 'blogs']"
(onChange)="setSort($event.algorithm, $event.period, $event.customType)"
></m-sort-selector>
</div>
......
.m-firehose {
max-width: 1280px;
minds-activity {
.item-image-video {
video {
width:100%;
height:auto;
max-height: 400px;
}
}
.item-image {
img {
width: 100%;
max-height: 400px;
object-fit: contain;
}
}
minds-rich-embed {
.thumbnail {
img {
width: auto;
max-height: 400px;
}
}
}
}
.m-firehose__moderatorAction {
display: flex;
align-items: center;
......@@ -9,7 +36,6 @@
margin-bottom: 25px;
max-width: 270px;
&.m-firehose__moderatorAction--leftButton {
justify-content: right;
}
......@@ -38,5 +64,4 @@
.m-firehose__spinner {
text-align: center;
}
}
......@@ -28,7 +28,7 @@ class MindsActivityMockComponent {
class MindsSortSelectorMockComponent {
@Input() algorithm: string;
@Input() period: string;
@Input() customType: string;
@Input() allowedCustomTypes: Array<string>;
@Output() onChange: EventEmitter<any> = new EventEmitter<any>();
}
......
......@@ -60,7 +60,7 @@ export class AdminFirehoseComponent implements OnInit, OnDestroy {
this.algorithm = 'top';
this.updateSortRoute();
}
this.entity = null;
this.load();
});
......@@ -83,7 +83,6 @@ export class AdminFirehoseComponent implements OnInit, OnDestroy {
try {
const url = `api/v2/admin/firehose/${this.algorithm}/${this.customType}?hashtags=${hashtags}&period=${period}&all=${all}`;
console.log(url);
const response: any = await this.client.get(url);
this.entities = response.entities;
......
......@@ -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) {
......