diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000000..f6564231d29 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +electron_app/dist/ +lib/ +node_modules/ +webapp/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000000..a4c6a689a53 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +# Multistage Docker Build for aloha-talk-web +# https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds + +FROM docker.io/node:carbon AS build + +WORKDIR /aloha/build + +COPY . . + +RUN npm install + +RUN npm run build + +FROM docker.io/nginx:1.15-alpine AS install + +# Use a build time arg to set target context: --build-arg context= +ARG context=minikube + +WORKDIR /aloha/aloha-talk + +COPY --from=build /aloha/build/devops/nginx/nginx.conf /etc/nginx/nginx.conf + +COPY --from=build /aloha/build/webapp . + +COPY --from=build /aloha/build/devops/contexts/${context}/config.localhost.json . diff --git a/Makefile b/Makefile new file mode 100644 index 00000000000..095369e8981 --- /dev/null +++ b/Makefile @@ -0,0 +1,33 @@ +#=============================================================================== +# aloha-network-web Development +# This makefile is for use within a local development context. +#=============================================================================== +ALOHA_TALK = aloha-talk-web +ALOHA_TALK_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) + +BUILD_TAG ?= latest +ALOHA_TALK_IMAGE := $(ALOHA_TALK):$(BUILD_TAG) + +build-talk: ## build docker image + docker build -t $(ALOHA_TALK_IMAGE) $(ALOHA_TALK_DIR) + +push-talk: ## tag and push to image repository + docker tag $(ALOHA_TALK_IMAGE) gcr.io/aloha-internal/$(ALOHA_TALK_IMAGE) + docker push gcr.io/aloha-internal/$(ALOHA_TALK_IMAGE) + +clean-talk: ## clean build artifacts + rm -rf $(ALOHA_TALK_DIR)/node_modules + rm -rf $(ALOHA_TALK_DIR)/lib + rm -rf $(ALOHA_TALK_DIR)/webapp + rm -rf $(ALOHA_TALK_DIR)/electron_app/dist + +### Kubernetes Deployment +CONTEXT ?= minikube + +deploy-talk: + kubectl --context=$(CONTEXT) \ + apply -f $(ALOHA_TALK_DIR)/devops/contexts/$(CONTEXT)/deployment.yml + +undeploy-talk: + kubectl --context=$(CONTEXT) \ + delete deployment $(ALOHA_TALK) diff --git a/devops/contexts/minikube/config.localhost.json b/devops/contexts/minikube/config.localhost.json new file mode 100644 index 00000000000..b928dd9f92c --- /dev/null +++ b/devops/contexts/minikube/config.localhost.json @@ -0,0 +1,25 @@ +{ + "default_hs_url": "https://localhost:8448", + "disable_custom_urls": false, + "disable_guests": false, + "disable_login_language_selector": false, + "disable_3pid_login": false, + "brand": "Aloha Health Network", + "integrations_ui_url": "https://scalar.vector.im/", + "integrations_rest_url": "https://scalar.vector.im/api", + "bug_report_endpoint_url": "https://riot.im/bugreports/submit", + "features": { + "feature_groups": "labs", + "feature_pinning": "labs" + }, + "default_federate": true, + "welcomePageUrl": "home.html", + "default_theme": "blue", + "roomDirectory": { + "servers": ["localhost"] + }, + "welcomeUserId": "@aloha:localhost", + "enable_presence_by_hs_url": { + "https://localhost:8448": false + } +} diff --git a/devops/contexts/minikube/deployment.yml b/devops/contexts/minikube/deployment.yml new file mode 100644 index 00000000000..4b7f0826850 --- /dev/null +++ b/devops/contexts/minikube/deployment.yml @@ -0,0 +1,66 @@ +#=============================================================================== +# aloha-talk-web Development Configuration +# +# This collection of yaml documents is for use within a local minikube +# deployment context. You can modify them and safely reconfigure kubernetes at +# any time with the command: +# kubectl apply --context=my_context --namespace=namespace -f ./deployment.yml +#=============================================================================== +--- +# aloha-talk-web Service +# https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/ +apiVersion: v1 +kind: Service +metadata: + labels: + app: aloha-talk-web + name: aloha-talk-web + selfLink: /api/v1/namespaces/default/services/aloha-talk-web +spec: + ports: + - name: http + protocol: TCP + targetPort: http # named container port + port: 8080 # external service port + nodePort: 30080 # external node (host) port + - name: https + targetPort: https # named container port + port: 8443 # external service port + nodePort: 30443 # external node (host) port + selector: + app: aloha-talk-web + sessionAffinity: None + type: NodePort +--- +# aloha-talk-web Deployment +# https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: aloha-talk-web +spec: + selector: + matchLabels: + app: aloha-talk-web + replicas: 1 + template: + metadata: + labels: + app: aloha-talk-web + spec: + imagePullSecrets: + - name: aloha-gcr-io + containers: + - name: aloha-talk-web + ## Use the container registry image by default + image: gcr.io/aloha-internal/aloha-talk-web:latest + imagePullPolicy: Always + ## Use the local image when developing + # image: aloha-talk-web:latest + # imagePullPolicy: Never + env: + ports: + - containerPort: 8080 + name: http + - containerPort: 8443 + name: https diff --git a/devops/nginx/nginx.conf b/devops/nginx/nginx.conf new file mode 100644 index 00000000000..65514adc31a --- /dev/null +++ b/devops/nginx/nginx.conf @@ -0,0 +1,77 @@ +#user nginx:nginx; +worker_processes 1; + +#error_log logs/error.log; +#error_log logs/error.log notice; +#error_log logs/error.log info; + +#pid logs/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + include mime.types; + default_type application/octet-stream; + + #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + # '$status $body_bytes_sent "$http_referer" ' + # '"$http_user_agent" "$http_x_forwarded_for"'; + + #access_log logs/access.log main; + + sendfile on; + #tcp_nopush on; + + #keepalive_timeout 0; + keepalive_timeout 65; + + gzip on; + + server { + listen 8080; + server_name localhost; + + #access_log logs/host.access.log main; + + location / { + root /aloha/aloha-talk; + index index.html index.js; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + #error_page 500 502 503 504 /50x.html; + #location = /50x.html { + # root html; + #} + } + + # HTTPS server + # + #server { + # listen 8443 ssl; + # server_name localhost; + + # ssl_certificate cert.pem; + # ssl_certificate_key cert.key; + + # ssl_session_cache shared:SSL:1m; + # ssl_session_timeout 5m; + + # ssl_ciphers HIGH:!aNULL:!MD5; + # ssl_prefer_server_ciphers on; + + # location / { + # root html; + # index index.html index.htm; + # } + #} + + #include servers/*; +} diff --git a/docs/theming.md b/docs/theming.md index c6373e52b66..f6a6993c514 100644 --- a/docs/theming.md +++ b/docs/theming.md @@ -2,7 +2,7 @@ Theming Riot ============ Themes are a very basic way of providing simple alternative look & feels to the -riot-web app via CSS & custom imagery. +riot-web app via CSS & custom imagery. They are *NOT* co be confused with 'skins', which describe apps which sit on top of matrix-react-sdk - e.g. in theory Riot itself is a react-sdk skin. diff --git a/electron_app/riot.im/config.json b/electron_app/riot.im/config.json index 10b453a469d..551154398ad 100644 --- a/electron_app/riot.im/config.json +++ b/electron_app/riot.im/config.json @@ -25,3 +25,38 @@ "https://matrix.org": false } } + +{ + "default_hs_url": "https://matrix.org", + "default_is_url": "https://vector.im", + "disable_custom_urls": false, + "disable_guests": false, + "disable_login_language_selector": false, + "disable_3pid_login": false, + "brand": "Riot", + "integrations_ui_url": "https://scalar.vector.im/", + "integrations_rest_url": "https://scalar.vector.im/api", + "bug_report_endpoint_url": "https://riot.im/bugreports/submit", + "features": { + "feature_groups": "labs", + "feature_pinning": "labs" + }, + "default_federate": true, + "welcomePageUrl": "home.html", + "default_theme": "blue", + "roomDirectory": { + "servers": [ + "matrix.org" + ] + }, + "welcomeUserId": "@riot-bot:matrix.org", + "piwik": { + "url": "https://piwik.riot.im/", + "whitelistedHSUrls": ["https://matrix.org"], + "whitelistedISUrls": ["https://vector.im", "https://matrix.org"], + "siteId": 1 + }, + "enable_presence_by_hs_url": { + "https://matrix.org": false + } +} diff --git a/package-lock.json b/package-lock.json index f3f58e50017..e0bf10ab7b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "riot-web", - "version": "0.12.2", + "version": "0.15.4", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -260,6 +260,16 @@ "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", "dev": true }, + "array-includes": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", + "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "dev": true, + "requires": { + "define-properties": "1.1.2", + "es-abstract": "1.9.0" + } + }, "array-map": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", @@ -299,16 +309,6 @@ "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", "dev": true }, - "array.prototype.find": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/array.prototype.find/-/array.prototype.find-2.0.4.tgz", - "integrity": "sha1-VWpcU2LAhkgyPdrrnenRS8GGTJA=", - "dev": true, - "requires": { - "define-properties": "1.1.2", - "es-abstract": "1.9.0" - } - }, "arraybuffer.slice": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz", @@ -1877,17 +1877,6 @@ "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, - "commonmark": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/commonmark/-/commonmark-0.27.0.tgz", - "integrity": "sha1-2GwmK5YoIelIPGnFR7xYhAwEezQ=", - "requires": { - "entities": "1.1.1", - "mdurl": "1.0.1", - "minimist": "1.2.0", - "string.prototype.repeat": "0.2.0" - } - }, "compare-version": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/compare-version/-/compare-version-0.1.2.tgz", @@ -2414,22 +2403,6 @@ "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=", "dev": true }, - "disposables": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/disposables/-/disposables-1.0.1.tgz", - "integrity": "sha1-BkcnoltU9QK9griaot+4358bOeM=" - }, - "dnd-core": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/dnd-core/-/dnd-core-2.5.4.tgz", - "integrity": "sha512-BcI782MfTm3wCxeIS5c7tAutyTwEIANtuu3W6/xkoJRwiqhRXKX3BbGlycUxxyzMsKdvvoavxgrC3EMPFNYL9A==", - "requires": { - "asap": "2.0.6", - "invariant": "2.2.2", - "lodash": "4.17.4", - "redux": "3.7.2" - } - }, "doctrine": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.2.3.tgz", @@ -3202,16 +3175,54 @@ } }, "eslint-plugin-react": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-6.10.3.tgz", - "integrity": "sha1-xUNb6wZ3ThLH2y9qut3L+QDNP3g=", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.10.0.tgz", + "integrity": "sha512-18rzWn4AtbSUxFKKM7aCVcj5LXOhOKdwBino3KKWy4psxfPW0YtIbE8WNRDUdyHFL50BeLb6qFd4vpvNYyp7hw==", "dev": true, "requires": { - "array.prototype.find": "2.0.4", - "doctrine": "1.2.3", - "has": "1.0.1", - "jsx-ast-utils": "1.4.1", - "object.assign": "4.0.4" + "doctrine": "2.1.0", + "has": "1.0.3", + "jsx-ast-utils": "2.0.1", + "prop-types": "15.6.2" + }, + "dependencies": { + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "2.0.2" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "1.1.1" + } + }, + "jsx-ast-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz", + "integrity": "sha1-6AGxs5mF4g//yHtA43SAgOLcrH8=", + "dev": true, + "requires": { + "array-includes": "3.0.3" + } + }, + "prop-types": { + "version": "15.6.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", + "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", + "dev": true, + "requires": { + "loose-envify": "1.3.1", + "object-assign": "4.1.1" + } + } } }, "espree": { @@ -3699,6 +3710,22 @@ } } }, + "focus-trap": { + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-2.4.6.tgz", + "integrity": "sha512-vWZTPtBU6pBoyWZDRZJHkXsyP2ZCZBHE3DRVXnSVdQKH/mcDtu9S5Kz8CUDyIqpfZfLEyI9rjKJLnc4Y40BRBg==", + "requires": { + "tabbable": "1.1.3" + } + }, + "focus-trap-react": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/focus-trap-react/-/focus-trap-react-3.1.2.tgz", + "integrity": "sha512-MoQmONoy9gRPyrC5DGezkcOMGgx7MtIOAQDHe098UtL2sA2vmucJwEmQisb+8LRXNYFHxuw5zJ1oLFeKu4Mteg==", + "requires": { + "focus-trap": "2.4.6" + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -4959,11 +4986,6 @@ "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==" }, - "hoist-non-react-statics": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.3.1.tgz", - "integrity": "sha1-ND24TGAYxlB3iJgkATWhQg7iLOA=" - }, "home-or-tmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", @@ -5696,12 +5718,6 @@ "verror": "1.10.0" } }, - "jsx-ast-utils": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz", - "integrity": "sha1-OGchPo3Xm/Ho8jAMDPwe+xgsDfE=", - "dev": true - }, "karma": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/karma/-/karma-1.7.1.tgz", @@ -6049,6 +6065,11 @@ } } }, + "lolex": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.3.2.tgz", + "integrity": "sha512-A5pN2tkFj7H0dGIAM6MFvHKMJcPnjZsOMvR7ujCjfgW5TbV6H9vb1PgxLtHvjqNZTHsUolz+6/WEO0N1xNx2ng==" + }, "longest": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", @@ -6108,11 +6129,12 @@ "dev": true }, "matrix-js-sdk": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/matrix-js-sdk/-/matrix-js-sdk-0.8.2.tgz", - "integrity": "sha1-e7mrVoXrNCFLOFlMiDn++pY2ViE=", + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/matrix-js-sdk/-/matrix-js-sdk-0.10.3.tgz", + "integrity": "sha512-/FZTANPjshEZad5+9Au/p+ByO4mq9L+6Quw1GpPgP9ztNYt1fCq41/wTY7KliaksmuxTvIi+xnLBQWkn65ID1g==", "requires": { "another-json": "0.2.0", + "babel-runtime": "6.26.0", "bluebird": "3.5.1", "browser-request": "0.3.3", "content-type": "1.0.4", @@ -6130,9 +6152,9 @@ } }, "matrix-react-sdk": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/matrix-react-sdk/-/matrix-react-sdk-0.10.2.tgz", - "integrity": "sha1-TNSwkN1P4Jsl4Yh5Z/XOE17U8q4=", + "version": "0.12.6", + "resolved": "https://registry.npmjs.org/matrix-react-sdk/-/matrix-react-sdk-0.12.6.tgz", + "integrity": "sha512-4xJNsdHh8t+zHU87M3dSjM96s3uhvcj0iTMBqfnqBTvSBjt5xOG9mIgqclnD4SjMwrEEtO0eYZS4fdMTkVOD0Q==", "requires": { "babel-runtime": "6.26.0", "bluebird": "3.5.1", @@ -6140,7 +6162,7 @@ "browser-encrypt-attachment": "0.3.0", "browser-request": "0.3.3", "classnames": "2.2.5", - "commonmark": "0.27.0", + "commonmark": "0.28.1", "counterpart": "0.18.3", "draft-js": "0.11.0-alpha", "draft-js-export-html": "0.6.0", @@ -6149,17 +6171,24 @@ "file-saver": "1.3.3", "filesize": "3.5.6", "flux": "2.1.1", + "focus-trap-react": "3.1.2", "fuse.js": "2.7.4", + "gemini-scrollbar": "github:matrix-org/gemini-scrollbar#b302279810d05319ac5ff1bd34910bff32325c7b", + "gfm.css": "1.1.1", "glob": "5.0.15", - "highlight.js": "8.9.1", + "highlight.js": "9.12.0", "isomorphic-fetch": "2.2.1", "linkifyjs": "2.1.5", "lodash": "4.17.4", - "matrix-js-sdk": "0.8.2", + "lolex": "2.3.2", + "matrix-js-sdk": "0.10.3", "optimist": "0.6.1", + "pako": "1.0.6", "prop-types": "15.6.0", + "querystring": "0.2.0", "react": "15.6.2", "react-addons-css-transition-group": "15.3.2", + "react-beautiful-dnd": "4.0.1", "react-dom": "15.6.2", "react-gemini-scrollbar": "github:matrix-org/react-gemini-scrollbar#5e97aef7e034efc8db1431f4b0efe3b26e249ae9", "sanitize-html": "1.14.1", @@ -6169,10 +6198,28 @@ "whatwg-fetch": "1.1.1" }, "dependencies": { - "highlight.js": { - "version": "8.9.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-8.9.1.tgz", - "integrity": "sha1-uKnFSTISqTkvAiK2SclhFJfr+4g=" + "commonmark": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/commonmark/-/commonmark-0.28.1.tgz", + "integrity": "sha1-Buq41SM4uDn6Gi11rwCF7tGxvq4=", + "requires": { + "entities": "1.1.1", + "mdurl": "1.0.1", + "minimist": "1.2.0", + "string.prototype.repeat": "0.2.0" + } + }, + "react-gemini-scrollbar": { + "version": "github:matrix-org/react-gemini-scrollbar#5e97aef7e034efc8db1431f4b0efe3b26e249ae9", + "requires": { + "gemini-scrollbar": "github:matrix-org/gemini-scrollbar#b302279810d05319ac5ff1bd34910bff32325c7b" + } + }, + "velocity-vector": { + "version": "github:vector-im/velocity#059e3b2348f1110888d033974d3109fd5a3af00f", + "requires": { + "jquery": "3.2.1" + } }, "whatwg-fetch": { "version": "1.1.1", @@ -6202,6 +6249,11 @@ "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", "dev": true }, + "memoize-one": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-3.1.1.tgz", + "integrity": "sha512-YqVh744GsMlZu6xkhGslPSqSurOv6P+kLN2J3ysBZfagLcL5FdRK/0UpgLoL8hwjjEvvAVkjJZyFP+1T6p1vgA==" + }, "memory-fs": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", @@ -6611,25 +6663,6 @@ "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", "dev": true }, - "object.assign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.0.4.tgz", - "integrity": "sha1-scnMBE7xuf5jYG/BQau7MuFHMMw=", - "dev": true, - "requires": { - "define-properties": "1.1.2", - "function-bind": "1.1.1", - "object-keys": "1.0.11" - }, - "dependencies": { - "object-keys": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", - "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=", - "dev": true - } - } - }, "object.entries": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.0.4.tgz", @@ -7344,6 +7377,19 @@ "integrity": "sha1-DPf4T5Rj/wrlHExLFC2VvjdyTZw=", "dev": true }, + "raf": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.0.tgz", + "integrity": "sha512-pDP/NMRAXoTfrhCfyfSEwJAKLaxBU9eApMeBPB1TkDouZmvPerIClV8lTAd+uF8ZiTaVl69e1FCxQrAd/VTjGw==", + "requires": { + "performance-now": "2.1.0" + } + }, + "raf-schd": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/raf-schd/-/raf-schd-2.1.2.tgz", + "integrity": "sha512-Orl0IEvMtUCgPddgSxtxreK77UiQz4nPYJy9RggVzu4mKsZkQWiAaG1y9HlYWdvm9xtN348xRaT37qkvL/+A+g==" + }, "randomatic": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", @@ -7448,25 +7494,21 @@ "integrity": "sha1-wStu/cIkfBDae4dw0YUICnsEcVY=", "dev": true }, - "react-dnd": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/react-dnd/-/react-dnd-2.5.4.tgz", - "integrity": "sha512-y9YmnusURc+3KPgvhYKvZ9oCucj51MSZWODyaeV0KFU0cquzA7dCD1g/OIYUKtNoZ+MXtacDngkdud2TklMSjw==", + "react-beautiful-dnd": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/react-beautiful-dnd/-/react-beautiful-dnd-4.0.1.tgz", + "integrity": "sha512-d73RMu4QOFCyjUELLWFyY/EuclnfqulI9pECx+2gIuJvV0ycf1uR88o+1x0RSB9ILD70inHMzCBKNkWVbbt+vA==", "requires": { - "disposables": "1.0.1", - "dnd-core": "2.5.4", - "hoist-non-react-statics": "2.3.1", + "babel-runtime": "6.26.0", "invariant": "2.2.2", - "lodash": "4.17.4", - "prop-types": "15.6.0" - } - }, - "react-dnd-html5-backend": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/react-dnd-html5-backend/-/react-dnd-html5-backend-2.5.4.tgz", - "integrity": "sha512-jDqAkm/hI8Tl4HcsbhkBgB6HgpJR1e+ML1SbfxaegXYiuMxEVQm0FOwEH5WxUoo6fmIG4N+H0rSm59POuZOCaA==", - "requires": { - "lodash": "4.17.4" + "memoize-one": "3.1.1", + "prop-types": "15.6.0", + "raf-schd": "2.1.2", + "react-motion": "0.5.2", + "react-redux": "5.0.7", + "redux": "3.7.2", + "redux-thunk": "2.3.0", + "reselect": "3.0.1" } }, "react-dom": { @@ -7480,10 +7522,51 @@ "prop-types": "15.6.0" } }, - "react-gemini-scrollbar": { - "version": "github:matrix-org/react-gemini-scrollbar#5e97aef7e034efc8db1431f4b0efe3b26e249ae9", + "react-motion": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/react-motion/-/react-motion-0.5.2.tgz", + "integrity": "sha512-9q3YAvHoUiWlP3cK0v+w1N5Z23HXMj4IF4YuvjvWegWqNPfLXsOBE/V7UvQGpXxHFKRQQcNcVQE31g9SB/6qgQ==", "requires": { - "gemini-scrollbar": "github:matrix-org/gemini-scrollbar#b302279810d05319ac5ff1bd34910bff32325c7b" + "performance-now": "0.2.0", + "prop-types": "15.6.0", + "raf": "3.4.0" + }, + "dependencies": { + "performance-now": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=" + } + } + }, + "react-redux": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-5.0.7.tgz", + "integrity": "sha512-5VI8EV5hdgNgyjfmWzBbdrqUkrVRKlyTKk1sGH3jzM2M2Mhj/seQgPXaz6gVAj2lz/nz688AdTqMO18Lr24Zhg==", + "requires": { + "hoist-non-react-statics": "2.5.5", + "invariant": "2.2.2", + "lodash": "4.17.10", + "lodash-es": "4.17.10", + "loose-envify": "1.3.1", + "prop-types": "15.6.0" + }, + "dependencies": { + "hoist-non-react-statics": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", + "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" + }, + "lodash-es": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.10.tgz", + "integrity": "sha512-iesFYPmxYYGTcmQK0sL8bX3TGHyM6b2qREaB4kamHfQyfPJP0xgoGxp19nsH16nsfquLdiyKyX3mQkfiSGV8Rg==" + } } }, "read-all-stream": { @@ -7591,6 +7674,11 @@ "symbol-observable": "1.0.4" } }, + "redux-thunk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.3.0.tgz", + "integrity": "sha512-km6dclyFnmcvxhAcrQV2AkZmPQjzPDjgVlQtR0EQjxZPyJ0BnMf3in1ryuR8A2qU0HldVRfxYXbFSKlI3N7Slw==" + }, "regenerate": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz", @@ -7863,6 +7951,11 @@ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", "dev": true }, + "reselect": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-3.0.1.tgz", + "integrity": "sha1-79qpjqdFEyTQkrKyFjpqHXqaIUc=" + }, "resolve": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz", @@ -8360,30 +8453,36 @@ "dev": true }, "source-map-loader": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-0.1.6.tgz", - "integrity": "sha1-wJkD2m1zueU7ftjuUkVZcFHpjpE=", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-0.2.3.tgz", + "integrity": "sha512-MYbFX9DYxmTQFfy2v8FC1XZwpwHKYxg3SK8Wb7VPBKuhDjz8gi9re2819MsG4p49HDyiOSUKlmZ+nQBArW5CGw==", "dev": true, "requires": { - "async": "0.9.2", + "async": "2.6.1", "loader-utils": "0.2.17", - "source-map": "0.1.43" + "source-map": "0.6.1" }, "dependencies": { "async": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", - "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", - "dev": true - }, - "source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", "dev": true, "requires": { - "amdefine": "1.0.1" + "lodash": "4.17.10" } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -8582,6 +8681,11 @@ "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=" }, + "tabbable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-1.1.3.tgz", + "integrity": "sha512-nOWwx35/JuDI4ONuF0ZTo6lYvI0fY0tZCH1ErzY2EXfu4az50ZyiUX8X073FLiZtmWUVlkRnuXsehjJgCw9tYg==" + }, "table": { "version": "3.8.3", "resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz", @@ -9095,12 +9199,6 @@ "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", "dev": true }, - "velocity-vector": { - "version": "github:vector-im/velocity#059e3b2348f1110888d033974d3109fd5a3af00f", - "requires": { - "jquery": "3.2.1" - } - }, "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", diff --git a/res/home.html b/res/home.html index 934e491ecda..ac3ea11ac9f 100644 --- a/res/home.html +++ b/res/home.html @@ -9,7 +9,7 @@ margin-bottom: 0px; margin-top: 20px; margin-right: 20px; - color: #454545; + color: #212CC9; } .mx_HomePage_header h2 { @@ -17,11 +17,11 @@ margin-top: 5px; margin-bottom: 20px; margin-right: 20px; - color: #454545; + color: #a3a3a3; } .mx_HomePage_header h1 a { - color: #454545; + color: #212CC9; } .mx_HomePage h3 { @@ -29,8 +29,8 @@ } .mx_HomePage_header { - border: 1px solid #76CFA6; - background-color: #eaf5f0; + border: 1px solid #74adfd; + background-color: #dbf0ff; border-radius: 5px; align-items: center; } @@ -53,12 +53,10 @@ } .mx_HomePage_logo { - margin-top: 20px; margin-left: 40px; margin-right: 40px; - margin-bottom: 20px; display: inline; - height: 100px; + height: 150px; } .mx_HomePage_room { @@ -109,9 +107,9 @@ margin: 20px; } -.mx_HomePage_container h1, -.mx_HomePage_container h2, -.mx_HomePage_container h3, +.mx_HomePage_container h1, +.mx_HomePage_container h2, +.mx_HomePage_container h3, .mx_HomePage_container h4 { font-weight: 600; } @@ -119,10 +117,10 @@
- +
-

