From 023b07743af3ba2f4109038bca3010ec490485da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABlle=20Braud?= Date: Tue, 22 Jul 2025 16:10:58 +0000 Subject: [PATCH] Chat fixes : \ hidden button for debug chatroom address (top right of the avatar in conversation info, press and hold right click) \ display year in meeting list if not this year \ try to fix #LINQT-1834 not all imdn status displayed \ chat details panel refacto --- .../core/chat/message/ChatMessageCore.cpp | 42 +- .../core/chat/message/ChatMessageCore.hpp | 2 + .../core/conference/ConferenceInfoList.cpp | 4 +- Linphone/data/languages/de.ts | 475 ++++++++---------- Linphone/data/languages/en.ts | 470 ++++++++--------- Linphone/data/languages/fr_FR.ts | 470 ++++++++--------- Linphone/view/CMakeLists.txt | 3 +- Linphone/view/Control/Container/TabBar.qml | 1 - .../Form/Settings/ScreencastSettings.qml | 1 + .../view/Page/Form/Chat/SelectedChatView.qml | 32 +- .../view/Page/Form/Register/RegisterPage.qml | 1 + .../Page/Layout/Chat/ChatInfoActionsGroup.qml | 16 +- .../Page/Layout/Chat/ConversationInfos.qml | 406 +++++++++++++++ .../Layout/Chat/GroupConversationInfos.qml | 306 ----------- .../Page/Layout/Chat/MessageInfosLayout.qml | 5 +- .../Layout/Chat/OneOneConversationInfos.qml | 195 ------- external/linphone-sdk | 2 +- 17 files changed, 1113 insertions(+), 1318 deletions(-) create mode 100644 Linphone/view/Page/Layout/Chat/ConversationInfos.qml delete mode 100644 Linphone/view/Page/Layout/Chat/GroupConversationInfos.qml delete mode 100644 Linphone/view/Page/Layout/Chat/OneOneConversationInfos.qml diff --git a/Linphone/core/chat/message/ChatMessageCore.cpp b/Linphone/core/chat/message/ChatMessageCore.cpp index 7e280b5b..bbb04676 100644 --- a/Linphone/core/chat/message/ChatMessageCore.cpp +++ b/Linphone/core/chat/message/ChatMessageCore.cpp @@ -41,6 +41,17 @@ bool ImdnStatus::operator!=(ImdnStatus r) { return r.mState != mState || r.mAddress != mAddress || r.mLastUpdatedTime != mLastUpdatedTime; } +ImdnStatus::ImdnStatus() { +} + +ImdnStatus::ImdnStatus(const QString &address, + const LinphoneEnums::ChatMessageState &state, + QDateTime lastUpdatedTime) { + mState = state; + mAddress = address; + mLastUpdatedTime = lastUpdatedTime; +} + ImdnStatus ImdnStatus::createMessageImdnStatusVariant(const QString &address, const LinphoneEnums::ChatMessageState &state, QDateTime lastUpdatedTime) { @@ -330,8 +341,8 @@ void ChatMessageCore::setSelf(QSharedPointer me) { QList ChatMessageCore::computeDeliveryStatus(const std::shared_ptr &message) { mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); QList imdnStatusList; - auto createImdnStatus = [this, &imdnStatusList](std::shared_ptr participant, - linphone::ChatMessage::State state) { + auto createImdnStatus = [this](std::shared_ptr participant, + linphone::ChatMessage::State state) -> ImdnStatus { auto address = participant->getParticipant() ? participant->getParticipant()->getAddress()->clone() : nullptr; auto lastUpdated = QDateTime::fromSecsSinceEpoch(participant->getStateChangeTime()); if (address) { @@ -339,24 +350,30 @@ QList ChatMessageCore::computeDeliveryStatus(const std::shared_ptrasStringUriOnly()); auto imdn = ImdnStatus::createMessageImdnStatusVariant(addrString, LinphoneEnums::fromLinphone(state), lastUpdated); - imdnStatusList.append(imdn); + return imdn; } + return ImdnStatus(); }; + // Read for (auto &participant : message->getParticipantsByImdnState(linphone::ChatMessage::State::Displayed)) { - createImdnStatus(participant, linphone::ChatMessage::State::Displayed); + auto imdn = createImdnStatus(participant, linphone::ChatMessage::State::Displayed); + imdnStatusList.append(imdn); } // Received for (auto &participant : message->getParticipantsByImdnState(linphone::ChatMessage::State::DeliveredToUser)) { - createImdnStatus(participant, linphone::ChatMessage::State::DeliveredToUser); + auto imdn = createImdnStatus(participant, linphone::ChatMessage::State::DeliveredToUser); + imdnStatusList.append(imdn); } // Sent for (auto &participant : message->getParticipantsByImdnState(linphone::ChatMessage::State::Delivered)) { - createImdnStatus(participant, linphone::ChatMessage::State::Delivered); + auto imdn = createImdnStatus(participant, linphone::ChatMessage::State::Delivered); + imdnStatusList.append(imdn); } // Error for (auto &participant : message->getParticipantsByImdnState(linphone::ChatMessage::State::NotDelivered)) { - createImdnStatus(participant, linphone::ChatMessage::State::NotDelivered); + auto imdn = createImdnStatus(participant, linphone::ChatMessage::State::NotDelivered); + imdnStatusList.append(imdn); } return imdnStatusList; } @@ -592,20 +609,25 @@ QStringList ChatMessageCore::getImdnStatusListLabels() const { QList ChatMessageCore::getImdnStatusAsSingletons() const { QList statusSingletons; + statusSingletons.append(createImdnStatusSingletonVariant(LinphoneEnums::ChatMessageState::StateDisplayed, 0)); + statusSingletons.append(createImdnStatusSingletonVariant(LinphoneEnums::ChatMessageState::StateDelivered, 0)); + statusSingletons.append(createImdnStatusSingletonVariant(LinphoneEnums::ChatMessageState::StateDeliveredToUser, 0)); + statusSingletons.append(createImdnStatusSingletonVariant(LinphoneEnums::ChatMessageState::StateNotDelivered, 0)); for (auto &stat : mImdnStatusList) { auto it = std::find_if(statusSingletons.begin(), statusSingletons.end(), [state = stat.mState](QVariant data) { auto dataState = data.toMap()["state"].value(); return state == dataState; }); - if (it == statusSingletons.end()) statusSingletons.push_back(createImdnStatusSingletonVariant(stat.mState, 1)); - else { + if (it == statusSingletons.end()) { + if (!stat.mAddress.isEmpty()) statusSingletons.append(createImdnStatusSingletonVariant(stat.mState, 1)); + } else { auto map = it->toMap(); auto count = map["count"].toInt(); ++count; map.remove("count"); map.insert("count", count); statusSingletons.erase(it); - statusSingletons.push_back(map); + statusSingletons.append(map); } } return statusSingletons; diff --git a/Linphone/core/chat/message/ChatMessageCore.hpp b/Linphone/core/chat/message/ChatMessageCore.hpp index 98c89cf1..44deb190 100644 --- a/Linphone/core/chat/message/ChatMessageCore.hpp +++ b/Linphone/core/chat/message/ChatMessageCore.hpp @@ -46,6 +46,8 @@ public: LinphoneEnums::ChatMessageState mState; QDateTime mLastUpdatedTime; + ImdnStatus(const QString &address, const LinphoneEnums::ChatMessageState &state, QDateTime mLastUpdatedTime); + ImdnStatus(); ImdnStatus operator=(ImdnStatus r); bool operator==(const ImdnStatus &r) const; bool operator!=(ImdnStatus r); diff --git a/Linphone/core/conference/ConferenceInfoList.cpp b/Linphone/core/conference/ConferenceInfoList.cpp index e4c3cdf7..05f17284 100644 --- a/Linphone/core/conference/ConferenceInfoList.cpp +++ b/Linphone/core/conference/ConferenceInfoList.cpp @@ -236,7 +236,9 @@ QVariant ConferenceInfoList::data(const QModelIndex &index, int role) const { if (role == Qt::DisplayRole) { return QVariant::fromValue(new ConferenceInfoGui(mList[row].objectCast())); } else if (role == Qt::DisplayRole + 1) { - return Utils::toDateMonthString(mList[row].objectCast()->getDateTimeUtc()); + auto date = mList[row].objectCast()->getDateTimeUtc(); + if (date.date().year() != QDate::currentDate().year()) return Utils::toDateMonthAndYearString(date); + else return Utils::toDateMonthString(date); } } else { // Dummy date if (role == Qt::DisplayRole) { diff --git a/Linphone/data/languages/de.ts b/Linphone/data/languages/de.ts index 0f93bfac..e9785c91 100644 --- a/Linphone/data/languages/de.ts +++ b/Linphone/data/languages/de.ts @@ -1712,14 +1712,14 @@ ChatAudioContent - - + + information_popup_error_title Error - + information_popup_voice_message_error_message Failed to create voice message : error in recorder @@ -1728,13 +1728,13 @@ ChatCore - + info_toast_deleted_title Deleted - + info_toast_deleted_message_history Message history has been deleted @@ -1807,79 +1807,79 @@ ChatMessage - + chat_message_copy_selection "Copy selection" - + chat_message_copy "Copy" - + chat_message_copied_to_clipboard_title Copied - + chat_message_copied_to_clipboard_toast "to clipboard" - + chat_message_remote_replied %1 replied - + chat_message_forwarded Forwarded - + chat_message_remote_replied_to %1 replied to %2 - + chat_message_user_replied_to You replied to %1 - + chat_message_user_replied You replied - + chat_message_reception_info "Reception info" - + chat_message_reply Reply - + chat_message_forward Forward - + chat_message_delete "Delete" @@ -2034,45 +2034,45 @@ Error ChatMessagesListView - - + + popup_info_find_message_title Find message - + info_popup_no_result_message No result found - + info_popup_first_result_message First result reached - + info_popup_last_result_message Last result reached - + chat_message_list_encrypted_header_title End to end encrypted chat - + chat_message_list_encrypted_header_message Les messages de cette conversation sont chiffrés de bout en bout. Seul votre correspondant peut les déchiffrer. - + chat_message_is_writing_info %1 is writing… @@ -2093,79 +2093,79 @@ Error - + chat_dialog_delete_chat_title Supprimer la conversation ? - + chat_dialog_delete_chat_message "La conversation et tous ses messages seront supprimés." - + chat_list_title "Conversations" - + menu_mark_all_as_read "mark all as read" - + chat_search_in_history "Rechercher une conversation" - + list_filter_no_result_found "Aucun résultat…" - + chat_list_empty_history "Aucune conversation dans votre historique" - + chat_action_start_new_chat "New chat" - + chat_start_group_chat_title "Nouveau groupe" - + chat_action_start_group_chat "Créer" - - + + information_popup_error_title - + group_chat_error_must_have_name "Un nom doit être donné au groupe - + group_call_error_not_connected "Vous n'etes pas connecté" Sie sind nicht verbunden @@ -2784,6 +2784,150 @@ Error Hinzufügen + + ConversationInfos + + + one_one_infos_call + "Appel" + Anrufen + + + + one_one_infos_unmute + "Sourdine" + Unmute + + + + one_one_infos_mute + Stummschalten + + + + one_one_infos_search + "Rechercher" + Suchen + + + + group_infos_participants + Participants (%1) + + + + group_infos_media_docs + Medias & documents + Medien & Dokumente + + + + group_infos_shared_medias + Shared medias + + + + + group_infos_shared_docs + Shared documents + Geteilte Dokumente + + + + group_infos_other_actions + Other actions + Weitere Aktionen + + + + group_infos_ephemerals + Ephemeral messages : + + + + group_infos_enable_ephemerals + Flüchtige Nachrichten aktivieren + + + + group_infos_meeting + Schedule a meeting + Meeting + + + + group_infos_leave_room + Leave chat room + + + + + group_infos_leave_room_toast_title + Leave Chat Room ? + Chatraum verlassen? + + + + group_infos_leave_room_toast_message + All the messages will be removed from the chat room. Do you want to continue ? + Alle Nachrichten werden aus dem Chat entfernt. Möchten Sie fortfahren? + + + + group_infos_delete_history + Delete history + Verlauf löschen + + + + group_infos_delete_history_toast_title + Delete history ? + Verlauf löschen? + + + + group_infos_delete_history_toast_message + All the messages will be removed from the chat room. Do you want to continue ? + Alle Nachrichten werden aus dem Chat entfernt. Möchten Sie fortfahren? + + + + one_one_infos_open_contact + Kontakt öffnen + + + + one_one_infos_create_contact + Kontakt erstellen + + + + one_one_infos_ephemerals + Ephemeral messages : + + + + one_one_infos_enable_ephemerals + Flüchtige Nachrichten aktivieren + + + + one_one_infos_delete_history + Verlauf löschen + + + + one_one_infos_delete_history_toast_title + Delete history ? + Verlauf löschen? + + + + one_one_infos_delete_history_toast_message + All the messages will be removed from the chat room. Do you want to continue ? + Alle Nachrichten werden aus dem Chat entfernt. Möchten Sie fortfahren? + + CreationFormLayout @@ -3016,58 +3160,58 @@ Error EventLogCore - + conference_created_event - + conference_created_terminated - + conference_participant_added_event - + conference_participant_removed_event - - + + conference_security_event - + conference_ephemeral_message_enabled_event - + conference_ephemeral_message_lifetime_changed_event - + conference_ephemeral_message_disabled_event - + conference_subject_changed_event - + conference_participant_unset_admin_event - + conference_participant_set_admin_event @@ -3160,118 +3304,6 @@ Error Participant will be removed from chat room. - - GroupConversationInfos - - - group_infos_call - "Appel" - Anrufen - - - - group_infos_mute - Stummschalten - - - - group_infos_unmute - "Sourdine" - Unmute - - - - group_infos_search - "Rechercher" - - - - - group_infos_meeting - Schedule a meeting - Meeting - - - - group_infos_participants - Participants (%1) - - - - group_infos_media_docs - Medias & documents - Medien & Dokumente - - - group_infos_shared_media - Shared medias - Geteilte Medien - - - - group_infos_shared_docs - Shared documents - Geteilte Dokumente - - - - group_infos_other_actions - Other actions - Weitere Aktionen - - - - group_infos_enable_ephemerals - Flüchtige Nachrichten aktivieren - - - - group_infos_ephemerals - Ephemeral messages : - - - - group_infos_leave_room - Leave chat room - - - - - group_infos_delete_history - Delete history - Verlauf löschen - - - - group_infos_delete_history_toast_title - Delete history ? - Verlauf löschen? - - - - group_infos_delete_history_toast_message - All the messages will be removed from the chat room. Do you want to continue ? - Alle Nachrichten werden aus dem Chat entfernt. Möchten Sie fortfahren? - - - - group_infos_leave_room_toast_title - Leave Chat Room ? - Chatraum verlassen? - - - - group_infos_shared_medias - Shared medias - - - - - group_infos_leave_room_toast_message - All the messages will be removed from the chat room. Do you want to continue ? - Alle Nachrichten werden aus dem Chat entfernt. Möchten Sie fortfahren? - - GroupCreationFormLayout @@ -4374,89 +4406,6 @@ Error - - OneOneConversationInfos - - - one_one_infos_call - "Appel" - Anrufen - - - - one_one_infos_mute - Stummschalten - - - - one_one_infos_unmute - "Sourdine" - Unmute - - - - one_one_infos_search - "Rechercher" - Suchen - - - - one_one_infos_media_docs - Medien & Dokumente - - - - one_one_infos_shared_media - Geteilte Medien - - - - one_one_infos_shared_docs - Geteilte Dokumente - - - - one_one_infos_other_actions - Weitere Aktionen - - - - one_one_infos_enable_ephemerals - Flüchtige Nachrichten aktivieren - - - - one_one_infos_ephemerals - Ephemeral messages : - - - - one_one_infos_delete_history - Verlauf löschen - - - - one_one_infos_delete_history_toast_title - Delete history ? - Verlauf löschen? - - - - one_one_infos_delete_history_toast_message - All the messages will be removed from the chat room. Do you want to continue ? - Alle Nachrichten werden aus dem Chat entfernt. Möchten Sie fortfahren? - - - - one_one_infos_open_contact - Kontakt öffnen - - - - one_one_infos_create_contact - Kontakt erstellen - - ParticipantListView @@ -4980,13 +4929,13 @@ Pour les activer dans un projet commercial, merci de nous contacter. SecuritySettingsLayout - + settings_security_enable_vfs_title "Chiffrer tous les fichiers" Alle Dateien verschlüsseln - + settings_security_enable_vfs_subtitle "Attention, vous ne pourrez pas revenir en arrière !" Warnung: Einmal aktiviert, kann es nicht mehr deaktiviert werden! @@ -5006,25 +4955,25 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + shared_medias_title Shared medias - + shared_documents_title Shared documents - + forward_to_title Forward to… - + conversations_title Conversations @@ -5070,36 +5019,42 @@ Pour les activer dans un projet commercial, merci de nous contacter. - settings_network_title - "Affichage" "Réseau" - Netzwerk + settings_security_title + "Affichage" "Security" + Sicherheit / Verschlüsselung + settings_network_title + "Réseau" + Netzwerk + + + settings_advanced_title "Paramètres avancés" Erweiterte Einstellungen - + contact_editor_popup_abort_confirmation_title Modifications non enregistrées Ungespeicherte Änderungen - + contact_editor_popup_abort_confirmation_message Vous avez des modifications non enregistrées. Si vous quittez cette page, vos changements seront perdus. Voulez-vous enregistrer vos modifications avant de continuer ? Sie haben ungespeicherte Änderungen. Wenn Sie diese Seite verlassen, gehen Ihre Änderungen verloren. Möchten Sie Ihre Änderungen speichern, bevor Sie fortfahren? - + contact_editor_dialog_abort_confirmation_do_not_save "Ne pas enregistrer" Nicht speichern - + contact_editor_dialog_abort_confirmation_save "Enregistrer" Speichern diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index bd1abb6e..b3841258 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -1674,14 +1674,14 @@ ChatAudioContent - - + + information_popup_error_title Error Error - + information_popup_voice_message_error_message Failed to create voice message : error in recorder Failed to create voice message : error in recorder @@ -1690,13 +1690,13 @@ ChatCore - + info_toast_deleted_title Deleted Deleted - + info_toast_deleted_message_history Message history has been deleted Message history has been deleted @@ -1769,79 +1769,79 @@ ChatMessage - + chat_message_copy_selection "Copy selection" Copy selection - + chat_message_copy "Copy" Copy - + chat_message_copied_to_clipboard_title Copied Copied - + chat_message_copied_to_clipboard_toast "to clipboard" in clipboard - + chat_message_remote_replied %1 replied %1 replied to - + chat_message_forwarded Forwarded Forwarded - + chat_message_remote_replied_to %1 replied to %2 %1 replied to %2 - + chat_message_user_replied_to You replied to %1 You replied to %1 - + chat_message_user_replied You replied You replied - + chat_message_reception_info "Reception info" Reception info - + chat_message_reply Reply Reply - + chat_message_forward Forward Forward - + chat_message_delete "Delete" Delete @@ -1996,38 +1996,38 @@ Error ChatMessagesListView - - + + popup_info_find_message_title Find message Find message - + info_popup_no_result_message No result found No result found - + info_popup_first_result_message First result reached First result reached - + info_popup_last_result_message Last result reached Last result reached - + chat_message_list_encrypted_header_title End to end encrypted chat End to end encrypted chat - + chat_message_list_encrypted_header_message Les messages de cette conversation sont chiffrés de bout en bout. Seul votre correspondant peut les déchiffrer. @@ -2035,7 +2035,7 @@ Error Only your correspondent can decrypt them. - + chat_message_is_writing_info %1 is writing… %1 is writing… @@ -2056,79 +2056,79 @@ Only your correspondent can decrypt them. No conversation - + chat_dialog_delete_chat_title Supprimer la conversation ? Delete conversation ? - + chat_dialog_delete_chat_message "La conversation et tous ses messages seront supprimés." This conversation and all its messages will be deleted. - + chat_list_title "Conversations" Conversations - + menu_mark_all_as_read "mark all as read" Mark all as read - + chat_search_in_history "Rechercher une conversation" Search for a chat - + list_filter_no_result_found "Aucun résultat…" No result… - + chat_list_empty_history "Aucune conversation dans votre historique" No conversation in history - + chat_action_start_new_chat "New chat" New conversation - + chat_start_group_chat_title "Nouveau groupe" New group - + chat_action_start_group_chat "Créer" Create - - + + information_popup_error_title Error - + group_chat_error_must_have_name "Un nom doit être donné au groupe A name must be set for the group - + group_call_error_not_connected "Vous n'etes pas connecté" You are not connected @@ -2707,6 +2707,150 @@ Only your correspondent can decrypt them. Add + + ConversationInfos + + + one_one_infos_call + "Appel" + Call + + + + one_one_infos_unmute + "Sourdine" + Unmute + + + + one_one_infos_mute + Mute + + + + one_one_infos_search + "Rechercher" + Search + + + + group_infos_participants + Participants (%1) + + + + group_infos_media_docs + Medias & documents + Medias & documents + + + + group_infos_shared_medias + Shared medias + Shared medias + + + + group_infos_shared_docs + Shared documents + Shared documents + + + + group_infos_other_actions + Other actions + Other actions + + + + group_infos_ephemerals + Ephemeral messages : + + + + group_infos_enable_ephemerals + Enable ephemeral messages + + + + group_infos_meeting + Schedule a meeting + Schedule a meeting + + + + group_infos_leave_room + Leave chat room + Leave Chat Room + + + + group_infos_leave_room_toast_title + Leave Chat Room ? + Leave Chat Room ? + + + + group_infos_leave_room_toast_message + All the messages will be removed from the chat room. Do you want to continue ? + All the messages will be removed from the chat room. Do you want to continue ? + + + + group_infos_delete_history + Delete history + Delete history + + + + group_infos_delete_history_toast_title + Delete history ? + Delete history ? + + + + group_infos_delete_history_toast_message + All the messages will be removed from the chat room. Do you want to continue ? + All the messages will be removed from the chat room. Do you want to continue ? + + + + one_one_infos_open_contact + Show contact + + + + one_one_infos_create_contact + Create contact + + + + one_one_infos_ephemerals + Ephemeral messages : + + + + one_one_infos_enable_ephemerals + Enable ephemeral messages + + + + one_one_infos_delete_history + Delete history + + + + one_one_infos_delete_history_toast_title + Delete history ? + Delete history ? + + + + one_one_infos_delete_history_toast_message + All the messages will be removed from the chat room. Do you want to continue ? + All the messages will be removed from the chat room. Do you want to continue ? + + CreationFormLayout @@ -2939,59 +3083,59 @@ Only your correspondent can decrypt them. EventLogCore - + conference_created_event You have joined the group - + conference_created_terminated You have left the group - + conference_participant_added_event %1 has joined - + conference_participant_removed_event %1 is no longer in the conversation - + conference_participant_set_admin_event %1 is now an admin - + conference_participant_unset_admin_event %1 is no longer an admin - - + + conference_security_event Security level degraded by %1 - + conference_ephemeral_message_enabled_event Ephemeral messages enabled Expiration : %1 - + conference_ephemeral_message_disabled_event Ephemeral messages disabled - + conference_subject_changed_event New subject: %1 - + conference_ephemeral_message_lifetime_changed_event Ephemeral messages updated Expiration : %1 @@ -3085,113 +3229,6 @@ Expiration : %1 Participant will be removed from chat room. - - GroupConversationInfos - - - group_infos_call - "Appel" - Call - - - - group_infos_mute - Mute - - - - group_infos_unmute - "Sourdine" - Unmute - - - - group_infos_meeting - Schedule a meeting - Schedule a meeting - - - - group_infos_participants - Participants (%1) - - - - group_infos_search - "Rechercher" - Search - - - - group_infos_media_docs - Medias & documents - Medias & documents - - - - group_infos_shared_medias - Shared medias - Shared medias - - - - group_infos_shared_docs - Shared documents - Shared documents - - - - group_infos_other_actions - Other actions - Other actions - - - - group_infos_enable_ephemerals - Enable ephemeral messages - - - - group_infos_ephemerals - Ephemeral messages : - - - - group_infos_delete_history - Delete history - Delete history - - - - group_infos_delete_history_toast_title - Delete history ? - Delete history ? - - - - group_infos_delete_history_toast_message - All the messages will be removed from the chat room. Do you want to continue ? - All the messages will be removed from the chat room. Do you want to continue ? - - - - group_infos_leave_room - Leave chat room - Leave Chat Room - - - - group_infos_leave_room_toast_title - Leave Chat Room ? - Leave Chat Room ? - - - - group_infos_leave_room_toast_message - All the messages will be removed from the chat room. Do you want to continue ? - All the messages will be removed from the chat room. Do you want to continue ? - - GroupCreationFormLayout @@ -4280,89 +4317,6 @@ Expiration : %1 No token endpoint found in OpenID configuration - - OneOneConversationInfos - - - one_one_infos_call - "Appel" - Call - - - - one_one_infos_mute - Mute - - - - one_one_infos_unmute - "Sourdine" - Unmute - - - - one_one_infos_search - "Rechercher" - Search - - - - one_one_infos_media_docs - Medias & documents - - - - one_one_infos_shared_media - Shared medias - - - - one_one_infos_shared_docs - Shared documents - - - - one_one_infos_other_actions - Other actions - - - - one_one_infos_enable_ephemerals - Enable ephemeral messages - - - - one_one_infos_ephemerals - Ephemeral messages : - - - - one_one_infos_delete_history - Delete history - - - - one_one_infos_delete_history_toast_title - Delete history ? - Delete history ? - - - - one_one_infos_delete_history_toast_message - All the messages will be removed from the chat room. Do you want to continue ? - All the messages will be removed from the chat room. Do you want to continue ? - - - - one_one_infos_open_contact - Show contact - - - - one_one_infos_create_contact - Create contact - - ParticipantListView @@ -4874,13 +4828,13 @@ To enable them in a commercial project, please contact us. SecuritySettingsLayout - + settings_security_enable_vfs_title "Chiffrer tous les fichiers" Encrypt all files - + settings_security_enable_vfs_subtitle "Attention, vous ne pourrez pas revenir en arrière !" Warning: once enabled it can\'t be disabled! @@ -4900,25 +4854,25 @@ To enable them in a commercial project, please contact us. Reply to %1 - + shared_medias_title Shared medias Shared medias - + shared_documents_title Shared documents Shared documents - + forward_to_title Forward to… Froward to… - + conversations_title Conversations Conversations @@ -4964,36 +4918,42 @@ To enable them in a commercial project, please contact us. - settings_network_title - "Affichage" "Réseau" - Network + settings_security_title + "Affichage" "Security" + Security / Encryption + settings_network_title + "Réseau" + Network + + + settings_advanced_title "Paramètres avancés" Advanced parameters - + contact_editor_popup_abort_confirmation_title Modifications non enregistrées Unsaved changes - + contact_editor_popup_abort_confirmation_message Vous avez des modifications non enregistrées. Si vous quittez cette page, vos changements seront perdus. Voulez-vous enregistrer vos modifications avant de continuer ? You have unsaved changes. If you leave this page, your changes will be lost. Do you want to save your changes before continuing? - + contact_editor_dialog_abort_confirmation_do_not_save "Ne pas enregistrer" Do not save - + contact_editor_dialog_abort_confirmation_save "Enregistrer" Save diff --git a/Linphone/data/languages/fr_FR.ts b/Linphone/data/languages/fr_FR.ts index 0b672aa3..44ef72ea 100644 --- a/Linphone/data/languages/fr_FR.ts +++ b/Linphone/data/languages/fr_FR.ts @@ -1674,14 +1674,14 @@ ChatAudioContent - - + + information_popup_error_title Error Erreur - + information_popup_voice_message_error_message Failed to create voice message : error in recorder Impossible de créer le message vocal : erreur avec l'enregistreur @@ -1690,13 +1690,13 @@ ChatCore - + info_toast_deleted_title Deleted Supprimé - + info_toast_deleted_message_history Message history has been deleted L'historique des messages a été supprimé @@ -1769,79 +1769,79 @@ ChatMessage - + chat_message_copy_selection "Copy selection" Copier la sélection - + chat_message_copy "Copy" Copier - + chat_message_copied_to_clipboard_title Copied Copié - + chat_message_copied_to_clipboard_toast "to clipboard" dans le presse-papiers - + chat_message_remote_replied %1 replied %1 a répondu - + chat_message_forwarded Forwarded Transféré - + chat_message_remote_replied_to %1 replied to %2 %1 a répondu à %2 - + chat_message_user_replied_to You replied to %1 Vous avez répondu à %1 - + chat_message_user_replied You replied Vous avez répondu - + chat_message_reception_info "Reception info" Info de réception - + chat_message_reply Reply Répondre - + chat_message_forward Forward Transférer - + chat_message_delete "Delete" Supprimer @@ -1996,38 +1996,38 @@ Error ChatMessagesListView - - + + popup_info_find_message_title Find message Trouver un message - + info_popup_no_result_message No result found Aucun résultat trouvé - + info_popup_first_result_message First result reached Premier résultat atteint - + info_popup_last_result_message Last result reached Dernier résultat atteint - + chat_message_list_encrypted_header_title End to end encrypted chat Conversation chiffrée de bout en bout - + chat_message_list_encrypted_header_message Les messages de cette conversation sont chiffrés de bout en bout. Seul votre correspondant peut les déchiffrer. @@ -2035,7 +2035,7 @@ Error en bout. Seul votre correspondant peut les déchiffrer. - + chat_message_is_writing_info %1 is writing… %1 est en train d'écrire… @@ -2056,79 +2056,79 @@ en bout. Seul votre correspondant peut les déchiffrer. Aucune conversation - + chat_dialog_delete_chat_title Supprimer la conversation ? Supprimer la conversation ? - + chat_dialog_delete_chat_message "La conversation et tous ses messages seront supprimés." La conversation et tous ses messages seront supprimés. - + chat_list_title "Conversations" Conversations - + menu_mark_all_as_read "mark all as read" Tout marquer comme lu - + chat_search_in_history "Rechercher une conversation" Rechercher une conversation - + list_filter_no_result_found "Aucun résultat…" Aucun résultat… - + chat_list_empty_history "Aucune conversation dans votre historique" Aucune conversation dans votre historique - + chat_action_start_new_chat "New chat" Nouvelle conversation - + chat_start_group_chat_title "Nouveau groupe" Nouveau groupe - + chat_action_start_group_chat "Créer" Créer - - + + information_popup_error_title Erreur - + group_chat_error_must_have_name "Un nom doit être donné au groupe Un nom doit être donné au groupe - + group_call_error_not_connected "Vous n'etes pas connecté" Vous n'êtes pas connecté @@ -2707,6 +2707,150 @@ en bout. Seul votre correspondant peut les déchiffrer. Ajouter + + ConversationInfos + + + one_one_infos_call + "Appel" + Appel + + + + one_one_infos_unmute + "Sourdine" + Réactiver les notifications + + + + one_one_infos_mute + Sourdine + + + + one_one_infos_search + "Rechercher" + Rechercher + + + + group_infos_participants + Participants (%1) + + + + group_infos_media_docs + Medias & documents + Medias & documents + + + + group_infos_shared_medias + Shared medias + Médias partagés + + + + group_infos_shared_docs + Shared documents + Documents partagés + + + + group_infos_other_actions + Other actions + Autres actions + + + + group_infos_ephemerals + Messages éphémères : + + + + group_infos_enable_ephemerals + Activer les messages éphémères + + + + group_infos_meeting + Schedule a meeting + Programmer une réunion + + + + group_infos_leave_room + Leave chat room + Quitter la conversation + + + + group_infos_leave_room_toast_title + Leave Chat Room ? + Quitter la conversation ? + + + + group_infos_leave_room_toast_message + All the messages will be removed from the chat room. Do you want to continue ? + Vous ne recevrez ni pourrez envoyer des messages dans cette conversation, quitter ? + + + + group_infos_delete_history + Delete history + Supprimer l'historique + + + + group_infos_delete_history_toast_title + Delete history ? + Supprimer l'historique ? + + + + group_infos_delete_history_toast_message + All the messages will be removed from the chat room. Do you want to continue ? + Tous les messages seront supprimés. Souhaitez-vous continuer ? + + + + one_one_infos_open_contact + Voir le contact + + + + one_one_infos_create_contact + Créer un contact + + + + one_one_infos_ephemerals + Messages éphémères : + + + + one_one_infos_enable_ephemerals + Activer les messages éphémères + + + + one_one_infos_delete_history + Supprimer l'historique + + + + one_one_infos_delete_history_toast_title + Delete history ? + Supprimer l'historique ? + + + + one_one_infos_delete_history_toast_message + All the messages will be removed from the chat room. Do you want to continue ? + Tous les messages seront supprimés. Souhaitez-vous continuer ? + + CreationFormLayout @@ -2939,60 +3083,60 @@ en bout. Seul votre correspondant peut les déchiffrer. EventLogCore - + conference_created_event Vous avez rejoint le groupe - + conference_created_terminated Vous avez quitté le groupe - + conference_participant_added_event %1 a rejoint le groupe - + conference_participant_removed_event %1 ne fait plus partie du groupe - - + + conference_security_event Niveau de sécurité dégradé par %1 - + conference_ephemeral_message_enabled_event Messages éphémères activés Expiration : %1 - + conference_ephemeral_message_lifetime_changed_event Messages éphémères mis à jour Expiration : %1 - + conference_ephemeral_message_disabled_event Messages éphémères désactivés - + conference_subject_changed_event Nouveau sujet : %1 - + conference_participant_unset_admin_event %1 n'est plus admin - + conference_participant_set_admin_event %1 est maintenant admin @@ -3085,113 +3229,6 @@ Expiration : %1 La participant sere retiré de la conversation - - GroupConversationInfos - - - group_infos_call - "Appel" - Appel - - - - group_infos_mute - Sourdine - - - - group_infos_unmute - "Sourdine" - Réactiver les notifications - - - - group_infos_meeting - Schedule a meeting - Programmer une réunion - - - - group_infos_participants - Participants (%1) - - - - group_infos_search - "Rechercher" - Rechercher - - - - group_infos_media_docs - Medias & documents - Medias & documents - - - - group_infos_shared_medias - Shared medias - Médias partagés - - - - group_infos_shared_docs - Shared documents - Documents partagés - - - - group_infos_other_actions - Other actions - Autres actions - - - - group_infos_enable_ephemerals - Activer les messages éphémères - - - - group_infos_ephemerals - Messages éphémères : - - - - group_infos_delete_history - Delete history - Supprimer l'historique - - - - group_infos_delete_history_toast_title - Delete history ? - Supprimer l'historique ? - - - - group_infos_delete_history_toast_message - All the messages will be removed from the chat room. Do you want to continue ? - Tous les messages seront supprimés. Souhaitez-vous continuer ? - - - - group_infos_leave_room - Leave chat room - Quitter la conversation - - - - group_infos_leave_room_toast_title - Leave Chat Room ? - Quitter la conversation ? - - - - group_infos_leave_room_toast_message - All the messages will be removed from the chat room. Do you want to continue ? - Vous ne recevrez ni pourrez envoyer des messages dans cette conversation, quitter ? - - GroupCreationFormLayout @@ -4280,89 +4317,6 @@ Expiration : %1 Pas de token trouvé dans la configuration OpenID - - OneOneConversationInfos - - - one_one_infos_call - "Appel" - Appel - - - - one_one_infos_mute - Sourdine - - - - one_one_infos_unmute - "Sourdine" - Réactiver les notifications - - - - one_one_infos_search - "Rechercher" - Rechercher - - - - one_one_infos_media_docs - Medias & documents - - - - one_one_infos_shared_media - Médias partagés - - - - one_one_infos_shared_docs - Documents partagés - - - - one_one_infos_other_actions - Autres actions - - - - one_one_infos_enable_ephemerals - Activer les messages éphémères - - - - one_one_infos_ephemerals - Messages éphémères : - - - - one_one_infos_delete_history - Supprimer l'historique - - - - one_one_infos_delete_history_toast_title - Delete history ? - Supprimer l'historique ? - - - - one_one_infos_delete_history_toast_message - All the messages will be removed from the chat room. Do you want to continue ? - Tous les messages seront supprimés. Souhaitez-vous continuer ? - - - - one_one_infos_open_contact - Voir le contact - - - - one_one_infos_create_contact - Créer un contact - - ParticipantListView @@ -4874,13 +4828,13 @@ Pour les activer dans un projet commercial, merci de nous contacter. SecuritySettingsLayout - + settings_security_enable_vfs_title "Chiffrer tous les fichiers" Chiffrer tous les fichiers - + settings_security_enable_vfs_subtitle "Attention, vous ne pourrez pas revenir en arrière !" Attention, vous ne pourrez pas revenir en arrière ! @@ -4900,25 +4854,25 @@ Pour les activer dans un projet commercial, merci de nous contacter.Réponse à %1 - + shared_medias_title Shared medias Médias partagés - + shared_documents_title Shared documents Documents partagés - + forward_to_title Forward to… Transférer à… - + conversations_title Conversations Conversations @@ -4964,36 +4918,42 @@ Pour les activer dans un projet commercial, merci de nous contacter. - settings_network_title - "Affichage" "Réseau" - Réseau + settings_security_title + "Affichage" "Security" + Sécurité / Chiffrement + settings_network_title + "Réseau" + Réseau + + + settings_advanced_title "Paramètres avancés" Paramètres avancés - + contact_editor_popup_abort_confirmation_title Modifications non enregistrées Modifications non enregistrées - + contact_editor_popup_abort_confirmation_message Vous avez des modifications non enregistrées. Si vous quittez cette page, vos changements seront perdus. Voulez-vous enregistrer vos modifications avant de continuer ? Vous avez des modifications non enregistrées. Si vous quittez cette page, vos changements seront perdus. Voulez-vous enregistrer vos modifications avant de continuer ? - + contact_editor_dialog_abort_confirmation_do_not_save "Ne pas enregistrer" Ne pas enregistrer - + contact_editor_dialog_abort_confirmation_save "Enregistrer" Enregistrer diff --git a/Linphone/view/CMakeLists.txt b/Linphone/view/CMakeLists.txt index e35dd996..76a17081 100644 --- a/Linphone/view/CMakeLists.txt +++ b/Linphone/view/CMakeLists.txt @@ -155,12 +155,11 @@ list(APPEND _LINPHONEAPP_QML_FILES view/Page/Layout/Settings/SecuritySettingsLayout.qml view/Page/Layout/Settings/NetworkSettingsLayout.qml view/Page/Layout/Settings/AdvancedSettingsLayout.qml - view/Page/Layout/Chat/GroupConversationInfos.qml view/Page/Layout/Chat/MessageImdnStatusInfos.qml view/Page/Layout/Chat/MessageInfosLayout.qml view/Page/Layout/Chat/MessageReactionsInfos.qml view/Page/Layout/Chat/MessageSharedFilesInfos.qml - view/Page/Layout/Chat/OneOneConversationInfos.qml + view/Page/Layout/Chat/ConversationInfos.qml view/Page/Layout/Chat/ChatInfoActionsGroup.qml view/Page/Layout/Chat/GroupChatInfoParticipants.qml view/Page/Layout/Chat/ManageParticipants.qml diff --git a/Linphone/view/Control/Container/TabBar.qml b/Linphone/view/Control/Container/TabBar.qml index c2e56c7f..e5047f77 100644 --- a/Linphone/view/Control/Container/TabBar.qml +++ b/Linphone/view/Control/Container/TabBar.qml @@ -10,7 +10,6 @@ Control.TabBar { readonly property int originX: count > 0 ? itemAt(0).x : 0 - spacing: Math.round(40 * DefaultStyle.dp) property real pixelSize: Typography.h3.pixelSize property real textWeight: Typography.h3.weight wheelEnabled: true diff --git a/Linphone/view/Control/Form/Settings/ScreencastSettings.qml b/Linphone/view/Control/Form/Settings/ScreencastSettings.qml index 1fae2955..bd3988ba 100644 --- a/Linphone/view/Control/Form/Settings/ScreencastSettings.qml +++ b/Linphone/view/Control/Form/Settings/ScreencastSettings.qml @@ -27,6 +27,7 @@ ColumnLayout { TabBar { Layout.fillWidth: true id: bar + spacing: Math.round(40 * DefaultStyle.dp) pixelSize: Math.round(16 * DefaultStyle.dp) //: "Ecran entier" model: [qsTr("screencast_settings_all_screen_label"), diff --git a/Linphone/view/Page/Form/Chat/SelectedChatView.qml b/Linphone/view/Page/Form/Chat/SelectedChatView.qml index fc59a9c4..9fd14be7 100644 --- a/Linphone/view/Page/Form/Chat/SelectedChatView.qml +++ b/Linphone/view/Page/Form/Chat/SelectedChatView.qml @@ -513,9 +513,7 @@ RowLayout { ? forwardToListsComponent : panelType === SelectedChatView.PanelType.ManageParticipants ? manageParticipantsComponent - : mainItem.chat?.core.isGroupChat - ? groupInfoComponent - : oneToOneInfoComponent + : infoComponent active: detailsPanel.visible onLoaded: { if (contentLoader.item && contentLoader.item.parentView) { @@ -524,10 +522,11 @@ RowLayout { } } - Component { - id: oneToOneInfoComponent - OneOneConversationInfos { - chatGui: mainItem.chat + Component { + id: infoComponent + ConversationInfos { + chatGui: mainItem.chat + onEphemeralSettingsRequested: contentLoader.panelType = SelectedChatView.PanelType.EphemeralSettings onShowSharedFilesRequested: (showMedias) => { contentLoader.panelType = showMedias ? SelectedChatView.PanelType.SharedFiles : SelectedChatView.PanelType.Medias @@ -536,24 +535,9 @@ RowLayout { mainItem.showSearchBar = true detailsPanel.visible = false } - } - } - - Component { - id: groupInfoComponent - GroupConversationInfos { - chatGui: mainItem.chat onManageParticipantsRequested: contentLoader.panelType = SelectedChatView.PanelType.ManageParticipants - onShowSharedFilesRequested: (showMedias) => { - contentLoader.panelType = showMedias ? SelectedChatView.PanelType.SharedFiles : SelectedChatView.PanelType.Medias - } - onEphemeralSettingsRequested: contentLoader.panelType = SelectedChatView.PanelType.EphemeralSettings - onSearchInHistoryRequested: { - mainItem.showSearchBar = true - detailsPanel.visible = false - } - } - } + } + } Component { id: messageReactionsComponent diff --git a/Linphone/view/Page/Form/Register/RegisterPage.qml b/Linphone/view/Page/Form/Register/RegisterPage.qml index 88e8a8ab..ef45de6d 100644 --- a/Linphone/view/Page/Form/Register/RegisterPage.qml +++ b/Linphone/view/Page/Form/Register/RegisterPage.qml @@ -98,6 +98,7 @@ LoginLayout { TabBar { Layout.fillWidth: true id: bar + spacing: Math.round(40 * DefaultStyle.dp) Layout.rightMargin: Math.round(Math.max(5 * DefaultStyle.dp,(127 - ((127/(DefaultStyle.defaultWidth - mainWindow.minimumWidth))*(DefaultStyle.defaultWidth-mainWindow.width))) * DefaultStyle.dp)) // "S'inscrire avec un numéro de téléphone" model: [qsTr("assistant_account_register_with_phone_number"), diff --git a/Linphone/view/Page/Layout/Chat/ChatInfoActionsGroup.qml b/Linphone/view/Page/Layout/Chat/ChatInfoActionsGroup.qml index e8bbb68a..a0343f41 100644 --- a/Linphone/view/Page/Layout/Chat/ChatInfoActionsGroup.qml +++ b/Linphone/view/Page/Layout/Chat/ChatInfoActionsGroup.qml @@ -21,16 +21,18 @@ ColumnLayout { Layout.topMargin: Math.round(5 * DefaultStyle.dp) } - Rectangle { + Control.Control { Layout.fillWidth: true + Layout.preferredHeight: implicitHeight Layout.topMargin: Math.round(9 * DefaultStyle.dp) - color: DefaultStyle.grey_100 - radius: Math.round(15 * DefaultStyle.dp) - height: contentColumn.implicitHeight - - ColumnLayout { - id: contentColumn + background: Rectangle { anchors.fill: parent + color: DefaultStyle.grey_100 + radius: Math.round(15 * DefaultStyle.dp) + } + + contentItem: ColumnLayout { + id: contentColumn spacing: 0 Repeater { diff --git a/Linphone/view/Page/Layout/Chat/ConversationInfos.qml b/Linphone/view/Page/Layout/Chat/ConversationInfos.qml new file mode 100644 index 00000000..56e89254 --- /dev/null +++ b/Linphone/view/Page/Layout/Chat/ConversationInfos.qml @@ -0,0 +1,406 @@ +import QtCore +import QtQuick +import QtQuick.Controls.Basic as Control +import QtQuick.Dialogs +import QtQuick.Effects +import QtQuick.Layouts +import Linphone +import UtilsCpp +import SettingsCpp +import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle + +ColumnLayout { + id: mainItem + property ChatGui chatGui + property var chatCore: chatGui.core + property var contactObj: chatGui ? UtilsCpp.findFriendByAddress(mainItem.chatCore.peerAddress) : null + property var parentView + property bool isGroup: chatCore && chatCore.isGroupChat + spacing: 0 + signal ephemeralSettingsRequested() + signal showSharedFilesRequested() + signal searchInHistoryRequested() + signal manageParticipantsRequested() + + Avatar { + Layout.alignment: Qt.AlignHCenter + contact: contactObj?.value || null + displayNameVal: contact ? "" : mainItem.chatCore.avatarUri + Layout.preferredWidth: Math.round(100 * DefaultStyle.dp) + Layout.preferredHeight: Math.round(100 * DefaultStyle.dp) + PopupButton { + id: debugButton + z: parent.z + 1 + icon.source: "" + anchors.right: parent.right + anchors.top: parent.top + hoverEnabled: false + MouseArea { + z: parent.z + 1 + anchors.fill: parent + acceptedButtons: Qt.LeftButton | Qt.RightButton + onPressAndHold: (mouse) => { + if (mouse.button === Qt.RightButton) debugButton.popup.open() + } + } + popup.contentItem: RowLayout { + Text { + id: chatroomaddress + text: chatCore?.chatRoomAddress || "" + } + SmallButton { + icon.source: AppIcons.copy + onClicked: { + UtilsCpp.copyToClipboard(chatroomaddress.text) + debugButton.close() + } + style: ButtonStyle.noBackground + } + } + } + } + + Component { + id: groupTitleContent + RowLayout { + id: titleMainItem + property bool isEditingSubject: false + property bool canEditSubject: mainItem.chatCore.meAdmin && mainItem.chatCore.isGroupChat + + function saveSubject() { + mainItem.chatCore.lSetSubject(title.text) + } + + Item { + visible: titleMainItem.canEditSubject + Layout.preferredWidth: Math.round(18 * DefaultStyle.dp) + } + + Rectangle { + color: "transparent" + border.color: titleMainItem.isEditingSubject ? DefaultStyle.main1_500_main : "transparent" + border.width: 1 + radius: Math.round(4 * DefaultStyle.dp) + Layout.preferredWidth: Math.round(150 * DefaultStyle.dp) + Layout.preferredHeight: title.contentHeight + anchors.margins: Math.round(2 * DefaultStyle.dp) + + TextEdit { + id: title + anchors.fill: parent + anchors.margins: 6 + font: Typography.p1 + color: DefaultStyle.main2_700 + text: mainItem.chatCore.title || "" + enabled: titleMainItem.isEditingSubject + wrapMode: TextEdit.Wrap + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + Keys.onReturnPressed: { + if (titleMainItem.isEditingSubject) + titleMainItem.saveSubject() + titleMainItem.isEditingSubject = !titleMainItem.isEditingSubject + } + } + } + + Item { + visible: titleMainItem.canEditSubject + Layout.alignment: Qt.AlignVCenter + Layout.preferredWidth: Math.round(18 * DefaultStyle.dp) + Layout.preferredHeight: Math.round(18 * DefaultStyle.dp) + + EffectImage { + anchors.fill: parent + fillMode: Image.PreserveAspectFit + imageSource: titleMainItem.isEditingSubject ? AppIcons.check : AppIcons.pencil + colorizationColor: titleMainItem.isEditingSubject ? DefaultStyle.main1_500_main : DefaultStyle.main2_500main + } + + MouseArea { + id: editMouseArea + anchors.fill: parent + hoverEnabled: true + onClicked: { + if (titleMainItem.isEditingSubject) + titleMainItem.saveSubject() + titleMainItem.isEditingSubject = !titleMainItem.isEditingSubject + } + cursorShape: Qt.PointingHandCursor + } + } + } + } + + Component { + id: oneOneTitleContent + Text { + font: Typography.p1 + color: DefaultStyle.main2_700 + text: mainItem.chatCore.title || "" + } + } + + Loader { + id: titleLayout + Layout.alignment: Qt.AlignHCenter + Layout.topMargin: Math.round(11 * DefaultStyle.dp) + sourceComponent: mainItem.isGroup ? groupTitleContent : oneOneTitleContent + } + + Text { + font: Typography.p3 + color: DefaultStyle.main2_700 + text: mainItem.chatCore.peerAddress + Layout.alignment: Qt.AlignHCenter + Layout.topMargin: Math.round(5 * DefaultStyle.dp) + } + + Text { + visible: contactObj && contactObj.value || false + font: Typography.p3 + color: contactObj?.value != null ? contactObj?.value.core.presenceColor : "transparent" + text: contactObj?.value != null ? contactObj?.value.core.presenceStatus : "" + Layout.alignment: Qt.AlignHCenter + Layout.topMargin: Math.round(5 * DefaultStyle.dp) + } + + RowLayout { + spacing: Math.round(10 * DefaultStyle.dp) + Layout.alignment: Qt.AlignHCenter + Layout.topMargin: Math.round(30 * DefaultStyle.dp) + Layout.preferredHeight: Math.round(110 * DefaultStyle.dp) + Layout.minimumHeight: Math.round(110 * DefaultStyle.dp) + LabelButton { + text.Layout.fillWidth: true + text.horizontalAlignment: Text.AlignHCenter + text.wrapMode: Text.Wrap + Layout.alignment: Qt.AlignTop + Layout.preferredWidth: Math.round(130 * DefaultStyle.dp) + Layout.maximumWidth: Math.round(130 * DefaultStyle.dp) + button.icon.width: Math.round(24 * DefaultStyle.dp) + button.icon.height: Math.round(24 * DefaultStyle.dp) + button.icon.source: AppIcons.phone + //: "Appel" + label: qsTr("one_one_infos_call") + button.onClicked: mainItem.isGroup ? parentView.groupCall() : parentView.oneOneCall(false) + } + LabelButton { + text.Layout.fillWidth: true + text.horizontalAlignment: Text.AlignHCenter + text.wrapMode: Text.Wrap + Layout.alignment: Qt.AlignTop + Layout.preferredWidth: Math.round(130 * DefaultStyle.dp) + Layout.maximumWidth: Math.round(130 * DefaultStyle.dp) + button.icon.width: Math.round(24 * DefaultStyle.dp) + button.icon.height: Math.round(24 * DefaultStyle.dp) + button.icon.source: mainItem.chatCore.muted ? AppIcons.bell : AppIcons.bellSlash + //: "Sourdine" + label: mainItem.chatCore.muted ? qsTr("one_one_infos_unmute") : qsTr("one_one_infos_mute") + button.onClicked: { + mainItem.chatCore.muted = !mainItem.chatCore.muted + } + } + LabelButton { + text.Layout.fillWidth: true + text.horizontalAlignment: Text.AlignHCenter + text.wrapMode: Text.Wrap + Layout.alignment: Qt.AlignTop + Layout.preferredWidth: Math.round(130 * DefaultStyle.dp) + Layout.maximumWidth: Math.round(130 * DefaultStyle.dp) + button.icon.width: Math.round(24 * DefaultStyle.dp) + button.icon.height: Math.round(24 * DefaultStyle.dp) + button.icon.source: AppIcons.search + //: "Rechercher" + label: qsTr("one_one_infos_search") + button.onClicked: { + mainItem.searchInHistoryRequested() + } + } + } + + Control.ScrollView { + id: scrollView + Layout.fillHeight: true + Layout.fillWidth: true + Layout.topMargin: Math.round(30 * DefaultStyle.dp) + clip: true + Layout.leftMargin: Math.round(15 * DefaultStyle.dp) + Layout.rightMargin: Math.round(15 * DefaultStyle.dp) + + ColumnLayout { + spacing: 0 + width: scrollView.width + + Loader { + id: participantLoader + Layout.fillWidth: true + active: mainItem.isGroup + sourceComponent: GroupChatInfoParticipants { + Layout.fillWidth: true + title: qsTr("group_infos_participants").arg(mainItem.chatCore.participants.length) + participants: mainItem.chatCore.participants + chatCore: mainItem.chatCore + onManageParticipantsRequested: mainItem.manageParticipantsRequested() + } + Connections { + target: mainItem.chatCore + onParticipantsChanged : { // hacky reload to update intric height + participantLoader.active = false + participantLoader.active = true + } + } + } + + ChatInfoActionsGroup { + Layout.topMargin: Math.round(30 * DefaultStyle.dp) + //: Medias & documents + title: qsTr("group_infos_media_docs") + entries: [ + { + icon: AppIcons.photo, + visible: true, + //: Shared medias + text: qsTr("group_infos_shared_medias"), + color: DefaultStyle.main2_600, + showRightArrow: true, + action: function() { + mainItem.showSharedFilesRequested(true) + } + }, + { + icon: AppIcons.pdf, + visible: true, + //: Shared documents + text: qsTr("group_infos_shared_docs"), + color: DefaultStyle.main2_600, + showRightArrow: true, + action: function() { + mainItem.showSharedFilesRequested(false) + } + } + ] + } + + ChatInfoActionsGroup { + Layout.topMargin: Math.round(17 * DefaultStyle.dp) + //: Other actions + title: qsTr("group_infos_other_actions") + entries: mainItem.isGroup + ? [ + { + icon: AppIcons.clockCountDown, + visible: !mainItem.chatCore.isReadOnly, + text: mainItem.chatCore.ephemeralEnabled ? qsTr("group_infos_ephemerals")+UtilsCpp.getEphemeralFormatedTime(mainItem.chatCore.ephemeralLifetime) : qsTr("group_infos_enable_ephemerals"), + color: DefaultStyle.main2_600, + showRightArrow: false, + action: function() { + mainItem.ephemeralSettingsRequested() + } + }, + { + visible: !SettingsCpp.disableMeetingsFeature, + icon: AppIcons.videoconference, + color: DefaultStyle.main2_600, + showRightArrow: false, + //: Schedule a meeting + text: qsTr("group_infos_meeting"), + action: function() { + UtilsCpp.getMainWindow().scheduleMeeting(mainItem.chatCore.title, mainItem.chatCore.participantsAddresses) + } + }, + { + icon: AppIcons.signOut, + visible: !mainItem.chatCore.isReadOnly, + //: Leave chat room + text: qsTr("group_infos_leave_room"), + color: DefaultStyle.main2_600, + showRightArrow: false, + action: function() { + //: Leave Chat Room ? + mainWindow.showConfirmationLambdaPopup(qsTr("group_infos_leave_room_toast_title"), + //: All the messages will be removed from the chat room. Do you want to continue ? + qsTr("group_infos_leave_room_toast_message"), + "", + function(confirmed) { + if (confirmed) { + mainItem.chatCore.lLeave() + } + }) + } + }, + { + icon: AppIcons.trashCan, + visible: true, + //: Delete history + text: qsTr("group_infos_delete_history"), + color: DefaultStyle.danger_500main, + showRightArrow: false, + action: function() { + //: Delete history ? + mainWindow.showConfirmationLambdaPopup(qsTr("group_infos_delete_history_toast_title"), + //: All the messages will be removed from the chat room. Do you want to continue ? + qsTr("group_infos_delete_history_toast_message"), + "", + function(confirmed) { + if (confirmed) { + mainItem.chatCore.lDeleteHistory() + } + }) + } + } + ] + : [ + { + icon: contactObj.value ? AppIcons.adressBook : AppIcons.plusCircle, + visible: true, + text: contactObj.value ? qsTr("one_one_infos_open_contact") : qsTr("one_one_infos_create_contact"), + color: DefaultStyle.main2_600, + showRightArrow: false, + action: function() { + // contactObj.value = friendGui + if (contactObj.value) + mainWindow.displayContactPage(contactObj.value.core.defaultAddress) + else + mainWindow.displayCreateContactPage("",mainItem.chatCore.peerAddress) + } + }, + { + icon: AppIcons.clockCountDown, + visible: !mainItem.chatCore.isReadOnly, + text: mainItem.chatCore.ephemeralEnabled ? qsTr("one_one_infos_ephemerals")+UtilsCpp.getEphemeralFormatedTime(mainItem.chatCore.ephemeralLifetime) : qsTr("one_one_infos_enable_ephemerals"), + color: DefaultStyle.main2_600, + showRightArrow: false, + action: function() { + mainItem.ephemeralSettingsRequested() + } + }, + { + icon: AppIcons.trashCan, + visible: true, + text: qsTr("one_one_infos_delete_history"), + color: DefaultStyle.danger_500main, + showRightArrow: false, + action: function() { + //: Delete history ? + mainWindow.showConfirmationLambdaPopup(qsTr("one_one_infos_delete_history_toast_title"), + //: All the messages will be removed from the chat room. Do you want to continue ? + qsTr("one_one_infos_delete_history_toast_message"), + "", + function(confirmed) { + if (confirmed) { + mainItem.chatCore.lDeleteHistory() + } + }) + } + } + ] + } + } + } + + Item { + Layout.fillHeight: true + Layout.preferredHeight: Math.round(50 * DefaultStyle.dp) + } +} diff --git a/Linphone/view/Page/Layout/Chat/GroupConversationInfos.qml b/Linphone/view/Page/Layout/Chat/GroupConversationInfos.qml deleted file mode 100644 index 5e4b3027..00000000 --- a/Linphone/view/Page/Layout/Chat/GroupConversationInfos.qml +++ /dev/null @@ -1,306 +0,0 @@ -import QtCore -import QtQuick -import QtQuick.Controls 2.15 -import QtQuick.Dialogs -import QtQuick.Effects -import QtQuick.Layouts -import Linphone -import UtilsCpp -import SettingsCpp -import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle - -ColumnLayout { - id: mainItem - property ChatGui chatGui - property var chatCore: chatGui.core - property var parentView - property bool manageParticipants: false - signal manageParticipantsRequested() - signal ephemeralSettingsRequested() - signal showSharedFilesRequested(bool showMedias) - signal searchInHistoryRequested() - - spacing: 0 - - Avatar { - Layout.alignment: Qt.AlignHCenter - displayNameVal: mainItem.chatCore.avatarUri - Layout.preferredWidth: Math.round(100 * DefaultStyle.dp) - Layout.preferredHeight: Math.round(100 * DefaultStyle.dp) - } - - RowLayout { - id: titleMainItem - property bool isEditingSubject: false - property bool canEditSubject: mainItem.chatCore.meAdmin && mainItem.chatCore.isGroupChat - Layout.alignment: Qt.AlignHCenter - Layout.topMargin: Math.round(11 * DefaultStyle.dp) - - function saveSubject() { - mainItem.chatCore.lSetSubject(title.text) - } - - Item { - visible: titleMainItem.canEditSubject - Layout.preferredWidth: Math.round(18 * DefaultStyle.dp) - } - - Rectangle { - color: "transparent" - border.color: titleMainItem.isEditingSubject ? DefaultStyle.main1_500_main : "transparent" - border.width: 1 - radius: Math.round(4 * DefaultStyle.dp) - Layout.preferredWidth: Math.round(150 * DefaultStyle.dp) - Layout.preferredHeight: title.contentHeight - anchors.margins: Math.round(2 * DefaultStyle.dp) - - TextEdit { - id: title - anchors.fill: parent - anchors.margins: 6 - font: Typography.p1 - color: DefaultStyle.main2_700 - text: mainItem.chatCore.title || "" - enabled: titleMainItem.isEditingSubject - wrapMode: TextEdit.Wrap - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - Keys.onReturnPressed: { - if (titleMainItem.isEditingSubject) - titleMainItem.saveSubject() - titleMainItem.isEditingSubject = !titleMainItem.isEditingSubject - } - } - } - - Item { - visible: titleMainItem.canEditSubject - Layout.alignment: Qt.AlignVCenter - Layout.preferredWidth: Math.round(18 * DefaultStyle.dp) - Layout.preferredHeight: Math.round(18 * DefaultStyle.dp) - - EffectImage { - anchors.fill: parent - fillMode: Image.PreserveAspectFit - imageSource: titleMainItem.isEditingSubject ? AppIcons.check : AppIcons.pencil - colorizationColor: titleMainItem.isEditingSubject ? DefaultStyle.main1_500_main : DefaultStyle.main2_500main - } - - MouseArea { - id: editMouseArea - anchors.fill: parent - hoverEnabled: true - onClicked: { - if (titleMainItem.isEditingSubject) - titleMainItem.saveSubject() - titleMainItem.isEditingSubject = !titleMainItem.isEditingSubject - } - cursorShape: Qt.PointingHandCursor - } - } - } - - - Text { - font: Typography.p3 - color: DefaultStyle.main2_700 - text: mainItem.chatCore.peerAddress - Layout.alignment: Qt.AlignHCenter - Layout.topMargin: Math.round(5 * DefaultStyle.dp) - } - - RowLayout { - spacing: Math.round(10 * DefaultStyle.dp) - Layout.alignment: Qt.AlignHCenter - Layout.topMargin: Math.round(30 * DefaultStyle.dp) - Layout.preferredHeight: Math.round(100 * DefaultStyle.dp) - Layout.minimumHeight: Math.round(100 * DefaultStyle.dp) - LabelButton { - text.Layout.fillWidth: true - text.horizontalAlignment: Text.AlignHCenter - text.wrapMode: Text.Wrap - Layout.alignment: Qt.AlignTop - Layout.preferredWidth: Math.round(130 * DefaultStyle.dp) - Layout.maximumWidth: Math.round(130 * DefaultStyle.dp) - button.icon.width: Math.round(24 * DefaultStyle.dp) - button.icon.height: Math.round(24 * DefaultStyle.dp) - button.icon.source: chatCore.muted ? AppIcons.bell : AppIcons.bellSlash - //: "Sourdine" - label: chatCore.muted ? qsTr("group_infos_unmute") : qsTr("group_infos_mute") - button.onClicked: chatCore.muted = !chatCore.muted - } - LabelButton { - visible: !SettingsCpp.disableMeetingsFeature - text.Layout.fillWidth: true - text.horizontalAlignment: Text.AlignHCenter - text.wrapMode: Text.Wrap - Layout.alignment: Qt.AlignTop - Layout.preferredWidth: Math.round(130 * DefaultStyle.dp) - Layout.maximumWidth: Math.round(130 * DefaultStyle.dp) - button.icon.width: Math.round(24 * DefaultStyle.dp) - button.icon.height: Math.round(24 * DefaultStyle.dp) - button.icon.source: AppIcons.phone - //: "Appel" - label: qsTr("group_infos_call") - button.onClicked: parentView.groupCall() - } - LabelButton { - text.Layout.fillWidth: true - text.horizontalAlignment: Text.AlignHCenter - text.wrapMode: Text.Wrap - Layout.alignment: Qt.AlignTop - Layout.preferredWidth: Math.round(130 * DefaultStyle.dp) - Layout.maximumWidth: Math.round(130 * DefaultStyle.dp) - button.icon.width: Math.round(24 * DefaultStyle.dp) - button.icon.height: Math.round(24 * DefaultStyle.dp) - button.icon.source: AppIcons.search - //: "Rechercher" - label: qsTr("group_infos_search") - button.onClicked: { - mainItem.searchInHistoryRequested() - } - } - } - - Component { - id: participantList - GroupChatInfoParticipants { - Layout.fillWidth: true - title: qsTr("group_infos_participants").arg(mainItem.chatCore.participants.length) - participants: mainItem.chatCore.participants - chatCore: mainItem.chatCore - onManageParticipantsRequested: mainItem.manageParticipantsRequested() - } - } - - - ScrollView { - id: scrollView - Layout.fillHeight: true - Layout.fillWidth: true - Layout.topMargin: Math.round(30 * DefaultStyle.dp) - clip: true - Layout.leftMargin: Math.round(15 * DefaultStyle.dp) - Layout.rightMargin: Math.round(15 * DefaultStyle.dp) - - ColumnLayout { - spacing: 0 - width: scrollView.width - - Loader { - id: participantLoader - Layout.fillWidth: true - sourceComponent: participantList - Connections { - target: mainItem.chatCore - onParticipantsChanged : { // hacky reload to update intric height - participantLoader.active = false - participantLoader.active = true - } - } - } - - ChatInfoActionsGroup { - Layout.topMargin: Math.round(30 * DefaultStyle.dp) - //: Medias & documents - title: qsTr("group_infos_media_docs") - entries: [ - { - icon: AppIcons.photo, - visible: true, - //: Shared medias - text: qsTr("group_infos_shared_medias"), - color: DefaultStyle.main2_600, - showRightArrow: true, - action: function() { - mainItem.showSharedFilesRequested(true) - } - }, - { - icon: AppIcons.pdf, - visible: true, - //: Shared documents - text: qsTr("group_infos_shared_docs"), - color: DefaultStyle.main2_600, - showRightArrow: true, - action: function() { - mainItem.showSharedFilesRequested(false) - } - } - ] - } - - ChatInfoActionsGroup { - Layout.topMargin: Math.round(17 * DefaultStyle.dp) - //: Other actions - title: qsTr("group_infos_other_actions") - entries: [ - { - icon: AppIcons.clockCountDown, - visible: !mainItem.chatCore.isReadOnly, - text: mainItem.chatCore.ephemeralEnabled ? qsTr("group_infos_ephemerals")+UtilsCpp.getEphemeralFormatedTime(mainItem.chatCore.ephemeralLifetime) : qsTr("group_infos_enable_ephemerals"), - color: DefaultStyle.main2_600, - showRightArrow: false, - action: function() { - mainItem.ephemeralSettingsRequested() - } - }, - { - visible: !SettingsCpp.disableMeetingsFeature, - icon: AppIcons.videoconference, - color: DefaultStyle.main2_600, - showRightArrow: false, - //: Schedule a meeting - text: qsTr("group_infos_meeting"), - action: function() { - UtilsCpp.getMainWindow().scheduleMeeting(mainItem.chatCore.title, mainItem.chatCore.participantsAddresses) - } - }, - { - icon: AppIcons.signOut, - visible: !mainItem.chatCore.isReadOnly, - //: Leave chat room - text: qsTr("group_infos_leave_room"), - color: DefaultStyle.main2_600, - showRightArrow: false, - action: function() { - //: Leave Chat Room ? - mainWindow.showConfirmationLambdaPopup(qsTr("group_infos_leave_room_toast_title"), - //: All the messages will be removed from the chat room. Do you want to continue ? - qsTr("group_infos_leave_room_toast_message"), - "", - function(confirmed) { - if (confirmed) { - mainItem.chatCore.lLeave() - } - }) - } - }, - { - icon: AppIcons.trashCan, - visible: true, - //: Delete history - text: qsTr("group_infos_delete_history"), - color: DefaultStyle.danger_500main, - showRightArrow: false, - action: function() { - //: Delete history ? - mainWindow.showConfirmationLambdaPopup(qsTr("group_infos_delete_history_toast_title"), - //: All the messages will be removed from the chat room. Do you want to continue ? - qsTr("group_infos_delete_history_toast_message"), - "", - function(confirmed) { - if (confirmed) { - mainItem.chatCore.lDeleteHistory() - } - }) - } - } - ] - } - } - } - Item { - Layout.preferredHeight: Math.round(50 * DefaultStyle.dp) - } -} diff --git a/Linphone/view/Page/Layout/Chat/MessageInfosLayout.qml b/Linphone/view/Page/Layout/Chat/MessageInfosLayout.qml index d15c5cfc..ac32f518 100644 --- a/Linphone/view/Page/Layout/Chat/MessageInfosLayout.qml +++ b/Linphone/view/Page/Layout/Chat/MessageInfosLayout.qml @@ -43,16 +43,19 @@ ColumnLayout { ColumnLayout { id: contentLayout - spacing: Math.round(21 * DefaultStyle.dp) Layout.leftMargin: Math.round(16 * DefaultStyle.dp) Layout.rightMargin: Math.round(16 * DefaultStyle.dp) + spacing: Math.round(21 * DefaultStyle.dp) TabBar { id: tabbar + onCurrentIndexChanged: console.log("current index", currentIndex) visible: mainItem.tabbarModel !== undefined Layout.fillWidth: true + Layout.preferredWidth: parent.width model: mainItem.tabbarModel pixelSize: Typography.h3m.pixelSize textWeight: Typography.h3m.weight + spacing: Math.round(10 * DefaultStyle.dp) } ListView { diff --git a/Linphone/view/Page/Layout/Chat/OneOneConversationInfos.qml b/Linphone/view/Page/Layout/Chat/OneOneConversationInfos.qml deleted file mode 100644 index 6819628b..00000000 --- a/Linphone/view/Page/Layout/Chat/OneOneConversationInfos.qml +++ /dev/null @@ -1,195 +0,0 @@ -import QtCore -import QtQuick -import QtQuick.Controls.Basic as Control -import QtQuick.Dialogs -import QtQuick.Effects -import QtQuick.Layouts -import Linphone -import UtilsCpp -import SettingsCpp -import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle - -ColumnLayout { - id: mainItem - property ChatGui chatGui - property var chatCore: chatGui.core - property var contactObj: chatGui ? UtilsCpp.findFriendByAddress(mainItem.chatCore.peerAddress) : null - property var parentView - spacing: 0 - signal ephemeralSettingsRequested() - signal showSharedFilesRequested() - signal searchInHistoryRequested() - - - Avatar { - Layout.alignment: Qt.AlignHCenter - contact: contactObj?.value || null - displayNameVal: contact ? "" : mainItem.chatCore.avatarUri - Layout.preferredWidth: Math.round(100 * DefaultStyle.dp) - Layout.preferredHeight: Math.round(100 * DefaultStyle.dp) - } - - Text { - font: Typography.p1 - color: DefaultStyle.main2_700 - text: mainItem.chatCore.title || "" - Layout.alignment: Qt.AlignHCenter - Layout.topMargin: Math.round(11 * DefaultStyle.dp) - } - - Text { - font: Typography.p3 - color: DefaultStyle.main2_700 - text: mainItem.chatCore.peerAddress - Layout.alignment: Qt.AlignHCenter - Layout.topMargin: Math.round(5 * DefaultStyle.dp) - } - - Text { - visible: contactObj && contactObj.value || false - font: Typography.p3 - color: contactObj?.value != null ? contactObj?.value.core.presenceColor : "transparent" - text: contactObj?.value != null ? contactObj?.value.core.presenceStatus : "" - Layout.alignment: Qt.AlignHCenter - Layout.topMargin: Math.round(5 * DefaultStyle.dp) - } - - RowLayout { - spacing: Math.round(10 * DefaultStyle.dp) - Layout.alignment: Qt.AlignHCenter - Layout.topMargin: Math.round(30 * DefaultStyle.dp) - Layout.preferredHeight: Math.round(110 * DefaultStyle.dp) - Layout.minimumHeight: Math.round(110 * DefaultStyle.dp) - LabelButton { - text.Layout.fillWidth: true - text.horizontalAlignment: Text.AlignHCenter - text.wrapMode: Text.Wrap - Layout.alignment: Qt.AlignTop - Layout.preferredWidth: Math.round(130 * DefaultStyle.dp) - Layout.maximumWidth: Math.round(130 * DefaultStyle.dp) - button.icon.width: Math.round(24 * DefaultStyle.dp) - button.icon.height: Math.round(24 * DefaultStyle.dp) - button.icon.source: AppIcons.phone - //: "Appel" - label: qsTr("one_one_infos_call") - button.onClicked: parentView.oneOneCall(false) - } - LabelButton { - text.Layout.fillWidth: true - text.horizontalAlignment: Text.AlignHCenter - text.wrapMode: Text.Wrap - Layout.alignment: Qt.AlignTop - Layout.preferredWidth: Math.round(130 * DefaultStyle.dp) - Layout.maximumWidth: Math.round(130 * DefaultStyle.dp) - button.icon.width: Math.round(24 * DefaultStyle.dp) - button.icon.height: Math.round(24 * DefaultStyle.dp) - button.icon.source: mainItem.chatCore.muted ? AppIcons.bell : AppIcons.bellSlash - //: "Sourdine" - label: mainItem.chatCore.muted ? qsTr("one_one_infos_unmute") : qsTr("one_one_infos_mute") - button.onClicked: { - mainItem.chatCore.muted = !mainItem.chatCore.muted - } - } - LabelButton { - text.Layout.fillWidth: true - text.horizontalAlignment: Text.AlignHCenter - text.wrapMode: Text.Wrap - Layout.alignment: Qt.AlignTop - Layout.preferredWidth: Math.round(130 * DefaultStyle.dp) - Layout.maximumWidth: Math.round(130 * DefaultStyle.dp) - button.icon.width: Math.round(24 * DefaultStyle.dp) - button.icon.height: Math.round(24 * DefaultStyle.dp) - button.icon.source: AppIcons.search - //: "Rechercher" - label: qsTr("one_one_infos_search") - button.onClicked: { - mainItem.searchInHistoryRequested() - } - } - } - - ChatInfoActionsGroup { - Layout.leftMargin: Math.round(15 * DefaultStyle.dp) - Layout.rightMargin: Math.round(12 * DefaultStyle.dp) - Layout.topMargin: Math.round(30 * DefaultStyle.dp) - title: qsTr("one_one_infos_media_docs") - entries: [ - { - icon: AppIcons.photo, - visible: true, - text: qsTr("one_one_infos_shared_media"), - color: DefaultStyle.main2_600, - showRightArrow: true, - action: function() { - mainItem.showSharedFilesRequested(true) - } - }, - { - icon: AppIcons.pdf, - visible: true, - text: qsTr("one_one_infos_shared_docs"), - color: DefaultStyle.main2_600, - showRightArrow: true, - action: function() { - mainItem.showSharedFilesRequested(false) - } - } - ] - } - - ChatInfoActionsGroup { - Layout.leftMargin: Math.round(15 * DefaultStyle.dp) - Layout.rightMargin: Math.round(12 * DefaultStyle.dp) - Layout.topMargin: Math.round(17 * DefaultStyle.dp) - title: qsTr("one_one_infos_other_actions") - entries: [ - { - icon: contactObj.value ? AppIcons.adressBook : AppIcons.plusCircle, - visible: true, - text: contactObj.value ? qsTr("one_one_infos_open_contact") : qsTr("one_one_infos_create_contact"), - color: DefaultStyle.main2_600, - showRightArrow: false, - action: function() { - // contactObj.value = friendGui - if (contactObj.value) - mainWindow.displayContactPage(contactObj.value.core.defaultAddress) - else - mainWindow.displayCreateContactPage("",mainItem.chatCore.peerAddress) - } - }, - { - icon: AppIcons.clockCountDown, - visible: !mainItem.chatCore.isReadOnly, - text: mainItem.chatCore.ephemeralEnabled ? qsTr("one_one_infos_ephemerals")+UtilsCpp.getEphemeralFormatedTime(mainItem.chatCore.ephemeralLifetime) : qsTr("one_one_infos_enable_ephemerals"), - color: DefaultStyle.main2_600, - showRightArrow: false, - action: function() { - mainItem.ephemeralSettingsRequested() - } - }, - { - icon: AppIcons.trashCan, - visible: true, - text: qsTr("one_one_infos_delete_history"), - color: DefaultStyle.danger_500main, - showRightArrow: false, - action: function() { - //: Delete history ? - mainWindow.showConfirmationLambdaPopup(qsTr("one_one_infos_delete_history_toast_title"), - //: All the messages will be removed from the chat room. Do you want to continue ? - qsTr("one_one_infos_delete_history_toast_message"), - "", - function(confirmed) { - if (confirmed) { - mainItem.chatCore.lDeleteHistory() - } - }) - } - } - ] - } - - Item { - Layout.fillHeight: true - } -} diff --git a/external/linphone-sdk b/external/linphone-sdk index 4962e9b6..7de88db2 160000 --- a/external/linphone-sdk +++ b/external/linphone-sdk @@ -1 +1 @@ -Subproject commit 4962e9b64f5baaa710ce997daa38ebe6502fed2b +Subproject commit 7de88db26dcc9e9b165811e5efc5ca9d2108112b