diff --git a/README.md b/README.md index 0347994..a7d8f49 100644 --- a/README.md +++ b/README.md @@ -37,14 +37,22 @@ Currently you can customize all visible texts and the main widget color by setti diff --git a/server.js b/server.js index 28facee..80c08ba 100644 --- a/server.js +++ b/server.js @@ -1,5 +1,4 @@ const request = require('request'); -const compression = require('compression'); const cors = require('cors'); const express = require('express'); const bodyParser = require('body-parser'); @@ -7,6 +6,8 @@ const app = express(); const http = require('http').Server(app); const io = require('socket.io')(http); + +// initialise Express app app.use(express.static('dist', {index: 'demo.html', maxage: '4h'})); app.use(bodyParser.json()); diff --git a/src/widget/arrow-icon.js b/src/widget/arrow-icon.js index d47ed8d..ace1bda 100644 --- a/src/widget/arrow-icon.js +++ b/src/widget/arrow-icon.js @@ -2,7 +2,7 @@ import { h, Component } from 'preact'; export default class ArrowIcon extends Component { - render({isOpened},{}) { + render({color, isOpened},{}) { return (
{/* keyboard arrow up */} @@ -12,15 +12,15 @@ export default class ArrowIcon extends Component { marginTop: 6, verticalAlign: 'middle', }} - fill="#FFFFFF" height="15" viewBox="0 0 15 15" width="15" + height="15" viewBox="0 0 15 15" width="15" xmlns="http://www.w3.org/2000/svg"> - - : @@ -29,11 +29,11 @@ export default class ArrowIcon extends Component { marginTop: 6, verticalAlign: 'middle', }} - fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" + fill={color} height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"> - + }
); diff --git a/src/widget/chat-floating-button.js b/src/widget/chat-floating-button.js index 7fac940..94b1025 100644 --- a/src/widget/chat-floating-button.js +++ b/src/widget/chat-floating-button.js @@ -3,14 +3,14 @@ import {mobileTitleStyle} from "./style"; export default class ChatFloatingButton extends Component { - render({color, onClick},{}) { + render({color, textColor, onClick},{}) { return (
- diff --git a/src/widget/chat-title-msg.js b/src/widget/chat-title-msg.js index 111817d..1972a3d 100644 --- a/src/widget/chat-title-msg.js +++ b/src/widget/chat-title-msg.js @@ -5,12 +5,12 @@ export default class ChatTitleMsg extends Component { render({isOpened, conf},{}) { return (
-
-
: - Avatar + : (conf.closedStyle === 'chat' || isChatOpen || this.wasChatOpened()) ? -
+
{isChatOpen ? conf.titleOpen : conf.titleClosed}
- +
: