Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6070926b89 | ||
|
|
8427e82c9d | ||
|
|
f262c9df0f | ||
|
|
b9f822d308 | ||
|
|
0cb939ff7d | ||
|
|
057789e741 |
@@ -1,48 +0,0 @@
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: node:10
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: dep install
|
||||
command: npm install
|
||||
- run:
|
||||
name: install codecov
|
||||
command: npm install -g codecov
|
||||
- run:
|
||||
name: test
|
||||
command: npm test && codecov
|
||||
- run:
|
||||
name: build
|
||||
command: |
|
||||
npm run build
|
||||
[ -f ./dist/index.html ] || exit 1
|
||||
[ -f ./dist/blank.html ] || exit 1
|
||||
[ -f ./dist/widget.js ] || exit 1
|
||||
[ -f ./dist/bookmarklet.js ] || exit 1
|
||||
- run:
|
||||
name: npm start works
|
||||
command: |
|
||||
npm run start &
|
||||
pid=$!
|
||||
sleep 10s
|
||||
ps $pid
|
||||
- run:
|
||||
name: deploy
|
||||
command: |
|
||||
if [ "$CIRCLE_BRANCH" = "master" ]; then
|
||||
git config --global user.email $GH_EMAIL
|
||||
git config --global user.name $GH_NAME
|
||||
npm run deploy
|
||||
fi
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build-deploy:
|
||||
jobs:
|
||||
- build:
|
||||
filters:
|
||||
branches:
|
||||
ignore: gh-pages
|
||||
@@ -1,2 +0,0 @@
|
||||
import '@storybook/addon-actions/register';
|
||||
import '@storybook/addon-links/register';
|
||||
@@ -1,9 +0,0 @@
|
||||
import { configure } from '@storybook/react';
|
||||
|
||||
// automatically import all files ending in *.stories.js
|
||||
const req = require.context('../stories', true, /\.stories\.js$/);
|
||||
function loadStories() {
|
||||
req.keys().forEach(filename => req(filename));
|
||||
}
|
||||
|
||||
configure(loadStories, module);
|
||||
@@ -1,13 +0,0 @@
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.scss$/,
|
||||
use: ['style-loader', 'css-loader', 'sass-loader'],
|
||||
include: path.resolve(__dirname, '../'),
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
10
README.md
@@ -10,11 +10,11 @@ Built on:
|
||||
|
||||
## Usage
|
||||
```
|
||||
<script src="https://unpkg.com/safesupport-chatbox" type="text/javascript"></script>
|
||||
<script src="https://unpkg.com/private-safesupport-chatbox" type="text/javascript"></script>
|
||||
<script>
|
||||
var config = {
|
||||
matrixServerUrl: 'https://matrix.rhok.space',
|
||||
botId: '@help-bot:rhok.space',
|
||||
matrixServerUrl: 'https://matrix-client.matrix.org',
|
||||
botId: '@your-help-bot:matrix.org',
|
||||
roomName: 'Support Chat',
|
||||
termsUrl: 'https://tosdr.org/',
|
||||
introMessage: 'This chat application does not collect any of your personal data or any data from your use of this service.',
|
||||
@@ -31,8 +31,8 @@ Built on:
|
||||
Options:
|
||||
| Name | Description | Default
|
||||
| ----------- | ----------- | --------- |
|
||||
| `matrixServerUrl` (required) | URL for the Matrix homeserver you want to connect to | `https://matrix.rhok.space` |
|
||||
| `botId` (required) | User ID for the bot account that handles invites | `@help-bot:rhok.space` |
|
||||
| `matrixServerUrl` (required) | URL for the Matrix homeserver you want to connect to | `https://matrix-client.matrix.org` |
|
||||
| `botId` (required) | User ID for the bot account that handles invites | null |
|
||||
| `introMessage` (optional) | First message the user sees before agreeing to the Terms of Use | `This chat application does not collect any of your personal data or any data from your use of this service.` |
|
||||
| `termsUrl` (optional) | URL for the Terms of Use for the chat service | `https://tosdr.org/` |
|
||||
| `roomName` (optional) | Name of the chatroom generated in Riot | 'Support Chat' |
|
||||
|
||||
|
Before Width: | Height: | Size: 2.3 MiB |
BIN
dist/olm.wasm
vendored
|
Before Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 176 KiB |
BIN
docs/confirm.png
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 230 KiB |
|
Before Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 296 KiB |
|
Before Width: | Height: | Size: 166 KiB |
|
Before Width: | Height: | Size: 111 KiB |
|
Before Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 111 KiB |
|
Before Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 42 KiB |
BIN
docs/verify.png
|
Before Width: | Height: | Size: 143 KiB |
|
Before Width: | Height: | Size: 97 KiB |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "safesupport-chatbox",
|
||||
"version": "1.1.3",
|
||||
"name": "private-safesupport-chatbox",
|
||||
"version": "1.0.1",
|
||||
"description": "A secure and private embeddable chatbox that connects to Riot",
|
||||
"main": "dist/chatbox.js",
|
||||
"scripts": {
|
||||
@@ -89,10 +89,6 @@
|
||||
"@babel/plugin-transform-runtime": "^7.9.0",
|
||||
"@babel/preset-env": "^7.9.0",
|
||||
"@babel/preset-react": "^7.9.4",
|
||||
"@storybook/addon-actions": "5.2.8",
|
||||
"@storybook/addon-links": "5.2.8",
|
||||
"@storybook/addons": "5.2.8",
|
||||
"@storybook/react": "5.2.8",
|
||||
"autoprefixer": "^9.7.5",
|
||||
"babel-core": "7.0.0-bridge.0",
|
||||
"babel-eslint": "10.0.3",
|
||||
@@ -125,6 +121,7 @@
|
||||
"style-loader": "1.1.2",
|
||||
"wait-for-expect": "^3.0.2",
|
||||
"webpack": "4.41.5",
|
||||
"webpack-bundle-analyzer": "^3.7.0",
|
||||
"webpack-cli": "3.3.10",
|
||||
"webpack-dev-server": "3.10.1",
|
||||
"webpack-obfuscator": "0.22.0",
|
||||
|
||||
BIN
public/olm.wasm
@@ -99,6 +99,7 @@
|
||||
width: 400px;
|
||||
max-width: calc(100vw - 10px);
|
||||
border-bottom: none;
|
||||
margin: 0;
|
||||
animation-duration: 0.2s;
|
||||
animation-fill-mode: forwards;
|
||||
|
||||
|
||||
@@ -599,6 +599,7 @@ class ChatBox extends React.Component {
|
||||
const inputLabel = 'Send a message...'
|
||||
|
||||
return (
|
||||
<div id="safesupport">
|
||||
<div className="docked-widget" role="complementary">
|
||||
<Transition in={opened} timeout={250} onExited={this.handleWidgetExit} onEntered={this.handleWidgetEnter}>
|
||||
{(status) => {
|
||||
@@ -697,6 +698,7 @@ class ChatBox extends React.Component {
|
||||
{showDock && !roomId && <Dock handleToggleOpen={this.handleToggleOpen} />}
|
||||
{showDock && roomId && <Header handleToggleOpen={this.handleToggleOpen} opened={opened} handleExitChat={this.handleExitChat} />}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#safesupport {
|
||||
@import "variables";
|
||||
@import "loader";
|
||||
@import "chat";
|
||||
@import "dark_mode";
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
import React from 'react'
|
||||
import { storiesOf } from '@storybook/react'
|
||||
import Widget from '../src/components/widget'
|
||||
|
||||
storiesOf(`Widget`)
|
||||
.add(`default`, () => <Widget />)
|
||||