merge devel

This commit is contained in:
or-else
2023-05-10 14:43:49 -07:00
26 changed files with 909 additions and 513 deletions
+23 -12
View File
@@ -3241,7 +3241,9 @@ class HashNavigation {
const args = [];
for (const key in params) {
if (params.hasOwnProperty(key)) {
args.push(key + '=' + encodeURIComponent(params[key]));
if (params[key] !== undefined) {
args.push(key + '=' + encodeURIComponent(params[key]));
}
}
}
if (args.length > 0) {
@@ -5323,11 +5325,11 @@ class MessagesView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Compone
}
}
if (topic) {
if (this.state.topic != prevState.topic || !prevProps.ready) {
if (this.state.topic != prevState.topic || this.props.myUserId && !prevProps.myUserId) {
const newTopic = this.props.newTopicParams && this.props.newTopicParams._topicName == this.props.topic;
if (topic.isP2PType() && newTopic && !_config_js__WEBPACK_IMPORTED_MODULE_18__.IMMEDIATE_P2P_SUBSCRIPTION) {
topic.getMeta(topic.startMetaQuery().withDesc().build());
} else {
} else if (this.props.myUserId) {
this.subscribe(topic);
}
} else if (topic.isSubscribed() && this.state.isReader && !prevState.isReader) {
@@ -5523,6 +5525,11 @@ class MessagesView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Compone
topic: ctrl.topic
});
}
if (this.state.deleted) {
this.setState({
deleted: false
});
}
this.props.onNewTopicCreated(this.props.topic, ctrl.topic);
let discard = [];
topic.queuedMessages(pub => {
@@ -7191,6 +7198,7 @@ class SidepanelView extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCo
tinode: this.props.tinode,
myUserId: this.props.myUserId,
trustedBadges: this.props.trustedBadges,
reqCredMethod: this.props.reqCredMethod,
onShowCountrySelector: this.props.onShowCountrySelector,
onNavigate: this.props.onNavigate,
onCredAdd: this.props.onCredAdd,
@@ -8005,6 +8013,7 @@ class TinodeWeb extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
parsed.path[0] = 'cred';
parsed.params['method'] = params.cred[0];
parsed.params['token'] = params.token;
parsed.params['code'] = params.code;
_lib_navigation_js__WEBPACK_IMPORTED_MODULE_18__["default"].navigateTo(_lib_navigation_js__WEBPACK_IMPORTED_MODULE_18__["default"].composeUrlHash(parsed.path, parsed.params));
}
handleLoginSuccessful() {
@@ -8078,7 +8087,7 @@ class TinodeWeb extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
}
} else if (what == 'read') {
this.resetContactList();
} else if (what == 'msg') {
} else if (what == 'msg' && cont) {
const topic = this.tinode.getTopic(cont.topic);
const archived = topic && topic.isArchived();
if (cont.unread > 0 && this.state.messageSounds && !archived) {
@@ -8099,7 +8108,7 @@ class TinodeWeb extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
});
}
} else if (what == 'del') {} else if (what == 'upd' || what == 'call') {} else {
console.info("Unsupported (yet) presence update:", what, "in", cont.topic);
console.info("Unsupported (yet) presence update:", what, "in", (cont || {}).topic);
}
}
tnMeSubsUpdated(unused) {
@@ -8201,6 +8210,7 @@ class TinodeWeb extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
}
} else {
this.setState({
topicSelected: null,
errorText: '',
errorLevel: null,
mobilePanel: 'sidepanel',
@@ -8448,7 +8458,8 @@ class TinodeWeb extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
}
handleCredConfirm(method, response) {
TinodeWeb.navigateToCredentialsView({
cred: [method]
cred: [method],
code: response
});
}
handleSidepanelCancel() {
@@ -8821,7 +8832,7 @@ class TinodeWeb extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
meth: cred,
resp: code
}
}).catch(err => this.handleError(err.message, 'err'));
}).then(_ => _lib_navigation_js__WEBPACK_IMPORTED_MODULE_18__["default"].navigateTo(_lib_navigation_js__WEBPACK_IMPORTED_MODULE_18__["default"].setUrlSidePanel(window.location.hash, 'contacts'))).catch(err => this.handleError(err.message, 'err'));
} else {
this.setState({
credMethod: cred,
@@ -9419,7 +9430,7 @@ class ValidationView extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureC
placeholder: numbers_only,
value: this.state.code,
onChange: this.handleCodeChange,
onKeyPress: this.handleKeyPress,
onKeyDown: this.handleKeyPress,
required: true
}))), react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "dialog-buttons"
@@ -12927,7 +12938,7 @@ class ErrorPanel extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompo
className: "icon"
}, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("i", {
className: "material-icons"
}, level)), react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, this.props.text, this.props.action ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
}, level)), react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, this.props.text, this.props.action ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, "\xA0 ", react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
href: "#",
style: {
whiteSpace: 'nowrap'
@@ -16553,7 +16564,7 @@ class VisiblePassword extends (react__WEBPACK_IMPORTED_MODULE_0___default().Pure
super(props);
this.inputRef = react__WEBPACK_IMPORTED_MODULE_0___default().createRef();
this.state = {
value: this.props.value,
value: this.props.value || '',
visible: false
};
this.handleVisibility = this.handleVisibility.bind(this);
@@ -16583,7 +16594,7 @@ class VisiblePassword extends (react__WEBPACK_IMPORTED_MODULE_0___default().Pure
handleKeyDown(e) {
if (e.keyCode == 27) {
this.setState({
value: this.props.value,
value: this.props.value || '',
visible: false
});
if (this.props.onFinished) {
@@ -16614,7 +16625,7 @@ class VisiblePassword extends (react__WEBPACK_IMPORTED_MODULE_0___default().Pure
onBlur: this.handleEditingFinished
}, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", {
className: "with-visibility",
type: this.state.visible ? "text" : "password",
type: this.state.visible ? 'text' : 'password',
value: this.state.value,
placeholder: this.props.placeholder,
required: this.props.required ? 'required' : '',