Merge branch 'devel' into features
This commit is contained in:
+2
-2
@@ -462,7 +462,7 @@ div.alert .content {
|
||||
position: relative;
|
||||
display: flex;
|
||||
height: 100%;
|
||||
max-width: 80rem;
|
||||
max-width: 84rem;
|
||||
overflow: hidden;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
@@ -1416,7 +1416,7 @@ i.search {
|
||||
.chat-box .bubble {
|
||||
position: relative;
|
||||
display: flex;
|
||||
max-width: 40rem;
|
||||
max-width: 36rem;
|
||||
min-width: 9rem;
|
||||
height: auto;
|
||||
padding: 0.75rem 0.5rem 0.75rem 0.5rem;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+5
-5
@@ -22,11 +22,11 @@
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,500,700,700i" />
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
|
||||
<link rel="stylesheet" href="css/base.min.css" />
|
||||
<script crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/react@17.0.1/umd/react.production.min.js"></script>
|
||||
<script crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/react-dom@17.0.1/umd/react-dom.production.min.js"></script>
|
||||
<script crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/react-intl@5.18.3/react-intl.iife.min.js"></script>
|
||||
<script crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/firebase@8.7.1/firebase-app.js"></script>
|
||||
<script crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/firebase@8.7.1/firebase-messaging.js"></script>
|
||||
<script crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/react@17.0.2/umd/react.production.min.js"></script>
|
||||
<script crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/react-dom@17.0.2/umd/react-dom.production.min.js"></script>
|
||||
<script crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/react-intl@5.20.7/react-intl.iife.min.js"></script>
|
||||
<script crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/firebase@8.9.1/firebase-app.js"></script>
|
||||
<script crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/firebase@8.9.1/firebase-messaging.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<noscript><div id="noscript-message"><div id="noscript-title">Javascript support is required.</div>
|
||||
|
||||
Generated
+969
-1510
File diff suppressed because it is too large
Load Diff
+5
-5
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tinode-webapp",
|
||||
"description": "Tinode messenger for the web",
|
||||
"version": "0.17.8",
|
||||
"version": "0.17.8-rc1",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/tinode/example-react-js.git"
|
||||
@@ -64,11 +64,11 @@
|
||||
"author": "Tinode Authors <info@tinode.co>",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"firebase": "^8.7.1",
|
||||
"react": "^17.0.1",
|
||||
"react-dom": "^17.0.1",
|
||||
"firebase": "^8.9.1",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-intl": "^5.20.2",
|
||||
"tinode-sdk": "^0.17.8"
|
||||
"tinode-sdk": "^0.17.8-rc1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.14.5",
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// Must be located at the root.
|
||||
importScripts('https://cdn.jsdelivr.net/npm/firebase@8.7.1/firebase-app.js');
|
||||
importScripts('https://cdn.jsdelivr.net/npm/firebase@8.7.1/firebase-messaging.js');
|
||||
importScripts('https://cdn.jsdelivr.net/npm/firebase@8.9.1/firebase-app.js');
|
||||
importScripts('https://cdn.jsdelivr.net/npm/firebase@8.9.1/firebase-messaging.js');
|
||||
importScripts('firebase-init.js');
|
||||
importScripts('version.js');
|
||||
|
||||
|
||||
+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";
|
||||
|
||||
@@ -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
|
||||
}
|
||||
{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: {
|
||||
|
||||
+60
-13
File diff suppressed because one or more lines are too long
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
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,3 +1,3 @@
|
||||
// This is a generated file. Don't edit.
|
||||
|
||||
const PACKAGE_VERSION = "0.17.8";
|
||||
const PACKAGE_VERSION = "0.17.8-rc1";
|
||||
|
||||
Reference in New Issue
Block a user