Merge branch 'devel' into features
This commit is contained in:
+2
-1
@@ -175,5 +175,6 @@
|
||||
"channel": "Sender",
|
||||
"drafty_attachment": "Dateianhang",
|
||||
"drafty_form": "Formular:",
|
||||
"drafty_image": "Bild"
|
||||
"drafty_image": "Bild",
|
||||
"topic_delete": "Chat löschen"
|
||||
}
|
||||
|
||||
+2
-1
@@ -169,7 +169,8 @@
|
||||
"title_permissions": "Permissions",
|
||||
"title_tag_manager": "Tags (user discovery)",
|
||||
"topic_block_warning": "Are you sure you want to block this conversation?",
|
||||
"topic_delete_warning": "Are you sure you want to delete this conversation?",
|
||||
"topic_delete": "Delete Conversation",
|
||||
"topic_delete_warning": "Are you sure you want to delete this conversation? It cannot be undone.",
|
||||
"topic_name_editing_placeholder": "Freeform name of the group",
|
||||
"unnamed_topic": "Unnamed",
|
||||
"update_available": "Update available.",
|
||||
|
||||
+2
-1
@@ -175,5 +175,6 @@
|
||||
"channel": "canal",
|
||||
"drafty_attachment": "Archivo",
|
||||
"drafty_form": "Formulario:",
|
||||
"drafty_image": "Imagen"
|
||||
"drafty_image": "Imagen",
|
||||
"topic_delete": "Eliminar chat"
|
||||
}
|
||||
|
||||
@@ -677,8 +677,12 @@
|
||||
"defaultMessage": "Are you sure you want to block this conversation?",
|
||||
"description": "Alert warning when blocking a topic."
|
||||
},
|
||||
"topic_delete": {
|
||||
"defaultMessage": "Delete Conversation",
|
||||
"description": "Alert title when deleting the topic."
|
||||
},
|
||||
"topic_delete_warning": {
|
||||
"defaultMessage": "Are you sure you want to delete this conversation?",
|
||||
"defaultMessage": "Are you sure you want to delete this conversation? It cannot be undone.",
|
||||
"description": "Alert warning when deleting entire topic"
|
||||
},
|
||||
"topic_name_editing_placeholder": {
|
||||
|
||||
+2
-1
@@ -178,5 +178,6 @@
|
||||
"channel": "채널",
|
||||
"drafty_attachment": "부착",
|
||||
"drafty_form": "형태:",
|
||||
"drafty_image": "이미지"
|
||||
"drafty_image": "이미지",
|
||||
"topic_delete": "채팅 삭제"
|
||||
}
|
||||
|
||||
+2
-1
@@ -175,5 +175,6 @@
|
||||
"title_manage_tags": "Administrează",
|
||||
"drafty_attachment": "Atasament",
|
||||
"drafty_form": "Formă:",
|
||||
"drafty_image": "Imagine"
|
||||
"drafty_image": "Imagine",
|
||||
"topic_delete": "Ștergeți Chat"
|
||||
}
|
||||
|
||||
+2
-1
@@ -175,5 +175,6 @@
|
||||
"channel": "канал",
|
||||
"drafty_attachment": "Аттачмент",
|
||||
"drafty_form": "Форма:",
|
||||
"drafty_image": "Картинка"
|
||||
"drafty_image": "Картинка",
|
||||
"topic_delete": "Удалить чат"
|
||||
}
|
||||
|
||||
+2
-1
@@ -175,5 +175,6 @@
|
||||
"update_available": "有可用的更新。",
|
||||
"upload_finishing": "正在完成...",
|
||||
"user_not_found": "找不到",
|
||||
"validate_credential_action": "確認"
|
||||
"validate_credential_action": "確認",
|
||||
"topic_delete": "刪除聊天"
|
||||
}
|
||||
|
||||
+2
-1
@@ -175,5 +175,6 @@
|
||||
"channel": "频道",
|
||||
"drafty_attachment": "附件",
|
||||
"drafty_form": "形式:",
|
||||
"drafty_image": "图像"
|
||||
"drafty_image": "图像",
|
||||
"topic_delete": "删除聊天"
|
||||
}
|
||||
|
||||
+16
-8
@@ -176,7 +176,8 @@
|
||||
"channel": "Sender",
|
||||
"drafty_attachment": "Dateianhang",
|
||||
"drafty_form": "Formular:",
|
||||
"drafty_image": "Bild"
|
||||
"drafty_image": "Bild",
|
||||
"topic_delete": "Chat löschen"
|
||||
},
|
||||
"en": {
|
||||
"action_block_contact": "Block Contact",
|
||||
@@ -350,7 +351,8 @@
|
||||
"title_permissions": "Permissions",
|
||||
"title_tag_manager": "Tags (user discovery)",
|
||||
"topic_block_warning": "Are you sure you want to block this conversation?",
|
||||
"topic_delete_warning": "Are you sure you want to delete this conversation?",
|
||||
"topic_delete": "Delete Conversation",
|
||||
"topic_delete_warning": "Are you sure you want to delete this conversation? It cannot be undone.",
|
||||
"topic_name_editing_placeholder": "Freeform name of the group",
|
||||
"unnamed_topic": "Unnamed",
|
||||
"update_available": "Update available.",
|
||||
@@ -535,7 +537,8 @@
|
||||
"channel": "canal",
|
||||
"drafty_attachment": "Archivo",
|
||||
"drafty_form": "Formulario:",
|
||||
"drafty_image": "Imagen"
|
||||
"drafty_image": "Imagen",
|
||||
"topic_delete": "Eliminar chat"
|
||||
},
|
||||
"ko": {
|
||||
"validate_credential_action": "확인",
|
||||
@@ -714,7 +717,8 @@
|
||||
"channel": "채널",
|
||||
"drafty_attachment": "부착",
|
||||
"drafty_form": "형태:",
|
||||
"drafty_image": "이미지"
|
||||
"drafty_image": "이미지",
|
||||
"topic_delete": "채팅 삭제"
|
||||
},
|
||||
"ro": {
|
||||
"validate_credential_action": "confirmă",
|
||||
@@ -893,7 +897,8 @@
|
||||
"title_manage_tags": "Administrează",
|
||||
"drafty_attachment": "Atasament",
|
||||
"drafty_form": "Formă:",
|
||||
"drafty_image": "Imagine"
|
||||
"drafty_image": "Imagine",
|
||||
"topic_delete": "Ștergeți Chat"
|
||||
},
|
||||
"ru": {
|
||||
"contacts_not_found": "Чатов нет<br />¯∖_(ツ)_/¯",
|
||||
@@ -1072,7 +1077,8 @@
|
||||
"channel": "канал",
|
||||
"drafty_attachment": "Аттачмент",
|
||||
"drafty_form": "Форма:",
|
||||
"drafty_image": "Картинка"
|
||||
"drafty_image": "Картинка",
|
||||
"topic_delete": "Удалить чат"
|
||||
},
|
||||
"zh-TW": {
|
||||
"action_block_contact": "封鎖聯絡人",
|
||||
@@ -1251,7 +1257,8 @@
|
||||
"update_available": "有可用的更新。",
|
||||
"upload_finishing": "正在完成...",
|
||||
"user_not_found": "找不到",
|
||||
"validate_credential_action": "確認"
|
||||
"validate_credential_action": "確認",
|
||||
"topic_delete": "刪除聊天"
|
||||
},
|
||||
"zh": {
|
||||
"archived_contacts": "已归档联系人 ({count})",
|
||||
@@ -1430,6 +1437,7 @@
|
||||
"channel": "频道",
|
||||
"drafty_attachment": "附件",
|
||||
"drafty_form": "形式:",
|
||||
"drafty_image": "图像"
|
||||
"drafty_image": "图像",
|
||||
"topic_delete": "删除聊天"
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
// This is a generated file. Don't edit.
|
||||
|
||||
export const PACKAGE_VERSION = "0.17.8";
|
||||
export const PACKAGE_VERSION = "0.17.8-rc1";
|
||||
|
||||
+33
-3
@@ -61,6 +61,16 @@ const messages = defineMessages({
|
||||
defaultMessage: 'Are you sure you want to delete all messages for everyone? It cannot be undone.',
|
||||
description: 'Alert dialog warning when hard-deleting all messages.'
|
||||
},
|
||||
topic_delete: {
|
||||
id: 'topic_delete',
|
||||
defaultMessage: 'Delete Conversation',
|
||||
description: 'Alert title when deleting the topic.'
|
||||
},
|
||||
topic_delete_warning: {
|
||||
id: 'topic_delete_warning',
|
||||
defaultMessage: 'Are you sure you want to delete this conversation? It cannot be undone.',
|
||||
description: 'Alert warning when deleting entire topic'
|
||||
},
|
||||
leave_chat: {
|
||||
id: 'action_leave_chat',
|
||||
defaultMessage: 'Leave Conversation',
|
||||
@@ -143,6 +153,7 @@ class InfoView extends React.Component {
|
||||
this.handleShowAddMembers = this.handleShowAddMembers.bind(this);
|
||||
this.handleHideAddMembers = this.handleHideAddMembers.bind(this);
|
||||
this.handleMemberUpdateRequest = this.handleMemberUpdateRequest.bind(this);
|
||||
this.handleDeleteTopic = this.handleDeleteTopic.bind(this);
|
||||
this.handleDeleteMessages = this.handleDeleteMessages.bind(this);
|
||||
this.handleLeave = this.handleLeave.bind(this);
|
||||
this.handleBlock = this.handleBlock.bind(this);
|
||||
@@ -422,6 +433,19 @@ class InfoView extends React.Component {
|
||||
this.setState({showMemberPanel: false});
|
||||
}
|
||||
|
||||
handleDeleteTopic(e) {
|
||||
e.preventDefault();
|
||||
const {formatMessage} = this.props.intl;
|
||||
this.props.onShowAlert(
|
||||
formatMessage(messages.topic_delete), // title
|
||||
formatMessage(messages.topic_delete_warning), // content
|
||||
(() => { this.props.onDeleteTopic(this.props.topic); }), // onConfirm
|
||||
null, // "OK"
|
||||
true, // Show Reject button
|
||||
null // "Cancel"
|
||||
);
|
||||
}
|
||||
|
||||
handleDeleteMessages(e) {
|
||||
e.preventDefault();
|
||||
const {formatMessage} = this.props.intl;
|
||||
@@ -717,9 +741,15 @@ class InfoView extends React.Component {
|
||||
:
|
||||
null
|
||||
}
|
||||
<a href="#" className="danger flat-button" onClick={this.handleLeave}>
|
||||
<i className="material-icons">exit_to_app</i> {formatMessage(messages.leave_chat)}
|
||||
</a>
|
||||
{this.state.owner ?
|
||||
<a href="#" className="danger flat-button" onClick={this.handleDeleteTopic}>
|
||||
<i className="material-icons">delete</i> {formatMessage(messages.topic_delete)}
|
||||
</a>
|
||||
:
|
||||
<a href="#" className="danger flat-button" onClick={this.handleLeave}>
|
||||
<i className="material-icons">exit_to_app</i> {formatMessage(messages.leave_chat)}
|
||||
</a>
|
||||
}
|
||||
{!this.state.groupTopic ?
|
||||
<a href="#" className="danger flat-button" onClick={this.handleBlock}>
|
||||
<i className="material-icons">block</i> {formatMessage(messages.block_contact)}
|
||||
|
||||
@@ -123,6 +123,7 @@ class TinodeWeb extends React.Component {
|
||||
this.handleTagsUpdated = this.handleTagsUpdated.bind(this);
|
||||
this.handleLogout = this.handleLogout.bind(this);
|
||||
this.handleDeleteAccount = this.handleDeleteAccount.bind(this);
|
||||
this.handleDeleteTopicRequest = this.handleDeleteTopicRequest.bind(this);
|
||||
this.handleDeleteMessagesRequest = this.handleDeleteMessagesRequest.bind(this);
|
||||
this.handleLeaveUnsubRequest = this.handleLeaveUnsubRequest.bind(this);
|
||||
this.handleBlockTopicRequest = this.handleBlockTopicRequest.bind(this);
|
||||
@@ -1290,6 +1291,21 @@ class TinodeWeb extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
handleDeleteTopicRequest(topicName) {
|
||||
const topic = this.tinode.getTopic(topicName);
|
||||
if (!topic) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Request to hard-delete topic.
|
||||
topic.delTopic(true).then((ctrl) => {
|
||||
// Hide MessagesView and InfoView panels.
|
||||
HashNavigation.navigateTo(HashNavigation.setUrlTopic(window.location.hash, ''));
|
||||
}).catch((err) => {
|
||||
this.handleError(err.message, 'err');
|
||||
});
|
||||
}
|
||||
|
||||
handleDeleteMessagesRequest(topicName) {
|
||||
const topic = this.tinode.getTopic(topicName);
|
||||
if (!topic) {
|
||||
@@ -1655,6 +1671,7 @@ class TinodeWeb extends React.Component {
|
||||
onShowAlert={this.handleShowAlert}
|
||||
onChangePermissions={this.handleChangePermissions}
|
||||
onMemberUpdateRequest={this.handleMemberUpdateRequest}
|
||||
onDeleteTopic={this.handleDeleteTopicRequest}
|
||||
onDeleteMessages={this.handleDeleteMessagesRequest}
|
||||
onLeaveTopic={this.handleLeaveUnsubRequest}
|
||||
onBlockTopic={this.handleBlockTopicRequest}
|
||||
|
||||
@@ -59,7 +59,7 @@ const messages = defineMessages({
|
||||
},
|
||||
topic_delete_warning: {
|
||||
id: 'topic_delete_warning',
|
||||
defaultMessage: 'Are you sure you want to delete this conversation?',
|
||||
defaultMessage: 'Are you sure you want to delete this conversation? It cannot be undone.',
|
||||
description: 'Alert warning when deleting entire topic'
|
||||
},
|
||||
delete_messages_warning: {
|
||||
|
||||
Reference in New Issue
Block a user