Skip to content

Commit

Permalink
Merge pull request #611 from wireapp/dev
Browse files Browse the repository at this point in the history
staging bump 2017-01-06
  • Loading branch information
Gregor Herdmann authored Jan 6, 2017
2 parents 1f64461 + 7c4a0e4 commit 2dff47e
Show file tree
Hide file tree
Showing 38 changed files with 294 additions and 206 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
/keys
/nbproject
/node_modules
/tags
/temp
/test/_SpecRunner.html
/test/coverage
Expand Down
Binary file modified app/image/logo/notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/image/logo/wire-logo-120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/page/template/content/conversation/participants.htm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div data-bind="visible: !editing(), text: conversation().display_name(), click: edit, l10n_tooltip: z.string.tooltip_people_rename" data-uie-name="status-name"></div>
<textarea data-bind="visible: editing, value: conversation().display_name(), enter: rename_conversation, hasFocus: editing, resize" data-uie-name="enter-name" maxlength="64" dir="auto"></textarea>
</div>
<span class="edit icon-edit" data-bind="visible: !editing(), click: edit"></span>
<span class="edit icon-edit" data-bind="visible: editable() && !editing(), click: edit"></span>
<div class="people popover-meta text-uppercase" data-bind="l10n_text: {'id': z.string.people_people, 'replace': {'placeholder': '%no', 'content': participants().length}}"></div>
</div>
<div class="participants-group-list">
Expand Down
4 changes: 4 additions & 0 deletions app/page/template/content/preferences-options.htm
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
<label class="text-theme" for="preferences-options-notification-on">
<span class="preferences-label" data-bind="l10n_text: z.string.preferences_options_notifications_on"></span>
</label>
<input type="radio" id="preferences-options-notification-obfuscate-message" name="preferences-options-notification" value="obfuscate-message" data-bind="checked: option_notifications">
<label class="text-theme" for="preferences-options-notification-obfuscate-message">
<span class="preferences-label" data-bind="l10n_text: z.string.preferences_options_notifications_obfuscate_message"></span>
</label>
<input type="radio" id="preferences-options-notification-obfuscate" name="preferences-options-notification" value="obfuscate" data-bind="checked: option_notifications">
<label class="text-theme" for="preferences-options-notification-obfuscate">
<span class="preferences-label" data-bind="l10n_text: z.string.preferences_options_notifications_obfuscate"></span>
Expand Down
2 changes: 1 addition & 1 deletion app/script/announce/AnnounceRepository.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class z.announce.AnnounceRepository

notification = new window.Notification announcement.title,
body: announcement.message
icon: if z.util.Environment.electron and z.util.Environment.os.mac then '' else window.notification_icon or '/image/logo/notification.png'
icon: if z.util.Environment.electron and z.util.Environment.os.mac then '' else '/image/logo/notification.png'
sticky: true
requireInteraction: true

Expand Down
4 changes: 3 additions & 1 deletion app/script/announce/AnnounceService.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
window.z ?= {}
z.announce ?= {}

ANNOUNCE_SERVICE_URL = 'api/v1/announce/'

class z.announce.AnnounceService
constructor: ->
@logger = new z.util.Logger 'z.announce.AnnounceService', z.config.LOGGER.OPTIONS
@url = "#{z.config.ANNOUNCE_URL}?order=created&active=true"
@url = "#{z.util.Environment.backend.website_url()}#{ANNOUNCE_SERVICE_URL}?order=created&active=true"
@url += '&production=true' if z.util.Environment.frontend.is_production()
return @

Expand Down
6 changes: 5 additions & 1 deletion app/script/bot/BotRepository.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ class z.bot.BotRepository
constructor: (@bot_service, @conversation_repository) ->
@logger = new z.util.Logger 'z.bot.BotRepository', z.config.LOGGER.OPTIONS

# Add bot to conversation.
###
Add bot to conversation.
@param bot_name [String] Bot name registered on backend
@param create_conversation [Boolean] A new conversation is created if true otherwise bot is added to active conversation, defaults to true
###
add_bot: (bot_name, create_conversation = true) =>
bot_result = undefined

Expand Down
4 changes: 3 additions & 1 deletion app/script/bot/BotService.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
window.z ?= {}
z.bot ?= {}