_t("Welcome to Riot.im")

-

_t("Decentralised, encrypted chat & collaboration powered by [matrix]")

+

_t("Welcome to WeHeal's Social Network")

+

_t("Decentralised, encrypted chat & collaboration powered by Aloha Health Network")

diff --git a/res/themes/riot/img/logos/aloha-logo-transparent.png b/res/themes/riot/img/logos/aloha-logo-transparent.png new file mode 100644 index 00000000000..b4b2b289af6 Binary files /dev/null and b/res/themes/riot/img/logos/aloha-logo-transparent.png differ diff --git a/res/themes/riot/img/logos/aloha-logo-words.png b/res/themes/riot/img/logos/aloha-logo-words.png new file mode 100644 index 00000000000..0d5380276e5 Binary files /dev/null and b/res/themes/riot/img/logos/aloha-logo-words.png differ diff --git a/res/themes/riot/img/logos/riot-im-logo-1.png b/res/themes/riot/img/logos/riot-im-logo-1.png deleted file mode 100644 index 768679da66c..00000000000 Binary files a/res/themes/riot/img/logos/riot-im-logo-1.png and /dev/null differ diff --git a/res/themes/riot/img/logos/riot-im-logo-1.svg b/res/themes/riot/img/logos/riot-im-logo-1.svg deleted file mode 100644 index a806c3bfda3..00000000000 --- a/res/themes/riot/img/logos/riot-im-logo-1.svg +++ /dev/null @@ -1,158 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/res/themes/riot/img/logos/riot-im-logo-2.svg b/res/themes/riot/img/logos/riot-im-logo-2.svg deleted file mode 100644 index f9cc92f13bb..00000000000 --- a/res/themes/riot/img/logos/riot-im-logo-2.svg +++ /dev/null @@ -1,165 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/res/themes/riot/img/logos/riot-im-logo-3.svg b/res/themes/riot/img/logos/riot-im-logo-3.svg deleted file mode 100644 index 7f81dacd72e..00000000000 --- a/res/themes/riot/img/logos/riot-im-logo-3.svg +++ /dev/null @@ -1,173 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/res/themes/riot/img/logos/riot-im-logo-4.svg b/res/themes/riot/img/logos/riot-im-logo-4.svg deleted file mode 100644 index 307868e604f..00000000000 --- a/res/themes/riot/img/logos/riot-im-logo-4.svg +++ /dev/null @@ -1,185 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/res/themes/riot/img/logos/riot-im-logo-5.svg b/res/themes/riot/img/logos/riot-im-logo-5.svg deleted file mode 100644 index 2653d7c9c82..00000000000 --- a/res/themes/riot/img/logos/riot-im-logo-5.svg +++ /dev/null @@ -1,110 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/res/themes/riot/img/logos/riot-logo-1.svg b/res/themes/riot/img/logos/riot-logo-1.svg deleted file mode 100644 index 297608b8993..00000000000 --- a/res/themes/riot/img/logos/riot-logo-1.svg +++ /dev/null @@ -1 +0,0 @@ -Asset 4 \ No newline at end of file diff --git a/res/themes/riot/img/logos/riot-logo-2.svg b/res/themes/riot/img/logos/riot-logo-2.svg deleted file mode 100644 index 757f62309ee..00000000000 --- a/res/themes/riot/img/logos/riot-logo-2.svg +++ /dev/null @@ -1 +0,0 @@ -Asset 2 \ No newline at end of file diff --git a/res/themes/riot/img/logos/riot-logo-3.svg b/res/themes/riot/img/logos/riot-logo-3.svg deleted file mode 100644 index d71b489a441..00000000000 --- a/res/themes/riot/img/logos/riot-logo-3.svg +++ /dev/null @@ -1 +0,0 @@ -Asset 5 \ No newline at end of file diff --git a/res/themes/riot/img/logos/riot-logo-4.svg b/res/themes/riot/img/logos/riot-logo-4.svg deleted file mode 100644 index aa5522f609b..00000000000 --- a/res/themes/riot/img/logos/riot-logo-4.svg +++ /dev/null @@ -1 +0,0 @@ -Asset 3 \ No newline at end of file diff --git a/res/themes/riot/img/logos/riot-logo-5.svg b/res/themes/riot/img/logos/riot-logo-5.svg deleted file mode 100644 index 6cbc2592578..00000000000 --- a/res/themes/riot/img/logos/riot-logo-5.svg +++ /dev/null @@ -1 +0,0 @@ -Asset 1 \ No newline at end of file diff --git a/res/themes/riot/img/logos/riot-logo-bw.svg b/res/themes/riot/img/logos/riot-logo-bw.svg deleted file mode 100644 index e7d6e869bad..00000000000 --- a/res/themes/riot/img/logos/riot-logo-bw.svg +++ /dev/null @@ -1 +0,0 @@ -Asset 6 \ No newline at end of file diff --git a/res/themes/riot/img/logos/riot-logo.svg b/res/themes/riot/img/logos/riot-logo.svg deleted file mode 100644 index cbfaa625779..00000000000 --- a/res/themes/riot/img/logos/riot-logo.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/res/themes/riot/img/logos/riot.im logo.svg b/res/themes/riot/img/logos/riot.im logo.svg deleted file mode 100644 index 5ebd96e84bf..00000000000 --- a/res/themes/riot/img/logos/riot.im logo.svg +++ /dev/null @@ -1,169 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/res/themes/riot/img/logos/weheal.png b/res/themes/riot/img/logos/weheal.png new file mode 100644 index 00000000000..842f41683ac Binary files /dev/null and b/res/themes/riot/img/logos/weheal.png differ diff --git a/src/components/structures/VectorHomePage.js b/src/components/structures/VectorHomePage.js deleted file mode 100644 index 7f741303498..00000000000 --- a/src/components/structures/VectorHomePage.js +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright 2016 OpenMarket Ltd -Copyright 2017 Vector Creations Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -'use strict'; - -import React from 'react'; -import HomePage from 'matrix-react-sdk/lib/components/structures/HomePage'; -import sanitizeHtml from 'sanitize-html'; -import { _t } from 'matrix-react-sdk/lib/languageHandler'; - -class VectorHomePage extends HomePage { - static displayName = 'VectorHomePage'; - static replaces = 'HomePage'; - - // we're overriding the base component here, for Riot-specific tweaks - translate(s) { - s = sanitizeHtml(_t(s)); - // ugly fix for https://github.com/vector-im/riot-web/issues/4243 - s = s.replace(/Riot\.im/, 'Riot.im'); - s = s.replace(/\[matrix\]/, '[matrix]'); - return s; - } -} - -module.exports = VectorHomePage; diff --git a/src/components/views/login/VectorLoginFooter.js b/src/components/views/login/VectorLoginFooter.js index 26e01c06de4..159bc42cf59 100644 --- a/src/components/views/login/VectorLoginFooter.js +++ b/src/components/views/login/VectorLoginFooter.js @@ -30,13 +30,12 @@ module.exports = React.createClass({ // FIXME: replace this with a proper Status skin // ...except then we wouldn't be able to switch to the Status theme at runtime. if (SettingsStore.getValue("theme") === 'status') return
; - + return (
blog  ·   twitter  ·   - github  ·   - { _t('powered by Matrix') } + { _t('powered by Aloha Health Network') }
); } diff --git a/src/components/views/login/VectorLoginHeader.js b/src/components/views/login/VectorLoginHeader.js index d0ee7934898..4cda855d845 100644 --- a/src/components/views/login/VectorLoginHeader.js +++ b/src/components/views/login/VectorLoginHeader.js @@ -19,8 +19,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -const i = [1, 2, 3, 4, 5][Math.floor(Math.random() * 5)]; -const DEFAULT_LOGO_URI = "themes/riot/img/logos/riot-im-logo-" + i + ".svg"; +const DEFAULT_LOGO_URI = "themes/riot/img/logos/weheal.png"; module.exports = React.createClass({ displayName: 'VectorLoginHeader', @@ -35,7 +34,7 @@ module.exports = React.createClass({ return (
- Riot + WeHeal
); diff --git a/src/vector/index.html b/src/vector/index.html index 91d28642c9d..4b5c2a4b2bb 100644 --- a/src/vector/index.html +++ b/src/vector/index.html @@ -14,8 +14,8 @@ - - + + diff --git a/webpack.config.js b/webpack.config.js index 2a116f57775..e3fd8e9374d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -25,6 +25,7 @@ module.exports = { // CSS themes "theme-light": "./node_modules/matrix-react-sdk/res/themes/light/css/light.scss", "theme-dark": "./node_modules/matrix-react-sdk/res/themes/dark/css/dark.scss", + "theme-blue": "./node_modules/matrix-react-sdk/res/themes/blue/css/blue.scss", "theme-status": "./res/themes/status/css/status.scss", }, module: {