more prominent "messaging disabled" note
This commit is contained in:
@@ -1210,6 +1210,12 @@ i.search {
|
|||||||
height: 4rem;
|
height: 4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#send-message-panel #writing-disabled {
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
#sendMessage {
|
#sendMessage {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -232,6 +232,8 @@ class TinodeWeb extends React.Component {
|
|||||||
|
|
||||||
const parsedNav = HashNavigation.parseUrlHash(window.location.hash);
|
const parsedNav = HashNavigation.parseUrlHash(window.location.hash);
|
||||||
if (token) {
|
if (token) {
|
||||||
|
this.setState({autoLogin: true});
|
||||||
|
|
||||||
// When reading from storage, date is returned as string.
|
// When reading from storage, date is returned as string.
|
||||||
token.expires = new Date(token.expires);
|
token.expires = new Date(token.expires);
|
||||||
this.tinode.setAuthToken(token);
|
this.tinode.setAuthToken(token);
|
||||||
|
|||||||
@@ -150,13 +150,9 @@ class SendMessage extends React.PureComponent {
|
|||||||
formatMessage(messages.type_new_message));
|
formatMessage(messages.type_new_message));
|
||||||
return (
|
return (
|
||||||
<div id="send-message-panel">
|
<div id="send-message-panel">
|
||||||
{this.props.onAttachFile ?
|
{!this.props.disabled ?
|
||||||
(this.props.disabled ?
|
|
||||||
<>
|
<>
|
||||||
<i className="material-icons disabled">photo</i>
|
{this.props.onAttachFile ?
|
||||||
<i className="material-icons disabled">attach_file</i>
|
|
||||||
</>
|
|
||||||
:
|
|
||||||
<>
|
<>
|
||||||
<a href="#" onClick={(e) => {e.preventDefault(); this.attachImage.click();}} title="Add image">
|
<a href="#" onClick={(e) => {e.preventDefault(); this.attachImage.click();}} title="Add image">
|
||||||
<i className="material-icons secondary">photo</i>
|
<i className="material-icons secondary">photo</i>
|
||||||
@@ -164,25 +160,27 @@ class SendMessage extends React.PureComponent {
|
|||||||
<a href="#" onClick={(e) => {e.preventDefault(); this.attachFile.click();}} title="Attach file">
|
<a href="#" onClick={(e) => {e.preventDefault(); this.attachFile.click();}} title="Attach file">
|
||||||
<i className="material-icons secondary">attach_file</i>
|
<i className="material-icons secondary">attach_file</i>
|
||||||
</a>
|
</a>
|
||||||
</>)
|
</>
|
||||||
:
|
:
|
||||||
null}
|
null}
|
||||||
{this.props.noInput ?
|
{this.props.noInput ?
|
||||||
<div className="hr thin" /> :
|
<div className="hr thin" /> :
|
||||||
<textarea id="sendMessage" placeholder={prompt}
|
<textarea id="sendMessage" placeholder={prompt}
|
||||||
disabled={this.props.disabled} value={this.state.message}
|
value={this.state.message} onChange={this.handleMessageTyping}
|
||||||
onChange={this.handleMessageTyping} onKeyPress={this.handleKeyPress}
|
onKeyPress={this.handleKeyPress}
|
||||||
ref={(ref) => {this.messageEditArea = ref;}}
|
ref={(ref) => {this.messageEditArea = ref;}}
|
||||||
autoFocus />}
|
autoFocus />}
|
||||||
{this.props.disabled ?
|
|
||||||
<i className="material-icons disabled">send</i> :
|
|
||||||
<a href="#" onClick={this.handleSend} title="Send">
|
<a href="#" onClick={this.handleSend} title="Send">
|
||||||
<i className="material-icons">send</i>
|
<i className="material-icons">send</i>
|
||||||
</a>}
|
</a>
|
||||||
<input type="file" ref={(ref) => {this.attachFile = ref;}}
|
<input type="file" ref={(ref) => {this.attachFile = ref;}}
|
||||||
onChange={this.handleAttachFile} style={{display: 'none'}} />
|
onChange={this.handleAttachFile} style={{display: 'none'}} />
|
||||||
<input type="file" ref={(ref) => {this.attachImage = ref;}} accept="image/*"
|
<input type="file" ref={(ref) => {this.attachImage = ref;}} accept="image/*"
|
||||||
onChange={this.handleAttachImage} style={{display: 'none'}} />
|
onChange={this.handleAttachImage} style={{display: 'none'}} />
|
||||||
|
</>
|
||||||
|
:
|
||||||
|
<div id="writing-disabled">{prompt}</div>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-10
@@ -4825,6 +4825,9 @@ var TinodeWeb = function (_React$Component) {
|
|||||||
var parsedNav = _lib_navigation_js__WEBPACK_IMPORTED_MODULE_15__["default"].parseUrlHash(window.location.hash);
|
var parsedNav = _lib_navigation_js__WEBPACK_IMPORTED_MODULE_15__["default"].parseUrlHash(window.location.hash);
|
||||||
|
|
||||||
if (token) {
|
if (token) {
|
||||||
|
this.setState({
|
||||||
|
autoLogin: true
|
||||||
|
});
|
||||||
token.expires = new Date(token.expires);
|
token.expires = new Date(token.expires);
|
||||||
this.tinode.setAuthToken(token);
|
this.tinode.setAuthToken(token);
|
||||||
this.tinode.connect().catch(function (err) {
|
this.tinode.connect().catch(function (err) {
|
||||||
@@ -11103,11 +11106,7 @@ var SendMessage = function (_React$PureComponent) {
|
|||||||
var prompt = this.props.disabled ? formatMessage(messages.messaging_disabled) : this.props.messagePrompt ? formatMessage(messages[this.props.messagePrompt]) : formatMessage(messages.type_new_message);
|
var prompt = this.props.disabled ? formatMessage(messages.messaging_disabled) : this.props.messagePrompt ? formatMessage(messages[this.props.messagePrompt]) : formatMessage(messages.type_new_message);
|
||||||
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
||||||
id: "send-message-panel"
|
id: "send-message-panel"
|
||||||
}, this.props.onAttachFile ? this.props.disabled ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
}, !this.props.disabled ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, this.props.onAttachFile ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||||
className: "material-icons disabled"
|
|
||||||
}, "photo"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
|
||||||
className: "material-icons disabled"
|
|
||||||
}, "attach_file")) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
|
||||||
href: "#",
|
href: "#",
|
||||||
onClick: function onClick(e) {
|
onClick: function onClick(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -11132,7 +11131,6 @@ var SendMessage = function (_React$PureComponent) {
|
|||||||
}) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("textarea", {
|
}) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("textarea", {
|
||||||
id: "sendMessage",
|
id: "sendMessage",
|
||||||
placeholder: prompt,
|
placeholder: prompt,
|
||||||
disabled: this.props.disabled,
|
|
||||||
value: this.state.message,
|
value: this.state.message,
|
||||||
onChange: this.handleMessageTyping,
|
onChange: this.handleMessageTyping,
|
||||||
onKeyPress: this.handleKeyPress,
|
onKeyPress: this.handleKeyPress,
|
||||||
@@ -11140,9 +11138,7 @@ var SendMessage = function (_React$PureComponent) {
|
|||||||
_this3.messageEditArea = _ref;
|
_this3.messageEditArea = _ref;
|
||||||
},
|
},
|
||||||
autoFocus: true
|
autoFocus: true
|
||||||
}), this.props.disabled ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
}), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||||
className: "material-icons disabled"
|
|
||||||
}, "send") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
|
||||||
href: "#",
|
href: "#",
|
||||||
onClick: this.handleSend,
|
onClick: this.handleSend,
|
||||||
title: "Send"
|
title: "Send"
|
||||||
@@ -11167,7 +11163,9 @@ var SendMessage = function (_React$PureComponent) {
|
|||||||
style: {
|
style: {
|
||||||
display: 'none'
|
display: 'none'
|
||||||
}
|
}
|
||||||
}));
|
})) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
||||||
|
id: "writing-disabled"
|
||||||
|
}, prompt));
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user