BOT_SERVICE_URL = 'api/v1/bot/'

class z.bot.BotService
constructor: ->
@logger = new z.util.Logger 'z.bot.BotService', z.config.LOGGER.OPTIONS
@url = "#{z.config.BOT_URL}"
@url = "#{z.util.Environment.backend.website_url()}#{BOT_SERVICE_URL}"
return @

fetch_bot: (bot_name) ->
Expand Down
2 changes: 1 addition & 1 deletion app/script/client/ClientRepository.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class z.client.ClientRepository
cleanup_clients_and_sessions: (quick_clean = true) =>
for user_id, client_ids of @cryptography_repository.create_user_session_map()
log_level = if client_ids > 8 then @logger.levels.WARN else @logger.levels.INFO
unless quick_clean and client_ids.length < 8
unless quick_clean and client_ids.length <= 8
@logger.log log_level, "User '#{user_id}' has session with '#{client_ids.length}' clients locally"
@_remove_obsolete_client_for_user_by_id user_id, client_ids

Expand Down
8 changes: 6 additions & 2 deletions app/script/config.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,9 @@ z.config =
MAXIMUM_USERS_PER_REQUEST: 200

UNSPLASH_URL: 'https://source.unsplash.com/1200x1200/?landscape'
ANNOUNCE_URL: 'https://wire.com/api/v1/announce/'
BOT_URL: 'https://wire.com/api/v1/bot/'

ACCOUNT_PRODUCTION_URL: 'https://account-wire.com/'
ACCOUNT_STAGING_URL: 'https://wire-account-staging.zinfra.io/'

WEBSITE_PRODUCTION_URL: 'https://wire.com/'
WEBSITE_STAGING_URL: 'https://staging-website.zinfra.io/'
39 changes: 27 additions & 12 deletions app/script/conversation/ConversationRepository.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -621,23 +621,40 @@ class z.conversation.ConversationRepository
callback next_conversation_et
else
@archive_conversation conversation_et, next_conversation_et
.catch (error) =>
@logger.error "Failed to leave conversation (#{conversation_et.id}): #{error}"

###
Remove member from conversation.
Remove bot from conversation.
@param conversation_et [z.entity.Conversation] Conversation to remove member from
@param user_id [String] ID of bot to be removed from the conversation
###
remove_bot: (conversation_et, user_id) =>
@conversation_service.delete_bots conversation_et.id, user_id
.then (response) ->
if response
amplify.publish z.event.WebApp.EVENT.INJECT, response
return response

###
Remove member from conversation.
@param conversation_et [z.entity.Conversation] Conversation to remove member from
@param user_id [String] ID of member to be removed from the the conversation
@param callback [Function] Function to be called on server return
@param user_id [String] ID of member to be removed from the conversation
###
remove_member: (conversation_et, user_id, callback) =>
remove_member: (conversation_et, user_id) =>
@conversation_service.delete_members conversation_et.id, user_id
.then (response) ->
amplify.publish z.event.WebApp.EVENT.INJECT, response
callback?()
.catch (error) =>
@logger.error "Failed to remove member from conversation (#{conversation_et.id}): #{error}"
if response
amplify.publish z.event.WebApp.EVENT.INJECT, response
return response

###
Remove participant from conversation.
@param conversation_et [z.entity.Conversation] Conversation to remove participant from
@param user_et [z.entity.User] User to be removed from the conversation
###
remove_participant: (conversation_et, user_et) =>
if user_et.is_bot
return @remove_bot conversation_et, user_et.id
return @remove_member conversation_et, user_et.id

###
Rename conversation.
Expand All @@ -653,8 +670,6 @@ class z.conversation.ConversationRepository
amplify.publish z.event.WebApp.EVENT.INJECT, response
.then ->
callback?()
.catch (error) =>
@logger.error "Failed to rename conversation (#{conversation_et.id}): #{error.message}"

reset_session: (user_id, client_id, conversation_id) =>
@logger.info "Resetting session with client '#{client_id}' of user '#{user_id}'"
Expand Down
12 changes: 12 additions & 0 deletions app/script/conversation/ConversationService.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,18 @@ class z.conversation.ConversationService
# Send events
###############################################################################

