-
-
-
-
-
+
+
+
"""
diff --git a/app/script/components/asset/linkPreviewCompactAsset.coffee b/app/script/components/asset/linkPreviewCompactAsset.coffee
deleted file mode 100644
index f22ce4f2c86..00000000000
--- a/app/script/components/asset/linkPreviewCompactAsset.coffee
+++ /dev/null
@@ -1,80 +0,0 @@
-#
-# Wire
-# Copyright (C) 2016 Wire Swiss GmbH
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see http://www.gnu.org/licenses/.
-#
-
-window.z ?= {}
-z.components ?= {}
-
-class z.components.LinkPreviewCompactAssetComponent
- ###
- Construct a new audio asset.
-
- @param params [Object]
- @option params [z.entity.LinkPreview] preview
- ###
- constructor: (params, component_info) ->
-
- @message_et = ko.unwrap params.message
- @header = params.header or false
-
- @preview = @message_et.get_first_asset().previews()[0]
- @element = component_info.element
- @url = @preview.original_url
-
- @element.addEventListener 'click', @on_link_preview_click
-
- on_link_preview_click: =>
- z.util.safe_window_open @url
-
- dispose: =>
- @element.removeEventListener 'click', @on_link_preview_click
-
-
-ko.components.register 'link-preview-compact-asset',
- viewModel: createViewModel: (params, component_info) ->
- return new z.components.LinkPreviewCompactAssetComponent params, component_info
- template: """
-
-
-
-
-
-
-
-
-
- """
diff --git a/app/script/conversation/ConversationRepository.coffee b/app/script/conversation/ConversationRepository.coffee
index 1f2def404b9..f4bfe862294 100644
--- a/app/script/conversation/ConversationRepository.coffee
+++ b/app/script/conversation/ConversationRepository.coffee
@@ -1066,10 +1066,27 @@ class z.conversation.ConversationRepository
@logger.error "Error while sending text message: #{error.message}", error
throw error
+ ###
+ Toggle like status of message.
+ @param conversation [z.entity.Conversation]
+ @param message_et [z.entity.Message]
+ @param button [Boolean]
+ ###
+ toggle_like: (conversation_et, message_et, button) =>
+ return if conversation_et.removed_from_conversation()
+
+ reaction = if message_et.is_liked() then z.message.ReactionType.NONE else z.message.ReactionType.LIKE
+ message_et.is_liked not message_et.is_liked()
+
+ window.setTimeout =>
+ @send_reaction conversation_et, message_et, reaction
+ @_track_reaction conversation_et, message_et, reaction, button
+ , 50
+
###
Send reaction to a content message in specified conversation.
@param conversation [z.entity.Conversation] Conversation to send reaction in
- @param message_et [String] ID of message for react to
+ @param message_et [z.entity.Message]
@param reaction [z.message.ReactionType]
###
send_reaction: (conversation_et, message_et, reaction) =>
@@ -2481,6 +2498,25 @@ class z.conversation.ConversationRepository
if youtube_links
amplify.publish z.event.WebApp.ANALYTICS.EVENT, z.tracking.SessionEventName.INTEGER.YOUTUBE_LINKS_SENT, youtube_links.length
+
+ ###
+ Track reaction action.
+
+ @param conversation_et [z.entity.Conversation]
+ @param message_et [z.entity.Message]
+ @param reaction [z.message.ReactionType]
+ @param button [Boolean]
+ ###
+ _track_reaction: (conversation_et, message_et, reaction, button = true) ->
+ amplify.publish z.event.WebApp.ANALYTICS.EVENT, z.tracking.EventName.CONVERSATION.REACTED_TO_MESSAGE,
+ conversation_type: z.tracking.helpers.get_conversation_type conversation_et
+ action: if reaction then 'like' else 'unlike'
+ with_bot: conversation_et.is_with_bot()
+ method: if button then 'button' else 'menu'
+ user: if message_et.user().is_me then 'sender' else 'receiver'
+ type: z.tracking.helpers.get_message_type message_et
+ reacted_to_last_message: conversation_et.get_last_message() is message_et
+
###
Add new device message to conversations.
@param user_id [String] ID of user to add client to
diff --git a/app/script/conversation/ConversationService.coffee b/app/script/conversation/ConversationService.coffee
index b4fcfda292e..3319ded81dd 100644
--- a/app/script/conversation/ConversationService.coffee
+++ b/app/script/conversation/ConversationService.coffee
@@ -234,33 +234,6 @@ class z.conversation.ConversationService
@logger.error "Failed to get event for conversation '#{conversation_id}': #{error.message}", error
throw error
- ###
- Load conversation events. Start and end are not included. Events are always sorted beginning with the newest timestamp.
-
- TODO: This function can be removed once Microsoft Edge's IndexedDB supports compound indices:
- - https://developer.microsoft.com/en-us/microsoft-edge/platform/status/indexeddbarraysandmultientrysupport/
-
- @param conversation_id [String] ID of conversation
- @param start [Number] starting from this timestamp
- @param end [Number] stop when reaching timestamp
- @param limit [Number] Amount of events to load
- @return [Promise] Promise that resolves with the retrieved records
- ###
- _load_events_from_db_deprecated: (conversation_id, start, end, limit) ->
- @storage_service.db[@storage_service.OBJECT_STORE_CONVERSATION_EVENTS]
- .where 'conversation'
- .equals conversation_id
- .reverse()
- .sortBy 'time'
- .then (records) ->
- return records.filter (record) ->
- timestamp = new Date(record.time).getTime()
- return false if start and timestamp >= start
- return false if end and timestamp <= end
- return true
- .then (records) ->
- return records.slice 0, limit
-
###
Load conversation events. Start and end are not included.
Events are always sorted beginning with the newest timestamp.
diff --git a/app/script/conversation/EventMapper.coffee b/app/script/conversation/EventMapper.coffee
index ab2095e7610..d2a6127e2a2 100644
--- a/app/script/conversation/EventMapper.coffee
+++ b/app/script/conversation/EventMapper.coffee
@@ -398,6 +398,8 @@ class z.conversation.EventMapper
###
_map_asset_medium_image: (event, should_create_dummy_image) ->
asset_et = new z.entity.MediumImage event.data.id
+ asset_et.file_size = event.data.content_length
+ asset_et.file_type = event.data.content_type
asset_et.width = event.data.info.width
asset_et.height = event.data.info.height
asset_et.ratio = asset_et.height / asset_et.width
diff --git a/app/script/entity/Conversation.coffee b/app/script/entity/Conversation.coffee
index e9d7a969b08..6cc010a748e 100644
--- a/app/script/entity/Conversation.coffee
+++ b/app/script/entity/Conversation.coffee
@@ -486,9 +486,8 @@ class z.entity.Conversation
###
is_with_bot: =>
return false if not @is_one2one()
- return false if not @participating_user_ets()[0]
- possible_bot_email = @participating_user_ets()[0].email()
- return !!possible_bot_email?.match /(anna|ottobot|welcome)(\+\S+)?@wire.com/ig
+ return false if not @participating_user_ets()[0]?.username()
+ return @participating_user_ets()[0].username() in ['annathebot', 'ottothebot']
###############################################################################
# Serialization
diff --git a/app/script/entity/message/File.coffee b/app/script/entity/message/File.coffee
index d39440c3990..a5246325bd7 100644
--- a/app/script/entity/message/File.coffee
+++ b/app/script/entity/message/File.coffee
@@ -46,7 +46,6 @@ class z.entity.File extends z.entity.Asset
@preview_resource = ko.observable()
@download_progress = ko.pureComputed => @original_resource()?.download_progress()
- @cancel_download = => @original_resource()?.cancel_download()
@upload_id = ko.observable()
@upload_progress = ko.observable()
@@ -116,6 +115,10 @@ class z.entity.File extends z.entity.Asset
@logger.error 'Failed to download asset', error
amplify.publish z.event.WebApp.ANALYTICS.EVENT, z.tracking.EventName.FILE.DOWNLOAD_FAILED, tracking_data
+ cancel_download: =>
+ @status z.assets.AssetTransferState.UPLOADED
+ @original_resource()?.cancel_download()
+
cancel: (message_et) =>
amplify.publish z.event.WebApp.CONVERSATION.ASSET.CANCEL, message_et
diff --git a/app/script/entity/message/MediumImage.coffee b/app/script/entity/message/MediumImage.coffee
index 1eac8d2c614..f2a0f49669c 100644
--- a/app/script/entity/message/MediumImage.coffee
+++ b/app/script/entity/message/MediumImage.coffee
@@ -35,5 +35,23 @@ class z.entity.MediumImage extends z.entity.Asset
@width = '0px'
@height = '0px'
+ @file_name = ''
+ @file_size = ''
+ @file_type = ''
+
# z.assets.AssetRemoteData
@resource = ko.observable()
+
+ ###
+ # TODO combine with file
+ Loads and decrypts otr asset as initiates download
+ @return [Promise] Returns a promise that resolves with the asset as blob
+ ###
+ download: (file_name) =>
+ @resource()?.load().then (blob) =>
+ if file_name? or not @file_name
+ file_extension = @file_type.split('/').pop()
+ file_name = "#{file_name}.#{file_extension}"
+ else
+ file_name = @file_name
+ return z.util.download_blob blob, file_name
diff --git a/app/script/localization/strings-de.coffee b/app/script/localization/strings-de.coffee
index f68bf47241f..3e2bf8637c4 100644
--- a/app/script/localization/strings-de.coffee
+++ b/app/script/localization/strings-de.coffee
@@ -270,6 +270,9 @@ z.string.de.conversation_edit_timestamp = 'Editiert um %@timestamp'
z.string.de.conversation_likes_caption = '%@number Personen'
z.string.de.conversation_send_pasted_file = 'Bild eingefügt am %date'
+# Collection
+z.string.de.collection_show_all = 'Zeige alle %no'
+
# Archive
z.string.de.archive_header = 'Archivieren'
@@ -302,8 +305,8 @@ z.string.de.invite_meta_key_pc = 'Strg'
z.string.de.invite_hint_selected = 'Zum Kopieren %meta_key + C drücken'
z.string.de.invite_hint_unselected = 'Markieren und %meta_key + C drücken'
z.string.de.invite_headline = 'Lade Freunde zu Wire ein'
-z.string.de.invite_message = 'Ich benutze Wire. Suche nach %username oder gehe auf wire.com/download.'
-z.string.de.invite_message_no_email = 'Ich bin bei Wire. Gehe auf https://get.wire.com, um mich als Kontakt hinzuzufügen.'
+z.string.de.invite_message = 'Ich benutze Wire. Suche nach %username oder gehe auf get.wire.com.'
+z.string.de.invite_message_no_email = 'Ich benutze Wire. Gehe auf get.wire.com, um mich als Kontakt hinzuzufügen.'
# Extensions
z.string.de.extensions_bubble_button_gif = 'Gif'
@@ -522,6 +525,7 @@ z.string.de.warning_connectivity_no_internet = 'Keine Internetverbindung. Du kan
# Browser notifications
z.string.de.system_notification_asset_add = 'Hat ein Bild geteilt'
z.string.de.system_notification_connection_accepted = 'Hat deine Kontaktanfrage akzeptiert'
+z.string.de.system_notification_connection_connected = 'Ist jetzt ein Kontakt von dir'
z.string.de.system_notification_connection_request = 'Möchte dich als Kontakt hinzufügen'
z.string.de.system_notification_conversation_create = '%s.first_name hat eine Unterhaltung begonnen'
z.string.de.system_notification_conversation_rename = '%s.first_name hat die Unterhaltung in %name umbenannt'
diff --git a/app/script/localization/strings-es.coffee b/app/script/localization/strings-es.coffee
index f5f94e5a4a3..83ced2be3ac 100644
--- a/app/script/localization/strings-es.coffee
+++ b/app/script/localization/strings-es.coffee
@@ -266,6 +266,9 @@ z.string.es.conversation_context_menu_unlike = 'No me gusta'
z.string.es.conversation_delete_timestamp = 'Eliminados en %@fecha y hora'
z.string.es.conversation_edit_timestamp = 'Editado %@fecha y hora'
z.string.es.conversation_likes_caption = '%@numbero de personas'
+z.string.es.conversation_send_pasted_file = 'Imagen pegada el %date'
+
+# Collection
# Archive
z.string.es.archive_header = 'Archivar'
@@ -445,7 +448,8 @@ z.string.es.preferences_options_data_checkbox = 'Reportes de uso y fallas'
z.string.es.preferences_options_data_detail = 'Ayudar a mejorar Wire enviando información anónima.'
z.string.es.preferences_options_notifications = 'Notificaciones'
z.string.es.preferences_options_notifications_none = 'Desactivar'
-z.string.es.preferences_options_notifications_obfuscate = 'Ocultar detalles del mensaje'
+z.string.es.preferences_options_notifications_obfuscate = 'Ocultar detalles'
+z.string.es.preferences_options_notifications_obfuscate_message = 'Mostrar remitente'
z.string.es.preferences_options_notifications_on = 'Mostrar remitente y mensaje'
# Search
@@ -453,7 +457,10 @@ z.string.es.search_group_hint = 'Seguir intentando o elegir más personas para c
z.string.es.search_connect = 'Conectar'
z.string.es.search_connections = 'Conexiones'
z.string.es.search_groups = 'Grupos'
+z.string.es.search_placeholder = 'Buscar por nombre o usuario'
z.string.es.search_top_people = 'Personas más importantes'
+z.string.es.search_try_search = 'Encontrar personas por nombre o usuario'
+z.string.es.search_no_contacts_on_wire = 'No tienes contactos en Wire. Trata de encontrar personas por nombre o usuario.'
z.string.es.search_others = 'Conectar'
z.string.es.search_friend_in_common = '%no persona en común'
z.string.es.search_friends_in_common = '%no personas en común'
diff --git a/app/script/localization/strings-fr.coffee b/app/script/localization/strings-fr.coffee
index 4b8bbda7e16..2c2f7d2f686 100644
--- a/app/script/localization/strings-fr.coffee
+++ b/app/script/localization/strings-fr.coffee
@@ -266,6 +266,9 @@ z.string.fr.conversation_context_menu_unlike = 'Je n’aime plus'
z.string.fr.conversation_delete_timestamp = 'Supprimé le %@timestamp'
z.string.fr.conversation_edit_timestamp = 'Édité le %@timestamp'
z.string.fr.conversation_likes_caption = '%@number personnes'
+z.string.fr.conversation_send_pasted_file = 'Image copiée le %date'
+
+# Collection
# Archive
z.string.fr.archive_header = 'Archiver'
@@ -287,7 +290,11 @@ z.string.fr.conversations_popover_silence = 'Désactiver le micro'
z.string.fr.conversations_popover_unarchive = 'Désarchiver'
# Takeover
+z.string.fr.takeover_headline = 'Les noms sont ici.'
+z.string.fr.takeover_sub = 'Choisissez votre nom unique sur Wire.'
z.string.fr.takeover_link = 'En savoir plus '
+z.string.fr.takeover_button_choose = 'Choisissez le vôtre'
+z.string.fr.takeover_button_keep = 'Garder celui-là'
# Invites
z.string.fr.invite_meta_key_mac = 'Cmd'
@@ -398,6 +405,9 @@ z.string.fr.preferences_account_reset_password = 'Réinitialiser le mot de passe
z.string.fr.preferences_account_delete = 'Supprimer le compte'
z.string.fr.preferences_account_log_out = 'Se déconnecter'
z.string.fr.preferences_account_username_placeholder = 'Votre nom complet'
+z.string.fr.preferences_account_username_hint = 'Au moins 2 caractères. a — z, 0 — 9 et _ seulement.'
+z.string.fr.preferences_account_username_available = 'Disponible'
+z.string.fr.preferences_account_username_error_taken = 'Déjà pris'
z.string.fr.preferences_av_camera = 'Caméra'
z.string.fr.preferences_av_microphone = 'Microphone'
@@ -437,7 +447,8 @@ z.string.fr.preferences_options_data_checkbox = 'Rapports d’utilisation et de
z.string.fr.preferences_options_data_detail = 'Améliorez Wire en envoyant des informations anonymes.'
z.string.fr.preferences_options_notifications = 'Notifications'
z.string.fr.preferences_options_notifications_none = 'Désactivé'
-z.string.fr.preferences_options_notifications_obfuscate = 'Masquer les détails du message'
+z.string.fr.preferences_options_notifications_obfuscate = 'Cacher les détails'
+z.string.fr.preferences_options_notifications_obfuscate_message = 'Afficher l’expéditeur'
z.string.fr.preferences_options_notifications_on = 'Afficher l’expéditeur et le message'
# Search
@@ -445,8 +456,13 @@ z.string.fr.search_group_hint = 'Continuez d’écrire ou ajoutez plus de person
z.string.fr.search_connect = 'Connecter'
z.string.fr.search_connections = 'Connexions'
z.string.fr.search_groups = 'Groupes'
+z.string.fr.search_placeholder = 'Rechercher par nom ou par identifiant'
z.string.fr.search_top_people = 'Personnes favorites'
+z.string.fr.search_try_search = 'Trouver des personnes par\nnom ou nom d’utilisateur'
+z.string.fr.search_no_contacts_on_wire = 'Vous n’avez pas de contacts sur Wire.\nEssayez de trouver des gens par\nleur nom ou leur nom d’utilisateur.'
z.string.fr.search_others = 'Connecter'
+z.string.fr.search_friend_in_common = '%no personne en commun'
+z.string.fr.search_friends_in_common = '%no personnes en commun'
# Google contacts upload
z.string.fr.upload_google_headline = 'Trouvez des personnes\nà qui parler.'
@@ -473,6 +489,7 @@ z.string.fr.url_support_mic_access_denied = 'https://support.wire.com/hc/en-us/a
z.string.fr.url_support_mic_not_found = 'https://support.wire.com/hc/en-us/articles/202970662'
z.string.fr.url_support_screen_access_denied = 'https://support.wire.com/hc/en-us/articles/202935412'
z.string.fr.url_support_screen_whitelist = 'https://support.wire.com/hc/en-us/articles/209423889'
+z.string.fr.url_support_usernames = 'https://wire.com/support/username'
z.string.fr.url_decrypt_error_1 = 'https://wire.com/privacy/error-1'
z.string.fr.url_decrypt_error_2 = 'https://wire.com/privacy/error-2'
diff --git a/app/script/localization/strings-it.coffee b/app/script/localization/strings-it.coffee
index 13ccf491be5..5005e8855c8 100644
--- a/app/script/localization/strings-it.coffee
+++ b/app/script/localization/strings-it.coffee
@@ -300,8 +300,6 @@ z.string.it.invite_meta_key_pc = 'Ctrl'
z.string.it.invite_hint_selected = 'Premere %meta_key + C per copiare'
z.string.it.invite_hint_unselected = 'Selezionare e premere % meta_key + C'
z.string.it.invite_headline = 'Invita amici ad usare Wire'
-z.string.it.invite_message = 'Sono su Wire, cerca %username o visita wire.com/download.'
-z.string.it.invite_message_no_email = 'Sono su Wire. Visita https://get.wire.com per connetterti con me.'
# Extensions
z.string.it.extensions_bubble_button_gif = 'Gif'
@@ -445,7 +443,8 @@ z.string.it.preferences_options_data_checkbox = 'Segnalazioni di crash e dati di
z.string.it.preferences_options_data_detail = 'Migliora Wire con l’invio di informazioni anonime.'
z.string.it.preferences_options_notifications = 'Notifiche'
z.string.it.preferences_options_notifications_none = 'Off'
-z.string.it.preferences_options_notifications_obfuscate = 'Nascondi i dettagli messaggio'
+z.string.it.preferences_options_notifications_obfuscate = 'Nascondi dettagli'
+z.string.it.preferences_options_notifications_obfuscate_message = 'Mostra mittente'
z.string.it.preferences_options_notifications_on = 'Mostra mittente e messaggio'
# Search
diff --git a/app/script/localization/strings-pt.coffee b/app/script/localization/strings-pt.coffee
index 2a9d792b778..940f14183f9 100644
--- a/app/script/localization/strings-pt.coffee
+++ b/app/script/localization/strings-pt.coffee
@@ -446,7 +446,8 @@ z.string.pt.preferences_options_data_checkbox = 'Relatórios de uso e erro'
z.string.pt.preferences_options_data_detail = 'Faça o Wire melhorar mandando informações de uso anônimas.'
z.string.pt.preferences_options_notifications = 'Notificações'
z.string.pt.preferences_options_notifications_none = 'Desligar'
-z.string.pt.preferences_options_notifications_obfuscate = 'Esconder detalhes da mensagem'
+z.string.pt.preferences_options_notifications_obfuscate = 'Ocultar detalhes'
+z.string.pt.preferences_options_notifications_obfuscate_message = 'Mostrar remetente'
z.string.pt.preferences_options_notifications_on = 'Mostrar o remetente e a mensagem'
# Search
diff --git a/app/script/localization/strings-ro.coffee b/app/script/localization/strings-ro.coffee
index 21a88d1190e..de87da18ddd 100644
--- a/app/script/localization/strings-ro.coffee
+++ b/app/script/localization/strings-ro.coffee
@@ -446,7 +446,8 @@ z.string.ro.preferences_options_data_checkbox = 'Rapoarte de folosire și de ava
z.string.ro.preferences_options_data_detail = 'Ajută la îmbunătățirea Wire prin trimiterea de informații anonime.'
z.string.ro.preferences_options_notifications = 'Notificări'
z.string.ro.preferences_options_notifications_none = 'Închis'
-z.string.ro.preferences_options_notifications_obfuscate = 'Ascunde detaliile mesajelor'
+z.string.ro.preferences_options_notifications_obfuscate = 'Ascunde detaliile'
+z.string.ro.preferences_options_notifications_obfuscate_message = 'Arată expeditorul'
z.string.ro.preferences_options_notifications_on = 'Arată expeditorul și mesajul'
# Search
diff --git a/app/script/localization/strings-ru.coffee b/app/script/localization/strings-ru.coffee
index f7bddcd751d..d22ac1256f1 100644
--- a/app/script/localization/strings-ru.coffee
+++ b/app/script/localization/strings-ru.coffee
@@ -266,6 +266,9 @@ z.string.ru.conversation_context_menu_unlike = 'Не нравится'
z.string.ru.conversation_delete_timestamp = 'Удалено %@timestamp'
z.string.ru.conversation_edit_timestamp = 'Изменено %@timestamp'
z.string.ru.conversation_likes_caption = '%@number участникам'
+z.string.ru.conversation_send_pasted_file = 'Изображение добавлено %date'
+
+# Collection
# Archive
z.string.ru.archive_header = 'Архив'
@@ -324,7 +327,6 @@ z.string.ru.people_no_matches = 'Совпадений не найдено.\nПо
z.string.ru.people_invite = 'Пригласить людей'
z.string.ru.people_share = 'Поделиться контактами'
z.string.ru.people_bring_your_friends = 'Приведите друзей в Wire'
-z.string.ru.people_invite_detail = 'Предоставление доступа к вашим контактам поможет вам связаться с другими людьми. Вся информация анонимна, мы не предоставляем её третьим лицам.'
z.string.ru.people_invite_button_contacts = 'Из контактов'
z.string.ru.people_invite_button_gmail = 'Из Gmail'
z.string.ru.people_invite_headline = 'Приведите друзей'
@@ -446,7 +448,8 @@ z.string.ru.preferences_options_data_checkbox = 'Отчеты о сбоях и
z.string.ru.preferences_options_data_detail = 'Сделайте Wire лучше, отправляя анонимную информацию.'
z.string.ru.preferences_options_notifications = 'Уведомления'
z.string.ru.preferences_options_notifications_none = 'Выключены'
-z.string.ru.preferences_options_notifications_obfuscate = 'Скрывать подробности сообщения'
+z.string.ru.preferences_options_notifications_obfuscate = 'Скрывать содержание сообщения'
+z.string.ru.preferences_options_notifications_obfuscate_message = 'Показывать имя отправителя'
z.string.ru.preferences_options_notifications_on = 'Показывать имя отправителя и текст сообщения'
# Search
diff --git a/app/script/localization/strings-sl.coffee b/app/script/localization/strings-sl.coffee
index 22b8a71aede..2629e7438b6 100644
--- a/app/script/localization/strings-sl.coffee
+++ b/app/script/localization/strings-sl.coffee
@@ -445,7 +445,8 @@ z.string.sl.preferences_options_data_checkbox = 'Podatki o uporabi in poročila
z.string.sl.preferences_options_data_detail = 'Izboljšajte Wire s pošiljanjem anonimnih informacij.'
z.string.sl.preferences_options_notifications = 'Obvestila'
z.string.sl.preferences_options_notifications_none = 'Izklopljeno'
-z.string.sl.preferences_options_notifications_obfuscate = 'Skrij podrobnosti sporočila'
+z.string.sl.preferences_options_notifications_obfuscate = 'Skrij podrobnosti'
+z.string.sl.preferences_options_notifications_obfuscate_message = 'Pokaži pošiljatelja'
z.string.sl.preferences_options_notifications_on = 'Pokaži pošiljatelja in sporočilo'
# Search
@@ -469,6 +470,7 @@ z.string.sl.upload_google_message_error = 'Nismo prejeli vaših podatkov. Prosim
z.string.sl.upload_google_button_again = 'Poskusite ponovno'
# URLs
+z.string.sl.url_password_reset = 'forgot/'
z.string.sl.url_terms_of_use = 'https://wire.com/legal/terms/'
z.string.sl.url_support_calling = 'https://support.wire.com/hc/en-us/articles/202969412'
z.string.sl.url_support_camera_access_denied = 'https://support.wire.com/hc/en-us/articles/202935412'
diff --git a/app/script/localization/strings-tr.coffee b/app/script/localization/strings-tr.coffee
index 1694c74b5e5..0675b038c70 100644
--- a/app/script/localization/strings-tr.coffee
+++ b/app/script/localization/strings-tr.coffee
@@ -446,7 +446,8 @@ z.string.tr.preferences_options_data_checkbox = 'Kullanım ve kilitlenme raporla
z.string.tr.preferences_options_data_detail = 'Anonim bilgiler göndererek Wire’ın daha iyi olmasını sağlayabilirsiniz.'
z.string.tr.preferences_options_notifications = 'Bildirimler'
z.string.tr.preferences_options_notifications_none = 'Yok'
-z.string.tr.preferences_options_notifications_obfuscate = 'Mesaj detaylarını gizle'
+z.string.tr.preferences_options_notifications_obfuscate = 'Ayrıntıyı gizle'
+z.string.tr.preferences_options_notifications_obfuscate_message = 'Göndereni göster'
z.string.tr.preferences_options_notifications_on = 'Göndereni ve mesajı göster'
# Search
@@ -470,6 +471,7 @@ z.string.tr.upload_google_message_error = 'Bilgilerinzi alamadık. Lütfen kişi
z.string.tr.upload_google_button_again = 'Tekrar deneyin'
# URLs
+z.string.tr.url_password_reset = 'forgot/'
z.string.tr.url_legal = 'https://wire.com/legal/'
z.string.tr.url_privacy = 'https://wire.com/privacy/'
z.string.tr.url_privacy_why = 'https://wire.com/privacy/why/'
diff --git a/app/script/localization/strings-uk.coffee b/app/script/localization/strings-uk.coffee
index 4bf6baaa802..5464f19cbcb 100644
--- a/app/script/localization/strings-uk.coffee
+++ b/app/script/localization/strings-uk.coffee
@@ -266,6 +266,9 @@ z.string.uk.conversation_context_menu_unlike = 'Не подобається'
z.string.uk.conversation_delete_timestamp = 'Видалене: %@timestamp'
z.string.uk.conversation_edit_timestamp = 'Відредаговане: %@timestamp'
z.string.uk.conversation_likes_caption = '%@number учасників'
+z.string.uk.conversation_send_pasted_file = 'Надіслав(-ла) зображення %date'
+
+# Collection
# Archive
z.string.uk.archive_header = 'Архівувати'
@@ -287,7 +290,11 @@ z.string.uk.conversations_popover_silence = 'Вимкнути звук'
z.string.uk.conversations_popover_unarchive = 'Розархівувати'
# Takeover
+z.string.uk.takeover_headline = 'Ніки вже тут.'
+z.string.uk.takeover_sub = 'Зарезервуйте свій унікальний нік в Wire.'
z.string.uk.takeover_link = 'Дізнатися більше'
+z.string.uk.takeover_button_choose = 'Вибрати власний'
+z.string.uk.takeover_button_keep = 'Залишити цей'
# Invites
z.string.uk.invite_meta_key_mac = 'Cmd'
@@ -398,6 +405,9 @@ z.string.uk.preferences_account_reset_password = 'Виконати скидан
z.string.uk.preferences_account_delete = 'Видалити акаунт'
z.string.uk.preferences_account_log_out = 'Вийти'
z.string.uk.preferences_account_username_placeholder = 'Ваше повне ім’я'
+z.string.uk.preferences_account_username_hint = 'Мінімум 2 символи з множини a—z, 0—9, та _.'
+z.string.uk.preferences_account_username_available = 'Доступний'
+z.string.uk.preferences_account_username_error_taken = 'Уже зарезервований'
z.string.uk.preferences_av_camera = 'Камера'
z.string.uk.preferences_av_microphone = 'Мікрофон'
@@ -437,7 +447,8 @@ z.string.uk.preferences_options_data_checkbox = 'Статистика викор
z.string.uk.preferences_options_data_detail = 'Зробіть Wire кращим, відправляючи анонімну інформацію.'
z.string.uk.preferences_options_notifications = 'Сповіщення'
z.string.uk.preferences_options_notifications_none = 'Вимкнений'
-z.string.uk.preferences_options_notifications_obfuscate = 'Приховувати деталі повідомлення'
+z.string.uk.preferences_options_notifications_obfuscate = 'Приховати деталі'
+z.string.uk.preferences_options_notifications_obfuscate_message = 'Показувати відправника'
z.string.uk.preferences_options_notifications_on = 'Показувати відправника та повідомлення'
# Search
@@ -445,8 +456,13 @@ z.string.uk.search_group_hint = 'Спробуйте ще раз або вибе
z.string.uk.search_connect = 'Додати до контактів'
z.string.uk.search_connections = 'Контакти'
z.string.uk.search_groups = 'Групи'
+z.string.uk.search_placeholder = 'Пошук за іменем або ніком'
z.string.uk.search_top_people = 'Топ-контакти'
+z.string.uk.search_try_search = 'Шукайте людай\nза іменем або ніком'
+z.string.uk.search_no_contacts_on_wire = 'У вас поки що немає контактів в Wire.\nСпробуйте знайти людей\nза їхніми іменами або ніками.'
z.string.uk.search_others = 'Додати до контактів'
+z.string.uk.search_friend_in_common = '%no спільний знайомий'
+z.string.uk.search_friends_in_common = '%no спільних знайомих'
# Google contacts upload
z.string.uk.upload_google_headline = 'Знайдіть людей,\nщоб порозмовляти.'
@@ -456,6 +472,7 @@ z.string.uk.upload_google_message_error = 'Ми не отримали вашу
z.string.uk.upload_google_button_again = 'Спробувати ще раз'
# URLs
+z.string.uk.url_password_reset = 'forgot/'
z.string.uk.url_legal = 'https://wire.com/legal/'
z.string.uk.url_privacy = 'https://wire.com/privacy/'
z.string.uk.url_privacy_why = 'https://wire.com/privacy/why/'
@@ -473,6 +490,7 @@ z.string.uk.url_support_mic_access_denied = 'https://support.wire.com/hc/en-us/a
z.string.uk.url_support_mic_not_found = 'https://support.wire.com/hc/en-us/articles/202970662'
z.string.uk.url_support_screen_access_denied = 'https://support.wire.com/hc/en-us/articles/202935412'
z.string.uk.url_support_screen_whitelist = 'https://support.wire.com/hc/en-us/articles/209423889'
+z.string.uk.url_support_usernames = 'https://wire.com/support/username'
z.string.uk.url_decrypt_error_1 = 'https://wire.com/privacy/error-1'
z.string.uk.url_decrypt_error_2 = 'https://wire.com/privacy/error-2'
diff --git a/app/script/localization/strings.coffee b/app/script/localization/strings.coffee
index aef403fada7..2e8755b4d79 100644
--- a/app/script/localization/strings.coffee
+++ b/app/script/localization/strings.coffee
@@ -272,6 +272,9 @@ z.string.conversation_send_pasted_file = 'Pasted image at %date'
# Collection
z.string.collection_show_all = 'Show all %no'
+z.string.collection_section_links = 'Links'
+z.string.collection_section_images = 'Pictures'
+z.string.collection_section_files = 'Files'
# Archive
z.string.archive_header = 'Archive'
@@ -525,6 +528,7 @@ z.string.warning_connectivity_no_internet = 'No Internet. You won’t be able to
# Browser notifications
z.string.system_notification_asset_add = 'Shared a picture'
z.string.system_notification_connection_accepted = 'Accepted your connection request'
+z.string.system_notification_connection_connected = 'Are now connected'
z.string.system_notification_connection_request = 'Wants to connect'
z.string.system_notification_conversation_create = '%s.first_name started a conversation'
z.string.system_notification_conversation_rename = '%s.first_name renamed the conversation to %name'
diff --git a/app/script/main/app.coffee b/app/script/main/app.coffee
index 94c4337cb2e..b132cf320fe 100644
--- a/app/script/main/app.coffee
+++ b/app/script/main/app.coffee
@@ -119,7 +119,7 @@ class z.main.App
view.content = new z.ViewModel.content.ContentViewModel 'right', @repository.audio, @repository.call_center, @repository.client, @repository.conversation, @repository.cryptography, @repository.giphy, @repository.media, @repository.search, @repository.user, @repository.properties
view.list = new z.ViewModel.list.ListViewModel 'left', view.content, @repository.call_center, @repository.connect, @repository.conversation, @repository.search, @repository.user, @repository.properties
view.title = new z.ViewModel.WindowTitleViewModel view.content.content_state, @repository.user, @repository.conversation
- view.lightbox = new z.ViewModel.ImageDetailViewViewModel 'detail-view'
+ view.lightbox = new z.ViewModel.ImageDetailViewViewModel 'detail-view', @repository.conversation
view.warnings = new z.ViewModel.WarningsViewModel 'warnings'
view.modals = new z.ViewModel.ModalsViewModel 'modals'
diff --git a/app/script/message/SystemMessageType.coffee b/app/script/message/SystemMessageType.coffee
index e937ef7ae45..190ec3c5c92 100644
--- a/app/script/message/SystemMessageType.coffee
+++ b/app/script/message/SystemMessageType.coffee
@@ -31,5 +31,6 @@ z.message.SystemMessageType =
CONVERSATION_CREATE: 'created-group'
CONVERSATION_RENAME: 'rename'
CONVERSATION_RESUME: 'resume'
- CONNECTION_REQUEST: 'connecting'
CONNECTION_ACCEPTED: 'created-one-to-one'
+ CONNECTION_CONNECTED: 'connected'
+ CONNECTION_REQUEST: 'connecting'
diff --git a/app/script/system_notification/SystemNotificationRepository.coffee b/app/script/system_notification/SystemNotificationRepository.coffee
index 3e35634bda9..a0f233f7787 100644
--- a/app/script/system_notification/SystemNotificationRepository.coffee
+++ b/app/script/system_notification/SystemNotificationRepository.coffee
@@ -284,6 +284,8 @@ class z.SystemNotification.SystemNotificationRepository
return @_create_body_member_leave message_et
when z.message.SystemMessageType.CONNECTION_ACCEPTED
return z.localization.Localizer.get_text z.string.system_notification_connection_accepted
+ when z.message.SystemMessageType.CONNECTION_CONNECTED
+ return z.localization.Localizer.get_text z.string.system_notification_connection_connected
when z.message.SystemMessageType.CONNECTION_REQUEST
return z.localization.Localizer.get_text z.string.system_notification_connection_request
when z.message.SystemMessageType.CONVERSATION_CREATE
diff --git a/app/script/user/UserRepository.coffee b/app/script/user/UserRepository.coffee
index 06646afa95b..2b07dac6ea5 100644
--- a/app/script/user/UserRepository.coffee
+++ b/app/script/user/UserRepository.coffee
@@ -290,7 +290,10 @@ class z.user.UserRepository
when z.user.ConnectionStatus.PENDING
message_et.member_message_type = z.message.SystemMessageType.CONNECTION_REQUEST
when z.user.ConnectionStatus.ACCEPTED
- message_et.member_message_type = z.message.SystemMessageType.CONNECTION_ACCEPTED
+ if previous_status is z.user.ConnectionStatus.SENT
+ message_et.member_message_type = z.message.SystemMessageType.CONNECTION_ACCEPTED
+ else
+ message_et.member_message_type = z.message.SystemMessageType.CONNECTION_CONNECTED
amplify.publish z.event.WebApp.SYSTEM_NOTIFICATION.NOTIFY, connection_et, message_et
diff --git a/app/script/view_model/ImageDetailViewViewModel.coffee b/app/script/view_model/ImageDetailViewViewModel.coffee
index a9169481e61..1da22341da8 100644
--- a/app/script/view_model/ImageDetailViewViewModel.coffee
+++ b/app/script/view_model/ImageDetailViewViewModel.coffee
@@ -20,32 +20,57 @@ window.z ?= {}
z.ViewModel ?= {}
class z.ViewModel.ImageDetailViewViewModel
- constructor: (@element_id) ->
+ constructor: (@element_id, @conversation_repository) ->
@image_modal = undefined
- @image_visible = ko.observable false
@image_src = ko.observable()
+ @image_visible = ko.observable false
+
+ @conversation_et = ko.observable()
+ @message_et = ko.observable()
+ @message_et.subscribe (message_et) =>
+ @conversation_et @conversation_repository.find_conversation_by_id message_et.conversation_id
- amplify.subscribe z.event.WebApp.CONVERSATION.DETAIL_VIEW.SHOW, @show_detail_view
+ amplify.subscribe z.event.WebApp.CONVERSATION.DETAIL_VIEW.SHOW, @show
ko.applyBindings @, document.getElementById @element_id
- show_detail_view: (src) =>
+ show: (message_et) =>
+ @message_et message_et
+
@image_modal.destroy() if @image_modal?
- @image_modal = new zeta.webapp.module.Modal '#detail-view', undefined, @_before_hide_callback
+ @image_modal = new zeta.webapp.module.Modal '#detail-view', @_hide_callback, @_before_hide_callback
@image_modal.show()
- amplify.publish z.event.WebApp.ANALYTICS.EVENT, z.tracking.SessionEventName.INTEGER.IMAGE_DETAIL_VIEW_OPENED
-
- @image_src src
- window.setTimeout =>
+ message_et.get_first_asset().resource().load().then (blob) =>
+ @image_src window.URL.createObjectURL blob
@image_visible true
- , 10
- hide_detail_view: =>
- @image_modal.hide()
+ amplify.publish z.event.WebApp.ANALYTICS.EVENT, z.tracking.SessionEventName.INTEGER.IMAGE_DETAIL_VIEW_OPENED
+
+ _hide_callback: =>
+ window.URL.revokeObjectURL @image_src()
@image_src undefined
_before_hide_callback: =>
@image_visible false
+
+ click_on_close: =>
+ @image_modal.hide()
+
+ click_on_download: ->
+ date = moment @message_et().timestamp
+ name = "Wire #{date.format('YYYY-MM-DD')} at #{date.format('h.mm.ss')}"
+ @message_et().get_first_asset().download name
+
+ click_on_like: =>
+ @conversation_repository.toggle_like @conversation_et(), @message_et()
+
+ click_on_delete: =>
+ @conversation_repository.delete_message @conversation_et(), @message_et()
+ @image_modal.hide()
+
+ click_on_delete_for_everyone: =>
+ @conversation_repository.delete_message_everyone @conversation_et(), @message_et()
+ @image_modal.hide()
diff --git a/app/script/view_model/MessageListViewModel.coffee b/app/script/view_model/MessageListViewModel.coffee
index 9e4c843419d..5b8fb0eaa74 100644
--- a/app/script/view_model/MessageListViewModel.coffee
+++ b/app/script/view_model/MessageListViewModel.coffee
@@ -378,7 +378,7 @@ class z.ViewModel.MessageListViewModel
@_track_context_menu message_et
- if message_et.has_asset() and not message_et.is_ephemeral()
+ if message_et.get_first_asset()?.download? and not message_et.is_ephemeral()
entries.push {label: z.string.conversation_context_menu_download, action: 'download'}
if message_et.is_reactable() and not @conversation().removed_from_conversation()
@@ -427,7 +427,9 @@ class z.ViewModel.MessageListViewModel
amplify.publish z.event.WebApp.WARNING.MODAL, z.ViewModel.ModalType.DELETE_EVERYONE_MESSAGE,
action: => @conversation_repository.delete_message_everyone @conversation(), message_et
when 'download'
- message_et?.get_first_asset()?.download()
+ date = moment message_et.timestamp
+ name = "Wire #{date.format('YYYY-MM-DD')} at #{date.format('h.mm.ss')}"
+ message_et?.get_first_asset()?.download name
when 'edit'
amplify.publish z.event.WebApp.CONVERSATION.MESSAGE.EDIT, message_et
when 'react'
@@ -435,14 +437,12 @@ class z.ViewModel.MessageListViewModel
###
Shows detail image view.
- @param asset_et [z.assets.Asset] Asset to be displayed
+ @param message_et [z.entity.Message] Message with asset to be displayed
@param event [UIEvent] Actual scroll event
###
- show_detail: (asset_et, event) ->
- target_element = $(event.currentTarget)
- return if target_element.hasClass 'bg-color-ephemeral'
- return if target_element.hasClass 'image-loading'
- amplify.publish z.event.WebApp.CONVERSATION.DETAIL_VIEW.SHOW, target_element.find('img')[0].src
+ show_detail: (message_et, event) ->
+ return if message_et.is_expired() or $(event.currentTarget).hasClass 'image-loading'
+ amplify.publish z.event.WebApp.CONVERSATION.DETAIL_VIEW.SHOW, message_et
get_timestamp_class: (message_et) ->
last_message = @conversation().get_previous_message message_et
@@ -494,33 +494,7 @@ class z.ViewModel.MessageListViewModel
@user_repository.cancel_connection_request message_et.other_user(), next_conversation_et
click_on_like: (message_et, button = true) =>
- return if @conversation().removed_from_conversation()
-
- reaction = if message_et.is_liked() then z.message.ReactionType.NONE else z.message.ReactionType.LIKE
- message_et.is_liked not message_et.is_liked()
-
- window.setTimeout =>
- @conversation_repository.send_reaction @conversation(), message_et, reaction
- @_track_reaction @conversation(), message_et, reaction, button
- , 50
-
- ###
- Track reaction action.
-
- @param conversation_et [z.entity.Conversation]
- @param message_et [z.entity.Message]
- @param reaction [z.message.ReactionType]
- @param button [Boolean]
- ###
- _track_reaction: (conversation_et, message_et, reaction, button = true) ->
- amplify.publish z.event.WebApp.ANALYTICS.EVENT, z.tracking.EventName.CONVERSATION.REACTED_TO_MESSAGE,
- conversation_type: z.tracking.helpers.get_conversation_type conversation_et
- action: if reaction then 'like' else 'unlike'
- with_bot: conversation_et.is_with_bot()
- method: if button then 'button' else 'menu'
- user: if message_et.user().is_me then 'sender' else 'receiver'
- type: z.tracking.helpers.get_message_type message_et
- reacted_to_last_message: conversation_et.get_last_message() is message_et
+ @conversation_repository.toggle_like @conversation(), message_et, button
###
Message appeared in viewport.
diff --git a/app/script/view_model/bindings/MessageListBindings.coffee b/app/script/view_model/bindings/MessageListBindings.coffee
index 24197b2dbfa..623203c0ee6 100644
--- a/app/script/view_model/bindings/MessageListBindings.coffee
+++ b/app/script/view_model/bindings/MessageListBindings.coffee
@@ -86,33 +86,6 @@ ko.bindingHandlers.background_image =
asset_subscription.dispose()
window.URL.revokeObjectURL object_url if object_url?
-# Fit image to viewport
-#
-ko.bindingHandlers.fit_to_viewport = do ->
- message_list_width = undefined
-
- process_image = (element, asset) ->
- message_list_width ?= $('.messages').width()
- content_element = element.parent()
- content_element.toggleClass 'image-widescreen', message_list_width < asset.width and asset.ratio < 1
-
- on_resize = _.throttle ->
- message_list_width = undefined
- image_func() for image_func in images()
- , 250
-
- images = ko.observableArray()
- images.subscribe (array) ->
- $(window).off 'resize.viewport'
- $(window).on 'resize.viewport', on_resize if array.length > 0
-
- init: (element, valueAccessor, allBindingsAccessor) ->
- func = -> process_image $(element), ko.unwrap valueAccessor()
- func()
-
- images.push func
- ko.utils.domNodeDisposal.addDisposeCallback element, -> images.remove func
-
# Generate message timestamp
#
ko.bindingHandlers.relative_timestamp = do ->
diff --git a/app/script/view_model/content/CollectionDetailsViewModel.coffee b/app/script/view_model/content/CollectionDetailsViewModel.coffee
index 9dec14eef51..26c127b8522 100644
--- a/app/script/view_model/content/CollectionDetailsViewModel.coffee
+++ b/app/script/view_model/content/CollectionDetailsViewModel.coffee
@@ -30,6 +30,8 @@ class z.ViewModel.content.CollectionDetailsViewModel
@items = ko.observableArray()
+ @last_message_timestamp = undefined
+
set_conversation: (conversation_et, category, items) =>
@template category
@conversation_et conversation_et
@@ -39,9 +41,17 @@ class z.ViewModel.content.CollectionDetailsViewModel
@conversation_et null
@items.removeAll()
+ should_show_header: (message_et) =>
+ if not @last_message_timestamp? or moment(message_et.timestamp).format('M') isnt moment(@last_message_timestamp).format('M')
+ @last_message_timestamp = message_et.timestamp
+ return true
+
click_on_back_button: ->
amplify.publish z.event.WebApp.CONTENT.SWITCH, z.ViewModel.content.CONTENT_STATE.COLLECTION
+ click_on_image: (message_et) ->
+ amplify.publish z.event.WebApp.CONVERSATION.DETAIL_VIEW.SHOW, message_et
+
# helper
push_deferred: (target, src, number = 100, delay = 300) ->
interval = window.setInterval ->
diff --git a/app/script/view_model/content/CollectionViewModel.coffee b/app/script/view_model/content/CollectionViewModel.coffee
index e1ceea26c8f..a390bdeb7cb 100644
--- a/app/script/view_model/content/CollectionViewModel.coffee
+++ b/app/script/view_model/content/CollectionViewModel.coffee
@@ -27,18 +27,16 @@ class z.ViewModel.content.CollectionViewModel
@conversation_et = ko.observable()
- @audio = ko.observableArray()
- @files = ko.observableArray()
- @images = ko.observableArray()
- @links = ko.observableArray()
- @video = ko.observableArray()
+ @files = ko.observableArray().extend 'rateLimit': 1
+ @images = ko.observableArray().extend 'rateLimit': 1
+ @links = ko.observableArray().extend 'rateLimit': 1
@no_items_found = ko.observable false
removed_from_view: =>
@no_items_found false
@conversation_et null
- [@images, @files, @links, @audio, @video].forEach (array) -> array.removeAll()
+ [@images, @files, @links].forEach (array) -> array.removeAll()
set_conversation: (conversation_et) =>
@conversation_et conversation_et
@@ -50,33 +48,14 @@ class z.ViewModel.content.CollectionViewModel
@populate_items message_ets
populate_items: (message_ets) =>
- images = []
- files = []
- audio = []
- video = []
- links = []
-
for message_et in message_ets
switch
when message_et.category & z.message.MessageCategory.IMAGE and not (message_et.category & z.message.MessageCategory.GIF)
- images.push message_et
+ @images.push message_et
when message_et.category & z.message.MessageCategory.FILE
- asset_et = message_et.get_first_asset()
- switch
- when asset_et.is_video()
- video.push message_et
- when asset_et.is_audio()
- audio.push message_et
- else
- files.push message_et
+ @files.push message_et
when message_et.category & z.message.MessageCategory.LINK_PREVIEW
- links.push message_et
-
- @images images
- @files files
- @audio audio
- @video video
- @links links
+ @links.push message_et
click_on_back_button: =>
amplify.publish z.event.WebApp.CONVERSATION.SHOW, @conversation_et()
@@ -85,6 +64,5 @@ class z.ViewModel.content.CollectionViewModel
@collection_details.set_conversation @conversation_et(), category, [].concat items
amplify.publish z.event.WebApp.CONTENT.SWITCH, z.ViewModel.content.CONTENT_STATE.COLLECTION_DETAILS
- click_on_image: (message_et, event) ->
- target_element = $(event.currentTarget)
- amplify.publish z.event.WebApp.CONVERSATION.DETAIL_VIEW.SHOW, target_element.find('img')[0].src
+ click_on_image: (message_et) ->
+ amplify.publish z.event.WebApp.CONVERSATION.DETAIL_VIEW.SHOW, message_et
diff --git a/app/style/common/content.less b/app/style/common/content.less
index eeafa22daae..ba922c4737d 100644
--- a/app/style/common/content.less
+++ b/app/style/common/content.less
@@ -17,7 +17,8 @@
*
*/
-.content-wrapper {
+// Content
+.content {
display: flex;
flex-direction: column;
height: 100%;
@@ -47,7 +48,6 @@
.content-titlebar-items-center {
.flex-center;
- flex-direction: column;
}
.content-titlebar-items-right {
@@ -66,8 +66,15 @@
margin-right: 12px;
}
-// List TODO antiscroll
+// List
+.content-list-wrapper {
+ width: 100%;
+ flex: 1 1 auto;
+}
+
.content-list {
- flex: 1 1;
- overflow-y: scroll
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ margin-bottom: 40px;
}
diff --git a/app/style/common/mixins.less b/app/style/common/mixins.less
index b06d5e36d72..cd300203a5a 100644
--- a/app/style/common/mixins.less
+++ b/app/style/common/mixins.less
@@ -27,6 +27,13 @@
text-overflow: ellipsis;
}
+.ellipsis-multiline(@lines) {
+ overflow: hidden;
+ display: -webkit-box;
+ -webkit-line-clamp: @lines;
+ -webkit-box-orient: vertical;
+}
+
.text-nowrap {
white-space: nowrap;
}
@@ -47,6 +54,10 @@
text-transform: uppercase;
}
+.text-capitalize {
+ text-transform: capitalize
+}
+
.text-underline {
text-decoration: underline;
}
diff --git a/app/style/common/variables.less b/app/style/common/variables.less
index b51609a20c2..d1f60e41ce9 100644
--- a/app/style/common/variables.less
+++ b/app/style/common/variables.less
@@ -199,9 +199,6 @@
@screen-sm-max: @screen-md-min - 1;
@screen-md-max: @screen-lg-min - 1;
-// defines when images jump inline
-@screen-inline-images: (@left-width + @conversation-max-width);
-
// ----------------------------------------------------------------------------
// Warnings
// ----------------------------------------------------------------------------
diff --git a/app/style/components/asset/file-asset.less b/app/style/components/asset/file-asset.less
index 7f103ab6bf7..885ee1f6d6d 100644
--- a/app/style/components/asset/file-asset.less
+++ b/app/style/components/asset/file-asset.less
@@ -19,7 +19,6 @@
file-asset {
.asset-container-style;
- margin-top: 16px;
padding: 12px;
flex-wrap: wrap;
}
@@ -28,6 +27,7 @@ file-asset {
position: relative;
display: flex;
align-items: center;
+ width: 100%;
}
.file-icon {
diff --git a/app/style/components/asset/link-preview-asset.less b/app/style/components/asset/link-preview-asset.less
index 78c95c9d481..307c75f5932 100644
--- a/app/style/components/asset/link-preview-asset.less
+++ b/app/style/components/asset/link-preview-asset.less
@@ -18,46 +18,49 @@
*/
link-preview-asset {
+ .asset-container-style;
cursor: pointer;
- display: block;
- margin-top: 16px;
- position: relative;
- max-width: 480px;
+ width: 100%;
}
-.link-preview-icon {
- left: -@conversation-message-sender-width;
- line-height: @line-height-lg;
- position: absolute;
- text-align: center;
- width: 72px;
+.link-preview-image-container {
+ .square(88px);
+ background-color: fade(@graphite, 24%);
+ flex: 0 0 auto;
}
-.link-preview-container {
- .asset-container-style;
- flex-wrap: wrap;
- &.ephemeral-link-preview {
- .accent-background-color(8%);
- }
+.link-preview-image-placeholder {
+ .flex-center;
+ color: #fff;
+ width: 100%;
+ height: 100%;
}
.link-preview-image {
- height: 160px;
+ width: 100%;
+ height: 100%;
+}
+
+.link-preview-info {
+ flex: 1 1 auto;
+ display: flex;
+ flex-direction: column;
+ padding: 12px;
+ justify-content: center;
+ width: 0;
+}
+
+.link-preview-info-header {
+ margin-bottom: 4px;
}
-.link-preview-title {
- .label-semibold;
- font-size: @font-size-sm;
+.link-preview-info-title {
+ font-weight: 500; // semi-bold
line-height: @line-height-lg;
- margin: 12px 16px 0 16px;
+ margin-bottom: 4px;
}
-.link-preview-site {
- color: @graphite;
- display: block;
+.link-preview-info-link {
font-size: @font-size-xs;
- font-weight: 400;
- line-height: @line-height-lg;
- margin: 0 16px 8px 16px;
- user-select: initial;
+ line-height: @line-height-sm;
}
diff --git a/app/style/components/asset/link-preview-compact-asset.less b/app/style/components/asset/link-preview-compact-asset.less
deleted file mode 100644
index 54c017040e2..00000000000
--- a/app/style/components/asset/link-preview-compact-asset.less
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Wire
- * Copyright (C) 2016 Wire Swiss GmbH
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see http://www.gnu.org/licenses/.
- *
- */
-
-link-preview-compact-asset {
- .asset-container-style;
- cursor: pointer;
- width: 100%;
-}
-
-.link-preview-compact-image-container {
- .square(88px);
- background-color: fade(@graphite, 24%);
- flex: 0 0 auto;
-}
-
-.link-preview-compact-image-placeholder {
- .flex-center;
- color: #fff;
- width: 100%;
- height: 100%;
-}
-
-.link-preview-compact-image {
- width: 100%;
- height: 100%;
-}
-
-.link-preview-compact-info {
- flex: 1 1 auto;
- display: flex;
- flex-direction: column;
- padding: 12px;
- justify-content: center;
- width: 0;
-}
-
-.link-preview-compact-info-header {
- margin-bottom: 4px;
-}
-
-.link-preview-compact-info-title {
- font-weight: 500; // semi-bold
- line-height: @line-height-lg;
- margin-bottom: 4px;
-}
-
-.link-preview-compact-info-link {
- font-size: @font-size-xs;
- line-height: @line-height-sm;
-}
diff --git a/app/style/content/collection.less b/app/style/content/collection.less
index b6065e97ded..63a2603d348 100644
--- a/app/style/content/collection.less
+++ b/app/style/content/collection.less
@@ -19,20 +19,20 @@
// Variables
@image-size: 104px;
-@image-items-per-row: 5;
+@image-items-per-row: 6;
// Sections
.collection-section {
display: inline-block;
- padding-top: 24px;
margin-bottom: 16px;
+ padding-top: 24px;
> header {
align-items: center;
display: flex;
- height: 32px;
- padding-bottom: 8px;
+ height: 24px;
+ margin-bottom: 8px;
}
}
@@ -66,13 +66,7 @@
// Files
.collection-file {
- border-radius: 0;
width: 100%;
- margin: 0;
-
- & + & {
- margin-top: 1px;
- }
}
// Videos
@@ -93,3 +87,13 @@
font-size: 120px;
margin-bottom: 32px;
}
+
+// Details
+.collection-details-header {
+ align-items: center;
+ display: flex;
+ height: 24px;
+ margin-bottom: 8px;
+ margin-top: 24px;
+ width: 100%;
+}
diff --git a/app/style/content/conversation/detail-view.less b/app/style/content/conversation/detail-view.less
index c91d77e50cc..05f10967da4 100644
--- a/app/style/content/conversation/detail-view.less
+++ b/app/style/content/conversation/detail-view.less
@@ -17,6 +17,7 @@
*
*/
+// modal
.detail-view {
&.modal:before {
@@ -28,22 +29,61 @@
}
}
-.detail-view-image {
- max-width: 84%;
- max-height: 84%;
- width: auto;
+// wrapper
+.detail-view-content {
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+ position: relative;
+ width: 100%;
+}
+
+// layout
+.detail-view-header {
+ .flex-center;
+ flex: 0 0 auto;
+ height: 72px;
+ line-height: @line-height-sm;
}
-.detail-view-close-button {
+.detail-view-header-close-button {
.circle(40px);
.flex-center;
- background-color: fade(#fff, 24%);
- position: absolute;
right: 24px;
- top: 24px;
cursor: pointer;
+ position: absolute;
+}
+
+.detail-view-main {
+ .flex-center;
+ flex: 1 1;
+}
+
+.detail-view-footer {
+ .flex-center;
+ flex: 0 0 auto;
+ height: 72px;
+
+ .detail-view-action-button + .detail-view-action-button {
+ margin-left: 40px;
+ }
+}
+
+// TODO generic butotn
+.detail-view-action-button {
+ .label-bold-xs;
+ align-items: center;
+ cursor: pointer;
+ display: flex;
- > span {
- position: relative;
+ & > span:first-child {
+ margin-right: 12px;
}
}
+
+.detail-view-image {
+ max-width: 84%;
+ max-height: 84%;
+ width: auto;
+ height: auto;
+}
diff --git a/app/style/content/conversation/message-list.less b/app/style/content/conversation/message-list.less
index 75972a06eb7..51a6c51e0be 100644
--- a/app/style/content/conversation/message-list.less
+++ b/app/style/content/conversation/message-list.less
@@ -145,18 +145,6 @@
padding-left: @conversation-message-sender-width;
padding-right: @conversation-message-timestamp-width;
- &.image-widescreen {
-
- .message-asset-image {
- margin-left: -@conversation-message-sender-width;
- margin-right: -@conversation-message-timestamp-width;
-
- @media (min-width: @screen-inline-images) {
- margin-left: 0;
- }
- }
- }
-
.text {
.text-selection();
.accent-selection-color();
@@ -175,22 +163,16 @@
.iframe-container {
margin-bottom: 24px;
margin-top: 16px;
+ }
+
+ .iframe-container-video {
+ padding-bottom: 75%;
+ position: relative;
- &.iframe-container-video {
- margin-left: -@conversation-message-sender-width;
- margin-right: -@conversation-message-timestamp-width;
- padding-bottom: 75%;
- position: relative;
-
- @media (min-width: @screen-inline-images) {
- margin-left: 0;
- }
-
- iframe, embed, object {
- position: absolute;
- left: 0;
- max-width: 100%;
- }
+ iframe, embed, object {
+ position: absolute;
+ left: 0;
+ max-width: 100%;
}
}
}
@@ -201,17 +183,6 @@
bottom: 0;
left: 0;
width: @conversation-message-sender-width;
-
- .image-widescreen & {
- bottom: 8px;
- }
-}
-
-.message-body-like-icon {
-
- .image-widescreen & {
- background-color: #fff;
- }
}
.message-asset-image {
@@ -355,17 +326,6 @@
top: 3px;
}
- .image-widescreen & {
- top: 24px;
-
- .time,
- .context-menu,
- .message-status {
- background-color: fade(#fff, 80%);
- border-radius: 16px;
- }
- }
-
.message-ephemeral-timer {
position: absolute;
top: 0;
diff --git a/app/style/fonts/zeta-neue.css b/app/style/fonts/zeta-neue.css
index a5052e879f6..b5f5ad4c4b7 100755
--- a/app/style/fonts/zeta-neue.css
+++ b/app/style/fonts/zeta-neue.css
@@ -19,7 +19,7 @@
@font-face {
font-family: 'Wire';
- src: url('/font/Wire.ttf?2m763t') format('truetype');
+ src: url('/font/Wire.ttf?k1a0xh') format('truetype');
font-weight: normal;
font-style: normal;
}
@@ -195,6 +195,12 @@
.icon-trash-small:before {
content: "\e1860";
}
+.icon-delete-for-me:before {
+ content: "\e1861";
+}
+.icon-delete-for-everyone:before {
+ content: "\e1862";
+}
.icon-download:before {
content: "\e197";
}
diff --git a/app/style/main.less b/app/style/main.less
index 3733f3447d4..9e37e88fb96 100644
--- a/app/style/main.less
+++ b/app/style/main.less
@@ -76,7 +76,6 @@
@import "components/asset/file-asset";
@import "components/asset/audio-asset";
@import "components/asset/link-preview-asset";
-@import "components/asset/link-preview-compact-asset";
@import "components/asset/location-asset";
@import "components/asset/controls/seek-bar";
@import "components/asset/controls/audio-seek-bar";
diff --git a/test/unit_tests/entity/ConversationSpec.coffee b/test/unit_tests/entity/ConversationSpec.coffee
index bd8beb2c5e1..e560e2dc7f1 100644
--- a/test/unit_tests/entity/ConversationSpec.coffee
+++ b/test/unit_tests/entity/ConversationSpec.coffee
@@ -516,50 +516,38 @@ describe 'Conversation', ->
expect(newer_message_et.visible()).toBeFalsy()
describe 'is_with_bot', ->
- it 'detects bot conversations by the email of the remote participant', ->
+ it 'detects bot conversations by the username of the remote participant', ->
user_et = new z.entity.User z.util.create_random_uuid()
conversation_et = new z.entity.Conversation z.util.create_random_uuid()
conversation_et.participating_user_ets.push user_et
- user_et.email 'anna+123@wire.com'
+ user_et.username 'ottothebot'
conversation_et.type z.conversation.ConversationType.SELF
expect(conversation_et.is_with_bot()).toBe false
conversation_et.type z.conversation.ConversationType.ONE2ONE
expect(conversation_et.is_with_bot()).toBe true
- user_et.email undefined
- expect(conversation_et.is_with_bot()).toBe false
+ user_et.username 'annathebot'
+ expect(conversation_et.is_with_bot()).toBe true
- user_et.email ''
+ user_et.username undefined
expect(conversation_et.is_with_bot()).toBe false
- user_et.email 'anne@wire.com'
+ user_et.username ''
expect(conversation_et.is_with_bot()).toBe false
- user_et.email 'anna+123@wire.com'
- expect(conversation_et.is_with_bot()).toBe true
-
- user_et.email 'anna+quiz@wire.com'
- expect(conversation_et.is_with_bot()).toBe true
-
- user_et.email 'welcome@wire.com'
- expect(conversation_et.is_with_bot()).toBe true
-
- user_et.email 'welcome+123@wire.com'
- expect(conversation_et.is_with_bot()).toBe true
-
- user_et.email 'welcome+chef@wire.com'
- expect(conversation_et.is_with_bot()).toBe true
+ user_et.username 'bob'
+ expect(conversation_et.is_with_bot()).toBe false
- user_et.email 'welcome+@@wire.com'
- expect(conversation_et.is_with_bot()).toBe true
+ user_et.username 'bobthebot'
+ expect(conversation_et.is_with_bot()).toBe false
- user_et.email 'ottobot@wire.com'
- expect(conversation_et.is_with_bot()).toBe true
+ user_et.username 'bot'
+ expect(conversation_et.is_with_bot()).toBe false
- user_et.email 'hello@wire.com'
+ user_et.username 'wire'
expect(conversation_et.is_with_bot()).toBe false
describe 'get_last_editable_message', ->
diff --git a/test/unit_tests/system_notification/SystemNotificationRepositorySpec.coffee b/test/unit_tests/system_notification/SystemNotificationRepositorySpec.coffee
index 16758e75871..455b9b3b1c0 100644
--- a/test/unit_tests/system_notification/SystemNotificationRepositorySpec.coffee
+++ b/test/unit_tests/system_notification/SystemNotificationRepositorySpec.coffee
@@ -636,6 +636,19 @@ describe 'z.SystemNotification.SystemNotificationRepository', ->
done()
.catch done.fail
+ it 'if you are automatically connected', (done) ->
+ message_et.member_message_type = z.message.SystemMessageType.CONNECTION_CONNECTED
+
+ system_notification_repository.notify connection_et, message_et
+ .then ->
+ notification_content.options.body = z.string.system_notification_connection_connected
+
+ result = JSON.stringify system_notification_repository._show_notification.calls.first().args[0]
+ expect(result).toEqual JSON.stringify notification_content
+ expect(system_notification_repository._show_notification).toHaveBeenCalledTimes 1
+ done()
+ .catch done.fail
+
describe 'shows a well-formed ping notification', ->
beforeAll ->
user_et = user_repository.user_mapper.map_user_from_object payload.users.get.one[0]