###
Remove bot from conversation.
@param conversation_id [String] ID of conversation to remove bot from
@param user_id [String] ID of bot to be removed from the the conversation
@param callback [Function] Function to be called on server return
###
delete_bots: (conversation_id, user_id) ->
@client.send_request
url: @client.create_url "/conversations/#{conversation_id}/bots/#{user_id}"
type: 'DELETE'

###
Remove member from conversation.
Expand Down
1 change: 1 addition & 0 deletions app/script/entity/User.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class z.entity.User
###
constructor: (@id = '') ->
@is_me = false
@is_bot = false

@joaat_hash = -1

Expand Down
10 changes: 0 additions & 10 deletions app/script/localization/strings-cs.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ z.string.cs.invite_meta_key_pc = 'Ctrl'
z.string.cs.invite_hint_selected = 'Stiskněte %meta_key + C pro kopírování'
z.string.cs.invite_hint_unselected = 'Vybrat a stisknout %meta_key + C'
z.string.cs.invite_headline = 'Pozvat lidi do aplikace Wire'
z.string.cs.invite_message = 'Jsem k zastižení na síti Wire. Najdete mne pod %username nebo navštivte https://get.wire.com.'
z.string.cs.invite_message_no_email = 'Jsem k zastižení na síti Wire. K navázání kontaktu navštivte https://get.wire.com.'

# Extensions
Expand All @@ -320,7 +319,6 @@ z.string.cs.people_no_matches = 'Žádné odpovídající výsledky.\nZkuste jin
z.string.cs.people_invite = 'Pozvat další'
z.string.cs.people_share = 'Sdílet kontakty'
z.string.cs.people_bring_your_friends = 'Přiveďte své přátele do aplikace Wire'
z.string.cs.people_invite_detail = 'Sdílením svých kontaktů si zjednodušíte propojení s ostatními. Všechny informace anonymizujeme a nikdy je neposkytujeme nikomu dalšímu.'
z.string.cs.people_invite_button_contacts = 'Z kontaktů'
z.string.cs.people_invite_button_gmail = 'Z Gmailu'
z.string.cs.people_invite_headline = 'Přiveďte své přátele'
Expand Down Expand Up @@ -446,17 +444,9 @@ z.string.cs.search_group_hint = 'Pokračujte v psaní nebo vyberte více lidí p
z.string.cs.search_connect = 'Připojit'
z.string.cs.search_connections = 'Kontakty'
z.string.cs.search_groups = 'Skupiny'
z.string.cs.search_placeholder = 'Hledat podle jména nebo emailu'
z.string.cs.search_top_people = 'Nejaktivnější kontakty'
z.string.cs.search_try_search = 'Najít lidi podle jména nebo\nemailové adresy'
z.string.cs.search_no_contacts_on_wire = 'V aplikaci Wire nemáte žádné kontakty.\nZkuste vyhledat kontakty podle jména nebo\nemailové adresy'
z.string.cs.search_others = 'Připojit'

# Picture upload
z.string.cs.upload_welcome = 'Wire je o tolik hezčí s obrázkem.'
z.string.cs.upload_welcome_keep = 'ponechat tento'
z.string.cs.upload_welcome_choose = 'vybrat vlastní'

# Google contacts upload
z.string.cs.upload_google_headline = 'Najít kontakty\npro konverzaci.'
z.string.cs.upload_google_message = 'Vaše údaje o kontaktech používáme k propojení s ostatními uživateli. Všechny informace anonymizujeme a nesdílíme je s nikým dalším.'
Expand Down
6 changes: 4 additions & 2 deletions app/script/localization/strings-de.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ z.string.de.conversation_context_menu_unlike = 'Gefällt mir nicht mehr'
z.string.de.conversation_delete_timestamp = 'Gelöscht um %@timestamp'
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'

# Archive
z.string.de.archive_header = 'Archivieren'
Expand Down Expand Up @@ -448,7 +449,8 @@ z.string.de.preferences_options_data_checkbox = 'Nutzungs- und Fehlerberichte'
z.string.de.preferences_options_data_detail = 'Hilf uns, Wire durch das Senden anonymisierter Informationen zu verbessern.'
z.string.de.preferences_options_notifications = 'Benachrichtigungen'
z.string.de.preferences_options_notifications_none = 'Aus'
z.string.de.preferences_options_notifications_obfuscate = 'Nachrichteninhalt verbergen'
z.string.de.preferences_options_notifications_obfuscate = 'Details verbergen'
z.string.de.preferences_options_notifications_obfuscate_message = 'Absendername zeigen'
z.string.de.preferences_options_notifications_on = 'Zeige Absendername und Nachricht'

# Search
Expand All @@ -472,7 +474,7 @@ z.string.de.upload_google_message_error = 'Wir haben die Informationen nicht erh
z.string.de.upload_google_button_again = 'Erneut versuchen'

# URLs
z.string.de.url_password_reset = 'https://wire.com/forgot/?hl=de'
z.string.de.url_password_reset = 'forgot/?hl=de'
z.string.de.url_legal = 'https://wire.com/legal/?hl=de'
z.string.de.url_privacy = 'https://wire.com/privacy/?hl=de'
z.string.de.url_privacy_why = 'https://wire.com/privacy/why/'
Expand Down
10 changes: 0 additions & 10 deletions app/script/localization/strings-es.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ z.string.es.people_no_matches = 'No hay resultados coincidentes. Intente con un
z.string.es.people_invite = 'Invitar gente'
z.string.es.people_share = 'Compartir contactos'
z.string.es.people_bring_your_friends = 'Invita a tus amigos a Wire'
z.string.es.people_invite_detail = 'Compartir tus contactos le ayuda a conectarse con otros. Toda la información es anónima y no será compartida con nadie más.'
z.string.es.people_invite_button_contacts = 'Desde los contactos'
z.string.es.people_invite_button_gmail = 'Desde Gmail'
z.string.es.people_invite_headline = 'Tráete a tus amigos'
Expand Down Expand Up @@ -454,19 +453,11 @@ 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 correo electrónico'
z.string.es.search_top_people = 'Personas más importantes'
z.string.es.search_try_search = 'Encuentra personas por nombre o dirección de email'
z.string.es.search_no_contacts_on_wire = 'No tienes ningún contacto en Wire. Trata de encontrar personas por nombre o dirección de correo electronico'
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'

# Picture upload
z.string.es.upload_welcome = 'Wire es mucho mejor con una foto.'
z.string.es.upload_welcome_keep = 'conservar esta'
z.string.es.upload_welcome_choose = 'eligir la tuya'

# Google contacts upload
z.string.es.upload_google_headline = 'Buscar con quien hablar.'
z.string.es.upload_google_message = 'Compartir tus contactos te ayuda a conectarte con otros. Toda la información es anónima y no será compartida con nadie más.'
Expand All @@ -475,7 +466,6 @@ z.string.es.upload_google_message_error = 'No recibimos tu información. Por fav
z.string.es.upload_google_button_again = 'Vuelve a intentarlo'

# URLs
z.string.es.url_password_reset = 'https://wire.com/forgot/'
z.string.es.url_legal = 'https://wire.com/legal/'
z.string.es.url_privacy = 'https://wire.com/privacy/'
z.string.es.url_privacy_why = 'https://wire.com/privacy/why/'
Expand Down
10 changes: 0 additions & 10 deletions app/script/localization/strings-fi.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ z.string.fi.people_no_matches = 'Ei vastaavia tuloksia. Yritä toisella nimellä
z.string.fi.people_invite = 'Kutsu ihmisiä'
z.string.fi.people_share = 'Jaa yhteystietoja'
z.string.fi.people_bring_your_friends = 'Tuo ystäväsi Wireen'
z.string.fi.people_invite_detail = 'Yhteystietojesi jakaminen auttaa sinua löytämään uusia kontakteja. Anonymisoimme kaiken tiedon ja emme jaa sitä ulkopuolisille.'
z.string.fi.people_invite_button_contacts = 'Kontakteista'
z.string.fi.people_invite_button_gmail = 'Gmailista'
z.string.fi.people_invite_headline = 'Kutsu kavereitasi'
Expand Down Expand Up @@ -454,19 +453,11 @@ z.string.fi.search_group_hint = 'Jatka kirjoittamista tai valitse lisää ihmisi
z.string.fi.search_connect = 'Yhdistä'
z.string.fi.search_connections = 'Yhteydet'
z.string.fi.search_groups = 'Ryhmät'
z.string.fi.search_placeholder = 'Etsi nimellä tai sähköpostiosoitteella'
z.string.fi.search_top_people = 'Eniten käytetyt kontaktit'
z.string.fi.search_try_search = 'Etsi ihmisiä nimellä tai sähköpostiosoitteella'
z.string.fi.search_no_contacts_on_wire = 'Sinulla ei ole kontakteja Wiressä. Yritä etsiä ihmisiä nimellä tai sähköpostiosoitteella'
z.string.fi.search_others = 'Yhdistä'
z.string.fi.search_friend_in_common = '%n yhteinen käyttäjä molemmilla'
z.string.fi.search_friends_in_common = '%n yhteistä käyttäjää molemmilla'

# Picture upload
z.string.fi.upload_welcome = 'Wire on niin paljon mukavampi kuvalla.'
z.string.fi.upload_welcome_keep = 'pidä tämä'
z.string.fi.upload_welcome_choose = 'valitse omasi'

# Google contacts upload
z.string.fi.upload_google_headline = 'Etsi ihmisiä joiden kanssa jutella.'
z.string.fi.upload_google_message = 'Käytämme sinun kontaktitietoja yhdistääksemme sinut muiden kanssa. Anonymisoimme kaiken tiedon ja emme jaa sitä ulkopuolisille.'
Expand All @@ -475,7 +466,6 @@ z.string.fi.upload_google_message_error = 'Emme vastaanottaneet tietojasi. Ole h
z.string.fi.upload_google_button_again = 'Yritä uudelleen'

# URLs
z.string.fi.url_password_reset = 'https://wire.com/forgot/'
z.string.fi.url_legal = 'https://wire.com/legal/'
z.string.fi.url_privacy = 'https://wire.com/privacy/'
z.string.fi.url_privacy_why = 'https://wire.com/privacy/why/'
Expand Down
10 changes: 0 additions & 10 deletions app/script/localization/strings-fr.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ z.string.fr.people_no_matches = 'Pas de résultats.\nEssayez avec un nom différ
z.string.fr.people_invite = 'Inviter des personnes'
z.string.fr.people_share = 'Partagez vos contacts'
z.string.fr.people_bring_your_friends = 'Amenez vos amis sur Wire'
z.string.fr.people_invite_detail = 'Partager vos contacts vous aide à vous connecter avec d’autres personnes. Nous anonymisons toutes les informations et ne les partageons pas avec qui que ce soit.'
z.string.fr.people_invite_button_contacts = 'Depuis vos Contacts'
z.string.fr.people_invite_button_gmail = 'Depuis Gmail'
z.string.fr.people_invite_headline = 'Amenez vos amis'
Expand Down Expand Up @@ -446,17 +445,9 @@ 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 email'
z.string.fr.search_top_people = 'Personnes favorites'
z.string.fr.search_try_search = 'Trouvez des personnes par leur nom ou\nleur adresse email complète'
z.string.fr.search_no_contacts_on_wire = 'Vous n’avez pas de contacts sur Wire.\nEssayez de trouver des gens par leur nom\nou leur adresse email complète'
z.string.fr.search_others = 'Connecter'

# Picture upload
z.string.fr.upload_welcome = 'Wire est tellement plus beau avec une photo.'
z.string.fr.upload_welcome_keep = 'garder celle-là'
z.string.fr.upload_welcome_choose = 'choisissez la vôtre'

# Google contacts upload
z.string.fr.upload_google_headline = 'Trouvez des personnes\nà qui parler.'
z.string.fr.upload_google_message = 'Nous utilisons les informations de vos contacts afin de vous connecter avec d’autres personnes. Nous anonymisons toutes les informations et ne les partageons pas avec qui que ce soit.'
Expand All @@ -465,7 +456,6 @@ z.string.fr.upload_google_message_error = 'Nous n’avons pas reçu votre inform
z.string.fr.upload_google_button_again = 'Retenter'

# URLs
z.string.fr.url_password_reset = 'https://wire.com/forgot/?hl=fr'
z.string.fr.url_legal = 'https://wire.com/legal/?hl=fr'
z.string.fr.url_privacy = 'https://wire.com/privacy/?hl=fr'
z.string.fr.url_privacy_why = 'https://wire.com/privacy/why/?hl=fr'
Expand Down
Loading

0 comments on commit 2dff47e

Please sign in to comment.