Browse Source

Merge branch 'master' of https://github.com/zhukov/webogram

Conflicts:
	app/js/locales/de-de.json
	app/js/locales/es-es.json
master
Igor Zhukov 10 years ago
parent
commit
804a1ac24f
  1. 8
      app/css/mobile.css
  2. 4
      app/js/directives.js
  3. 4
      app/js/filters.js
  4. 4
      app/js/locales/en-us.json
  5. 14
      app/js/services.js
  6. 2
      app/partials/desktop/chat_edit_modal.html
  7. 7
      app/partials/desktop/im.html
  8. 8
      app/partials/mobile/chat_create_modal.html
  9. 8
      app/partials/mobile/chat_edit_modal.html
  10. 45
      app/partials/mobile/dialog.html
  11. 10
      app/partials/mobile/edit_contact_modal.html
  12. 51
      app/partials/mobile/im.html
  13. 14
      app/partials/mobile/import_contact_modal.html
  14. 60
      app/partials/mobile/login.html
  15. 8
      app/partials/mobile/message_attach_document.html
  16. 4
      app/partials/mobile/message_attach_pending.html
  17. 39
      app/partials/mobile/message_service.html
  18. 8
      app/partials/mobile/photo_modal.html
  19. 10
      app/partials/mobile/profile_edit_modal.html
  20. 8
      app/partials/mobile/video_modal.html
  21. 20
      app/partials/mobile/welcome.html

8
app/css/mobile.css

@ -130,7 +130,7 @@ html { @@ -130,7 +130,7 @@ html {
vertical-align: text-top;
background: url(../img/icons/IconsetW.png) -15px -835px no-repeat;
background-size: 42px 891px;
background-size: 42px 971px;
opacity: 0.8;
}
.is_1x .icon-back {
@ -954,7 +954,7 @@ a.mobile_modal_action .tg_checkbox_label { @@ -954,7 +954,7 @@ a.mobile_modal_action .tg_checkbox_label {
.im_submit:active,
.im_submit:hover {
background: url(../img/icons/IconsetW.png) 2px -860px no-repeat;
background-size: 42px 891px;
background-size: 42px 971px;
color: transparent;
box-shadow: none;
}
@ -978,7 +978,7 @@ a.mobile_modal_action .tg_checkbox_label { @@ -978,7 +978,7 @@ a.mobile_modal_action .tg_checkbox_label {
height: 23px;
vertical-align: text-top;
background: url(../img/icons/IconsetW.png) -12px -68px no-repeat;
background-size: 42px 891px;
background-size: 42px 971px;
opacity: 0.8;
}
.is_1x .icon-paperclip {
@ -1015,7 +1015,7 @@ a.mobile_modal_action .tg_checkbox_label { @@ -1015,7 +1015,7 @@ a.mobile_modal_action .tg_checkbox_label {
opacity: 1;
margin: 0;
background: url(../img/icons/IconsetW.png) -10px -771px no-repeat;
background-size: 42px 891px;
background-size: 42px 971px;
}
.is_1x .icon-emoji {
background-image: url(../img/icons/IconsetW_1x.png);

4
app/js/directives.js

@ -33,11 +33,11 @@ angular.module('myApp.directives', ['myApp.filters']) @@ -33,11 +33,11 @@ angular.module('myApp.directives', ['myApp.filters'])
};
})
.directive('myMessage', function($filter) {
.directive('myMessage', function($filter, _) {
var dateFilter = $filter('myDate'),
dateSplitHtml = '<div class="im_message_date_split im_service_message_wrap"><div class="im_service_message"></div></div>',
unreadSplitHtml = '<div class="im_message_unread_split">Unread messages</div>',
unreadSplitHtml = '<div class="im_message_unread_split">' + _('unread_messages_split') + '</div>',
selectedClass = 'im_message_selected',
focusClass = 'im_message_focus',
unreadClass = 'im_message_unread',

4
app/js/filters.js

@ -63,7 +63,7 @@ angular.module('myApp.filters', ['myApp.i18n']) @@ -63,7 +63,7 @@ angular.module('myApp.filters', ['myApp.i18n'])
var ticks = timestamp * 1000,
diff = Math.abs(tsNow() - ticks),
format = 'HH:mm';
format = 'shortTime';
if (diff > 518400000) { // 6 days
format = 'shortDate';
@ -78,7 +78,7 @@ angular.module('myApp.filters', ['myApp.i18n']) @@ -78,7 +78,7 @@ angular.module('myApp.filters', ['myApp.i18n'])
.filter('time', ['$filter', function($filter) {
var cachedDates = {},
dateFilter = $filter('date'),
format = Config.Mobile ? 'HH:mm' : 'HH:mm:ss';
format = Config.Mobile ? 'shortTime' : 'mediumTime';
return function (timestamp) {
if (cachedDates[timestamp]) {

4
app/js/locales/en-us.json

@ -74,6 +74,8 @@ @@ -74,6 +74,8 @@
"error_browser_no_local_file_system_video_md": "Your browser doesn't support {moz-link: https://developer.mozilla.org/en-US/docs/Web/API/LocalFileSystem | LocalFileSystem} feature which is needed to play this video.\nPlease, install {chrome-link: http://google.com/chrome | Google Chrome} or use {telegram-link: https://telegram.org/ | mobile app} instead.",
"error_video_download_failed": "Video download failed",
"unread_messages_split": "Unread messages",
"user_name_deleted": "DELETED",
"user_first_name_deleted": "DELETED",
"user_status_offline": "offline",
@ -102,7 +104,7 @@ @@ -102,7 +104,7 @@
"group_edit_submit_active": "Saving...",
"confirm_modal_logout": "Are you sure you want to log out?",
"confirm_modal_update_reload": "A new version of Webogram has been downloaded. Launch it?",
"confirm_modal_update_reload": "A new version of Telegram Web has been downloaded. Launch it?",
"confirm_modal_history_flush": "Are you sure? This can not be undone!",
"confirm_modal_terminate_sessions": "Are you sure you want to log out all devices except for the current one?",
"confirm_modal_mixed_content_fail_http_redirect_md": "Your browser {moz-link: does not support} mixed content which is neccessary for MTProto support on https. {issue-link: Learn more}\n\n Would you like to use http-version instead?",

14
app/js/services.js

@ -1728,7 +1728,7 @@ angular.module('myApp.services', ['myApp.i18n']) @@ -1728,7 +1728,7 @@ angular.module('myApp.services', ['myApp.i18n'])
if (toID < 0) {
return toID;
} else if (message.out) {
} else if (message.out || message.flags & 2) {
return toID;
}
return message.from_id;
@ -2032,10 +2032,6 @@ angular.module('myApp.services', ['myApp.i18n']) @@ -2032,10 +2032,6 @@ angular.module('myApp.services', ['myApp.i18n'])
peerID = getMessagePeer(message),
historyStorage = historiesStorage[peerID];
if (!message.out) {
AppUsersManager.forceUserOnline(message.from_id);
}
if (historyStorage !== undefined) {
var topMsgID = historiesStorage[peerID].history[0];
if (historiesStorage[peerID].history.indexOf(message.id) != -1) {
@ -2055,6 +2051,10 @@ angular.module('myApp.services', ['myApp.i18n']) @@ -2055,6 +2051,10 @@ angular.module('myApp.services', ['myApp.i18n'])
saveMessages([message]);
if (!message.out) {
AppUsersManager.forceUserOnline(message.from_id);
}
if (historyStorage.count !== null) {
historyStorage.count++;
}
@ -2713,9 +2713,9 @@ angular.module('myApp.services', ['myApp.i18n']) @@ -2713,9 +2713,9 @@ angular.module('myApp.services', ['myApp.i18n'])
doc.thumb = thumb;
doc.canDownload = !(window.chrome && chrome.fileSystem && chrome.fileSystem.chooseEntry);
doc.withPreview = doc.canDownload && doc.thumb && doc.mime_type.match(/^(image\/|application\/pdf)/) ? 1 : 0;
doc.withPreview = doc.canDownload && doc.mime_type.match(/^(image\/|application\/pdf)/) ? 1 : 0;
if (doc.withPreview && isGif) {
if (isGif && doc.withPreview && doc.thumb) {
doc.isSpecial = 'gif';
}
else if (isAudio) {

2
app/partials/desktop/chat_edit_modal.html

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
</div>
<div class="modal-footer">
<a class="btn btn-link" ng-click="$dismiss()" my-i18n="modal_cancel">Cancel</a>
<a class="btn btn-link" ng-click="$dismiss()" my-i18n="modal_cancel"></a>
<button class="btn btn-primary" ng-class="{disabled: group.updating}" ng-click="updateGroup()" ng-bind="group.updating ? 'group_edit_submit_active' : 'group_edit_submit' | i18n" ng-disabled="group.updating"></button>
</div>

7
app/partials/desktop/im.html

@ -148,7 +148,9 @@ @@ -148,7 +148,9 @@
<div class="im_history_scrollable">
<div class="im_history" ng-class="{im_history_selectable: historyState.selectActions}">
<div ng-if="state.empty" class="im_history_empty" ng-switch="state.mayBeHasMore" my-vertical-position="0.25" padding="true">
<span ng-switch-when="true"><my-i18n msgid="im_loading_history"></my-i18n><span my-loading-dots></span></span>
<span ng-switch-when="true">
<my-i18n msgid="im_loading_history"></my-i18n><span my-loading-dots></span>
</span>
<span ng-switch-default my-i18n="im_no_messages"></span>
</div>
@ -187,7 +189,7 @@ @@ -187,7 +189,7 @@
<span ng-switch-when="true" my-i18n="im_delete_chat"></span>
<span ng-switch-default my-i18n="im_clear_history"></span>
</a>
<a class="im_edit_cancel_link" ng-click="selectedCancel()" my-i18n="modal_cancel">Cancel</a>
<a class="im_edit_cancel_link" ng-click="selectedCancel()" my-i18n="modal_cancel"></a>
<div class="im_edit_selected_actions" my-i18n>
<a class="btn btn-primary im_edit_forward_btn" ng-click="selectedForward()" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount" my-i18n-format="im_forward"></a>
<a class="btn btn-danger im_edit_delete_btn" ng-click="selectedDelete()" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount" my-i18n-format="im_delete"></a>
@ -257,7 +259,6 @@ @@ -257,7 +259,6 @@
</div>
</div>
<div my-lang-footer></div>

8
app/partials/mobile/chat_create_modal.html

@ -8,15 +8,13 @@ @@ -8,15 +8,13 @@
<ul class="nav navbar-nav navbar-quick-nav">
<li class="navbar-quick-right">
<a ng-class="{disabled: group.creating}" ng-click="createGroup()" ng-bind="group.creating ? 'Creating...' : 'OK'" ng-disabled="group.creating"></a>
<a ng-class="{disabled: group.creating}" ng-click="createGroup()" ng-bind="group.creating ? 'group_create_submit_active' : 'group_create_submit' | i18n" ng-disabled="group.creating"></a>
</li>
<li>
<a ng-click="$dismiss()" class="navbar-quick-media-back">
<i class="icon icon-back"></i>
<div class="navbar-quick-back-title">
<h4>
Create Group
</h4>
<h4 my-i18n="group_create_modal_title"></h4>
</div>
</a>
</li>
@ -33,7 +31,7 @@ @@ -33,7 +31,7 @@
<form class="modal_simple_form" ng-submit="createGroup()" my-vertical-position="0.25">
<div class="form-group">
<input class="form-control input-lg" my-focused type="text" placeholder="Group name" ng-model="group.name"/>
<input class="form-control input-lg" my-focused type="text" placeholder="{{'group_create_name' | i18n}}" ng-model="group.name"/>
</div>
</form>

8
app/partials/mobile/chat_edit_modal.html

@ -8,15 +8,13 @@ @@ -8,15 +8,13 @@
<ul class="nav navbar-nav navbar-quick-nav">
<li class="navbar-quick-right">
<a ng-class="{disabled: group.updating}" ng-click="updateGroup()" ng-bind="group.updating ? 'Saving...' : 'Save'" ng-disabled="group.updating"></a>
<a ng-class="{disabled: group.updating}" ng-click="updateGroup()" ng-bind="group.updating ? 'group_edit_submit_active' : 'group_edit_submit' | i18n" ng-disabled="group.updating"></a>
</li>
<li>
<a ng-click="$dismiss()" class="navbar-quick-media-back">
<i class="icon icon-back"></i>
<div class="navbar-quick-back-title">
<h4>
Edit Group
</h4>
<h4 my-i18n="group_edit_modal_title"></h4>
</div>
</a>
</li>
@ -33,7 +31,7 @@ @@ -33,7 +31,7 @@
<form class="modal_simple_form" ng-submit="updateGroup()" my-vertical-position="0.25">
<div class="form-group">
<input class="form-control input-lg" my-focused type="text" placeholder="Group name" ng-model="group.name"/>
<input class="form-control input-lg" my-focused type="text" placeholder="{{'group_edit_name' | i18n}}" ng-model="group.name"/>
</div>
</form>

45
app/partials/mobile/dialog.html

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
<a class="im_dialog" ng-click="dialogSelect(dialogMessage.peerString, search.messages &amp;&amp; dialogMessage.id)">
<a class="im_dialog" ng-mousedown="dialogSelect(dialogMessage.peerString, search.messages &amp;&amp; dialogMessage.id)">
<div class="im_dialog_meta pull-right text-right">
<div class="im_dialog_date" ng-bind="dialogMessage.dateText"></div>
@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
<div ng-switch="dialogMessage.deleted">
<div ng-switch-when="true" class="im_dialog_message">
<span class="im_dialog_message_text">deleted message</span>
<span class="im_dialog_message_text" my-i18n="conversation_message_deleted"></span>
</div>
<div ng-switch-default class="im_dialog_message">
<span class="im_dialog_chat_from_wrap">
@ -44,39 +44,36 @@ @@ -44,39 +44,36 @@
></span><span
class="im_dialog_chat_from"
ng-if="dialogMessage.out"
>You</span>{{((dialogMessage.out || dialogMessage.peerID &lt; 0) &amp;&amp; (dialogMessage.message.length || dialogMessage.media &amp;&amp; dialogMessage.media._ != 'messageMediaEmpty')) ? ':' : ''}}
my-i18n="conversation_you"
></span>{{((dialogMessage.out || dialogMessage.peerID &lt; 0) &amp;&amp; (dialogMessage.message.length || dialogMessage.media &amp;&amp; dialogMessage.media._ != 'messageMediaEmpty')) ? ':' : ''}}
</span>
<span class="im_dialog_message_media" ng-if="dialogMessage.media &amp;&amp; dialogMessage.media._ != 'messageMediaEmpty'" ng-switch="dialogMessage.media._">
<span ng-switch-when="messageMediaPhoto">Photo</span>
<span ng-switch-when="messageMediaVideo">Video</span>
<span ng-switch-when="messageMediaDocument">Document</span>
<span ng-switch-when="messageMediaAudio">Audio</span>
<span ng-switch-when="messageMediaGeo">Location</span>
<span ng-switch-when="messageMediaContact">Contact</span>
<span class="im_dialog_message_media" ng-if="dialogMessage.media" ng-switch="dialogMessage.media._">
<span ng-switch-when="messageMediaPhoto" my-i18n="conversation_media_photo"></span>
<span ng-switch-when="messageMediaVideo" my-i18n="conversation_media_video"></span>
<span ng-switch-when="messageMediaDocument" ng-bind="dialogMessage.media.document.file_name"></span>
<span ng-switch-when="messageMediaAudio" my-i18n="conversation_media_audio"></span>
<span ng-switch-when="messageMediaGeo" my-i18n="conversation_media_location"></span>
<span ng-switch-when="messageMediaContact" my-i18n="conversation_media_contact"></span>
</span>
<span class="im_dialog_message_service" ng-if="dialogMessage._ == 'messageService'" ng-switch="dialogMessage.action._">
<span ng-switch-when="messageActionChatCreate">created the group</span>
<span ng-switch-when="messageActionChatEditTitle">changed group name</span>
<span ng-switch-when="messageActionChatEditPhoto">changed group photo</span>
<span ng-switch-when="messageActionChatDeletePhoto">removed group photo</span>
<span ng-switch-when="messageActionChatCreate" my-i18n="conversation_group_created"></span>
<span ng-switch-when="messageActionChatEditTitle" my-i18n="conversation_group_renamed"></span>
<span ng-switch-when="messageActionChatEditPhoto" my-i18n="conversation_group_photo_updated"></span>
<span ng-switch-when="messageActionChatDeletePhoto" my-i18n="conversation_group_photo_removed"></span>
<span ng-switch-when="messageActionChatAddUser" ng-switch="dialogMessage.from_id == dialogMessage.action.user_id">
<span ng-switch-when="true">
returned to group
</span>
<span ng-switch-default>
invited <span ng-bind-html="dialogMessage.action.user.rFullName"></span>
<span ng-switch-when="true" my-i18n="conversation_returned_to_group"></span>
<span ng-switch-default my-i18n="conversation_invited_user">
<my-i18n-param name="user" ng-bind-html="dialogMessage.action.user.rFullName"></my-i18n-param>
</span>
</span>
<span ng-switch-when="messageActionChatDeleteUser" ng-switch="dialogMessage.from_id == dialogMessage.action.user_id">
<span ng-switch-when="true">
left group
</span>
<span ng-switch-default>
kicked <span ng-bind-html="dialogMessage.action.user.rFullName"></span>
<span ng-switch-when="true" my-i18n="conversation_left_group"></span>
<span ng-switch-default my-i18n="conversation_kicked_user">
<my-i18n-param name="user" ng-bind-html="dialogMessage.action.user.rFullName"></my-i18n-param>
</span>
</span>
</span>

10
app/partials/mobile/edit_contact_modal.html

@ -8,15 +8,13 @@ @@ -8,15 +8,13 @@
<ul class="nav navbar-nav navbar-quick-nav">
<li class="navbar-quick-right">
<a ng-class="{disabled: progress.enabled}" ng-click="doImport()" ng-bind="progress.enabled ? 'Saving...' : 'Save'" ng-disabled="progress.enabled"></a>
<a ng-class="{disabled: progress.enabled}" ng-click="doImport()" ng-bind="progress.enabled ? 'contact_edit_modal_submit_active' : 'contact_edit_modal_submit'| i18n" ng-disabled="progress.enabled"></a>
</li>
<li>
<a ng-click="$dismiss()" class="navbar-quick-media-back">
<i class="icon icon-back"></i>
<div class="navbar-quick-back-title">
<h4>
Edit contact
</h4>
<h4 my-i18n="contact_edit_modal_title"></h4>
</div>
</a>
</li>
@ -36,10 +34,10 @@ @@ -36,10 +34,10 @@
<span class="form-control uneditable_input input-lg disabled" disabled my-focused type="text" ng-bind="importContact.phone | phoneNumber"></span>
</div>
<div class="form-group">
<input class="form-control input-lg" type="text" placeholder="First name" ng-model="importContact.first_name"/>
<input class="form-control input-lg" type="text" placeholder="{{'contact_edit_modal_first_name' | i18n}}" ng-model="importContact.first_name"/>
</div>
<div class="form-group">
<input class="form-control input-lg" type="text" placeholder="Last name" ng-model="importContact.last_name"/>
<input class="form-control input-lg" type="text" placeholder="{{'contact_edit_modal_last_name' | i18n}}" ng-model="importContact.last_name"/>
</div>
</form>

51
app/partials/mobile/im.html

@ -7,14 +7,14 @@ @@ -7,14 +7,14 @@
<div ng-controller="AppImDialogsController" my-dialogs has-tabs="{{search.query.length > 0}}" class="im_dialogs_col_wrap">
<div class="im_dialogs_panel">
<div class="im_dialogs_search">
<input class="form-control im_dialogs_search_field no_outline" type="search" placeholder="Search" ng-model="search.query"/>
<input class="form-control im_dialogs_search_field no_outline" type="search" placeholder="{{'modal_search' | i18n}}" ng-model="search.query"/>
<a class="im_dialogs_search_clear" ng-click="searchClear()" ng-show="search.query.length"></a>
</div>
<div class="im_dialogs_tabs_wrap">
<div class="im_dialogs_tabs clearfix">
<a href="" class="im_dialogs_tab" ng-class="{active: !search.messages}" ng-click="search.messages = false">Conversations</a>
<a href="" class="im_dialogs_tab" ng-class="{active: search.messages}" ng-click="search.messages = true">Messages</a>
<a href="" class="im_dialogs_tab" ng-class="{active: !search.messages}" ng-click="search.messages = false" my-i18n="im_conversations"></a>
<a href="" class="im_dialogs_tab" ng-class="{active: search.messages}" ng-click="search.messages = true" my-i18n="im_messages"></a>
</div>
</div>
</div>
@ -22,14 +22,10 @@ @@ -22,14 +22,10 @@
<div my-dialogs-list-mobile class="im_dialogs_col im_dialogs_scrollable_wrap mobile_scrollable_wrap">
<div class="im_dialogs_empty_wrap" ng-if="isEmpty.contacts" my-vertical-position="0.4">
<h3 class="im_dialogs_empty_header">No contacts yet</h3>
<p class="im_dialogs_empty_lead">Get started by adding a contact to chat with</p>
<button type="button" class="btn btn-primary btn-block im_dialogs_add_contact" ng-click="importContact()">
Add contact
</button>
<button ng-if="phonebookAvailable" type="button" class="btn btn-primary btn-block im_dialogs_import_phonebook" ng-click="importPhonebook()">
Import phonebook
</button>
<h3 class="im_dialogs_empty_header" my-i18n="im_no_contacts"></h3>
<p class="im_dialogs_empty_lead" my-i18n="im_get_started_long"></p>
<button type="button" class="btn btn-primary btn-block im_dialogs_add_contact" ng-click="importContact()" my-i18n="im_add_contact"> </button>
<button ng-if="phonebookAvailable" type="button" class="btn btn-primary btn-block im_dialogs_import_phonebook" ng-click="importPhonebook()" my-i18n="im_import_phonebook"></button>
</div>
<div ng-switch="search.messages">
@ -42,7 +38,7 @@ @@ -42,7 +38,7 @@
</div>
<div class="im_dialogs_contacts_wrap" ng-show="!search.messages &amp;&amp; contacts.length > 0">
<h5>Contacts</h5>
<h5 my-i18n="im_contacts_title"></h5>
<ul class="nav nav-pills nav-stacked">
<li class="im_dialog_wrap" ng-repeat="contact in contacts | orderBy:'user.sortName' track by contact.userID" ng-class="{active: curDialog.peerID == contact.userID}">
<a class="im_dialog" ng-click="dialogSelect(contact.peerString)">
@ -70,7 +66,7 @@ @@ -70,7 +66,7 @@
<div class="im_history_col_wrap" ng-controller="AppImHistoryController">
<div ng-show="!state.notSelected &amp;&amp; !state.loaded" class="im_history_not_selected" my-vertical-position="0.35" padding="true">
Loading history<span my-loading-dots></span>
<my-i18n msgid="im_loading_history"></my-i18n><span my-loading-dots></span>
</div>
<div ng-show="state.loaded">
@ -81,8 +77,10 @@ @@ -81,8 +77,10 @@
<div class="im_history_scrollable">
<div class="im_history" ng-class="{im_history_selectable: historyState.selectActions}">
<div ng-if="state.empty" class="im_history_empty" ng-switch="state.mayBeHasMore" my-vertical-position="0.25" padding="true">
<span ng-switch-when="true">Loading history<span my-loading-dots></span></span>
<span ng-switch-default>No messages here yet...</span>
<span ng-switch-when="true">
<my-i18n msgid="im_loading_history"></my-i18n><span my-loading-dots></span>
</span>
<span ng-switch-default my-i18n="im_no_messages"></span>
</div>
<div class="im_history_messages" ng-class="{im_history_messages_group: historyPeer.id < 0}">
@ -100,12 +98,10 @@ @@ -100,12 +98,10 @@
<div class="im_bottom_panel_wrap">
<div class="im_edit_panel_wrap clearfix" ng-show="historyState.selectActions">
<div class="im_edit_selected_actions">
<a class="btn btn-primary im_edit_forward_btn" ng-click="selectedForward()" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount">
Forward <strong class="im_selected_count" ng-show="selectedCount > 0" ng-bind="selectedCount"></strong>
</a><a class="btn btn-danger im_edit_delete_btn" ng-click="selectedDelete()" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount">
Delete <strong class="im_selected_count" ng-show="selectedCount > 0" ng-bind="selectedCount"></strong>
</a>
<div class="im_edit_selected_actions" my-i18n>
<a class="btn btn-primary im_edit_forward_btn" ng-click="selectedForward()" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount" my-i18n-format="im_forward"></a>
<a class="btn btn-danger im_edit_delete_btn" ng-click="selectedDelete()" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount" my-i18n-format="im_delete"></a>
<my-i18n-param name="count"><strong class="im_selected_count" ng-show="selectedCount > 0" ng-bind="selectedCount"></strong></my-i18n-param>
</div>
</div>
@ -117,16 +113,16 @@ @@ -117,16 +113,16 @@
<form my-send-form draft-message="draftMessage" class="im_send_form" ng-class="{im_send_form_empty: !draftMessage.text.length}" ng-submit="sendMessage($event)">
<div class="im_send_field_wrap">
<div class="im_send_dropbox_wrap"> Drop photos here to send </div>
<textarea ng-model="draftMessage.text" placeholder="Write a message..." class="form-control im_message_field no_outline"></textarea>
<div class="im_send_dropbox_wrap" my-i18n="im_photos_drop_text"></div>
<textarea ng-model="draftMessage.text" placeholder="{{'im_message_field_placeholder' | i18n}}" class="form-control im_message_field no_outline"></textarea>
</div>
<div class="im_attach pull-right">
<input type="file" class="im_attach_input" size="28" multiple="true" title="Send file" />
<input type="file" class="im_attach_input" size="28" multiple="true" title="{{'im_media_attach_title' | i18n}}" />
<i class="icon icon-paperclip"></i>
</div>
<div class="im_emoji_btn pull-right" title="Insert emoticon">
<div class="im_emoji_btn pull-right" title="{{'im_emoji_btn_title' | i18n}}">
<i class="icon icon-emoji"></i>
</div>
@ -147,7 +143,4 @@ @@ -147,7 +143,4 @@
</div>
</div>
<div id="notify_sound"></div>
</div>

14
app/partials/mobile/import_contact_modal.html

@ -8,15 +8,13 @@ @@ -8,15 +8,13 @@
<ul class="nav navbar-nav navbar-quick-nav">
<li class="navbar-quick-right">
<a ng-class="{disabled: progress.enabled}" ng-click="doImport()" ng-bind="progress.enabled ? 'Importing...' : 'Save'" ng-disabled="progress.enabled"></a>
<a ng-class="{disabled: progress.enabled}" ng-click="doImport()" ng-bind="progress.enabled ? 'contact_import_modal_submit_active' : 'contact_import_modal_submit' | i18n" ng-disabled="progress.enabled"></a>
</li>
<li>
<a ng-click="$dismiss()" class="navbar-quick-media-back">
<i class="icon icon-back"></i>
<div class="navbar-quick-back-title">
<h4>
Add new contact
</h4>
<h4 my-i18n="contact_import_modal_title"></h4>
</div>
</a>
</li>
@ -33,13 +31,13 @@ @@ -33,13 +31,13 @@
<form class="modal_simple_form" ng-submit="doImport()" my-vertical-position="0.3">
<div class="form-group">
<input class="form-control input-lg" my-focused type="text" placeholder="Phone number" ng-model="importContact.phone"/>
<input class="form-control input-lg" my-focused type="text" placeholder="{{'contact_import_modal_phone' | i18n}}" ng-model="importContact.phone"/>
</div>
<div class="form-group">
<input class="form-control input-lg" type="text" placeholder="First name" ng-model="importContact.first_name"/>
<input class="form-control input-lg" type="text" placeholder="{{'contact_edit_modal_first_name' | i18n}}" ng-model="importContact.first_name"/>
</div>
<div class="form-group">
<input class="form-control input-lg" type="text" placeholder="Last name" ng-model="importContact.last_name"/>
<input class="form-control input-lg" type="text" placeholder="{{'contact_edit_modal_last_name' | i18n}}" ng-model="importContact.last_name"/>
</div>
</form>
@ -47,7 +45,7 @@ @@ -47,7 +45,7 @@
</div>
<div class="modal-footer" ng-if="phonebookAvailable">
<a class="btn btn-link" ng-click="importPhonebook()">Phonebook</a>
<a class="btn btn-link" ng-click="importPhonebook()" my-i18n="contact_import_modal_phonebook"></a>
</div>
</div>

60
app/partials/mobile/login.html

@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
<div class="error" ng-if="error.message" ng-bind="error.message"></div>
<form name="mySendCodeForm" ng-if="!credentials.phone_code_hash" ng-submit="sendCode()">
<h3 class="login_form_head">Sign in</h3>
<p class="login_form_lead">Please choose your country and enter your full phone number.</p>
<h3 class="login_form_head" my-i18n="login_sign_in"></h3>
<p class="login_form_lead" my-i18n="login_enter_number_description"></p>
<div class="login_country_selector" ng-click="chooseCountry()">
<span ng-bind="credentials.phone_country_name"></span>
@ -14,71 +14,73 @@ @@ -14,71 +14,73 @@
</div>
<div class="form-group" ng-class="{'has-error': error.field == 'phone'}">
<label class="control-label" ng-if="error.field == 'phone'">Incorrect phone number</label>
<label class="control-label" ng-if="error.field == 'phone'" my-i18n="login_incorrect_number"></label>
<div class="clearfix">
<input type="tel" autocomplete="off" class="form-control input-lg pull-left login_phone_country" my-focused name="phone_country" ng-model="credentials.phone_country">
<input type="tel" autocomplete="off" class="form-control input-lg pull-left login_phone_number" my-focus-on="country_selected" name="phone_number" ng-model="credentials.phone_number" placeholder="Enter your phone" required>
<input type="tel" autocomplete="off" class="form-control pull-left login_phone_country" my-focused name="phone_country" ng-model="credentials.phone_country">
<input type="tel" autocomplete="off" class="form-control pull-left login_phone_number" my-focus-on="country_selected" name="phone_number" ng-model="credentials.phone_number" placeholder="{{'login_tel_input_placeholder' | i18n}}" required>
</div>
</div>
<button class="btn btn-primary btn-block" ng-class="{disabled: progress.enabled}" ng-disabled="progress.enabled" type="submit" ng-switch="progress.enabled">
<span ng-switch-when="true">Generating keys<span my-loading-dots></span></span>
<span ng-switch-default>Next</span>
<span ng-switch-when="true"><my-i18n msgid="login_generating_key"></my-i18n><span my-loading-dots></span></span>
<span ng-switch-default my-i18n="modal_next"></span>
</button>
<div class="login_form_messaging" ng-show="progress.enabled">Keys are only generated once. This can take a few minutes on slower devices, please be patient.</div>
<div class="login_form_messaging" ng-show="progress.enabled" my-i18n="login_generating_keys_info"></div>
</form>
<form name="myLoginForm" ng-if="credentials.phone_code_hash &amp;&amp; !credentials.phone_code_valid" ng-submit="logIn()">
<h3 class="login_form_head"><span ng-bind="credentials.phone_country"></span> <span ng-bind="credentials.phone_number"></span></h3>
<div class="login_edit_phone"><a ng-click="editPhone()">Edit phone number</a></div>
<div class="login_edit_phone"><a ng-click="editPhone()" my-i18n="login_edit_number"></a></div>
<div ng-switch="credentials.viaApp">
<div ng-switch-when="true">
<p class="login_form_lead" my-i18n="login_enter_code_label_md"></p>
<p class="login_form_lead">
Please enter the code you've just received in your other <strong>Telegram</strong> app
</p>
<p class="login_form_lead">
<a ng-click="sendSms()">Haven't received the code?</a>
<a ng-click="sendSms()" my-i18n="login_code_not_received"></a>
</p>
</div>
<div ng-switch-default>
<p class="login_form_lead">We have sent you a code via SMS.<br/>Please enter it below.</p>
<p class="login_form_lead" my-i18n="login_enter_sms_code_label_md"></p>
<p class="login_form_lead">
<span ng-show="callPending.remaining > 0">Telegram will call you in {{callPending.remaining | duration}}</span>
<span ng-show="!callPending.remaining &amp;&amp; !callPending.success">Telegram is calling you</span>
<span ng-show="!callPending.remaining &amp;&amp; callPending.success">Telegram dialed your number</span>
<span ng-show="callPending.remaining > 0" my-i18n="login_call_remaining">
<my-i18n-param name="remaining">{{callPending.remaining | duration}}</my-i18n-param>
</span>
<span ng-show="!callPending.remaining &amp;&amp; !callPending.success" my-i18n="login_calling"></span>
<span ng-show="!callPending.remaining &amp;&amp; callPending.success" my-i18n="login_number_dialed"></span>
</p>
</div>
</div>
<div class="form-group" ng-class="{'has-error': error.field == 'phone_code'}">
<label class="control-label" for="phone_code" ng-if="error.field == 'phone_code'">Incorrect SMS code</label>
<input type="number" my-focused class="form-control login_phone_code" name="phone_code" ng-model="credentials.phone_code" placeholder="Enter your code" autocomplete="off" required>
<label class="control-label" for="phone_code" ng-if="error.field == 'phone_code'" my-i18n="login_incorrect_sms_code"></label>
<input type="number" my-focused class="form-control login_phone_code" name="phone_code" ng-model="credentials.phone_code" placeholder="{{'login_number_input_placeholder' | i18n}}" autocomplete="off" required>
</div>
<button class="btn btn-primary btn-block" type="submit" ng-class="{disabled: progress.enabled}" ng-disabled="progress.enabled" ng-switch="progress.enabled">
<span ng-switch-when="true">Checking code<span my-loading-dots></span></span>
<span ng-switch-default>Next</span>
<span ng-switch-when="true"><my-i18n msgid="login_checking_code"></my-i18n><span my-loading-dots></span></span>
<span ng-switch-default my-i18n="modal_next"></span>
</button>
</form>
<form name="myFullNameForm" ng-if="credentials.phone_code_valid &amp;&amp; credentials.phone_unoccupied" ng-submit="logIn(true)">
<h3 class="login_form_head">Your info</h3>
<p class="login_form_lead">Please enter your full name to set up a Telegram account.</p>
<h3 class="login_form_head" my-i18n="login_your_info"></h3>
<p class="login_form_lead" my-i18n="login_fulll_name_label"></p>
<div class="form-group login_first_name_wrap" ng-class="{'has-error': error.field == 'first_name'}">
<label class="control-label" for="first_name" ng-if="error.field == 'first_name'">Incorrect first name</label>
<input my-focused class="form-control" name="first_name" ng-model="credentials.first_name" placeholder="First name" autocomplete="off" required>
<label class="control-label" for="first_name" ng-if="error.field == 'first_name'" my-i18n="login_incorrect_first_name"></label>
<input my-focused class="form-control" name="first_name" ng-model="credentials.first_name" placeholder="{{'login_first_name' | i18n}}" autocomplete="off" required>
</div>
<div class="form-group" ng-class="{'has-error': error.field == 'last_name'}">
<label class="control-label" for="last_name" ng-if="error.field == 'last_name'">Incorrect last name</label>
<input class="form-control" name="last_name" ng-model="credentials.last_name" placeholder="Last name" autocomplete="off">
<label class="control-label" for="last_name" ng-if="error.field == 'last_name'" my-i18n="login_incorrect_last_name"></label>
<input class="form-control" name="last_name" ng-model="credentials.last_name" placeholder="{{'login_last_name' | i18n}}" autocomplete="off">
</div>
<button class="btn btn-primary btn-block" ng-class="{disabled: progress.enabled}" ng-disabled="progress.enabled" type="submit" ng-switch="progress.enabled">
<span ng-switch-when="true">Signing up<span my-loading-dots></span></span>
<span ng-switch-default>Sign up</span>
<span ng-switch-when="true"><my-i18n msgid="login_signing_up"></my-i18n><span my-loading-dots></span></span>
<span ng-switch-default my-i18n="login_sign_up"></span>
</button>
</form>
</div>
<!-- <div my-lang-footer></div> -->

8
app/partials/mobile/message_attach_document.html

@ -25,8 +25,12 @@ @@ -25,8 +25,12 @@
<span class="im_message_document_size" ng-if="!historyMessage.media.document.progress.enabled" ng-bind="::historyMessage.media.document.size | formatSize"></span>
<span class="im_message_document_size" ng-if="historyMessage.media.document.progress.enabled" ng-bind="historyMessage.media.document.progress | formatSizeProgress"></span>
</div>
<div class="im_message_document_actions" ng-if="!historyMessage.media.document.progress.enabled">
<a href="" ng-click="downloadDoc(historyMessage.media.document.id)" my-i18n="message_attach_document_download"></a>
<a href="" ng-click="downloadDoc(historyMessage.media.document.id, 1)" ng-if="::historyMessage.media.document.withPreview" my-i18n="message_attach_document_open"></a>
</div>
<div class="clearfix cancelable_progress_wrap" ng-if="historyMessage.media.document.progress.enabled">
<a class="im_message_media_progress_cancel pull-right" ng-click="historyMessage.media.document.progress.cancel()">Cancel</a>
<a class="im_message_media_progress_cancel pull-right" ng-click="historyMessage.media.document.progress.cancel()" my-i18n="modal_cancel"></a>
<div class="im_message_download_progress_wrap">
<div class="progress tg_down_progress">
<div class="progress-bar progress-bar-success" ng-style="{width: historyMessage.media.document.progress.percent + '%'}"></div>
@ -36,4 +40,4 @@ @@ -36,4 +40,4 @@
</div>
</div>
</div>
</div>

4
app/partials/mobile/message_attach_pending.html

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
<span class="im_message_document_size" ng-if="historyMessage.media.progress" ng-bind="historyMessage.media.progress | formatSizeProgress"></span>
</div>
<div class="clearfix cancelable_progress_wrap">
<a class="im_message_media_progress_cancel pull-right" ng-click="historyMessage.media.progress.cancel()">Cancel</a>
<a class="im_message_media_progress_cancel pull-right" ng-click="historyMessage.media.progress.cancel()" my-i18n="modal_cancel"></a>
<div class="im_message_download_progress_wrap">
<div class="progress tg_down_progress">
<div class="progress-bar progress-bar-success" role="progressbar" ng-style="{width: historyMessage.media.progress.percent + '%'}"></div>
@ -14,4 +14,4 @@ @@ -14,4 +14,4 @@
</div>
</div>
</div>
</div>
</div>

39
app/partials/mobile/message_service.html

@ -1,32 +1,23 @@ @@ -1,32 +1,23 @@
<span ng-switch="::historyMessage.action._">
<span ng-switch-when="messageActionChatCreate">
created the group &laquo;<strong ng-bind-html="::historyMessage.action.rTitle"></strong>&raquo;
</span>
<span ng-switch-when="messageActionChatEditTitle">
changed group name to &laquo;<strong ng-bind-html="::historyMessage.action.rTitle"></strong>&raquo;
</span>
<span ng-switch-when="messageActionChatEditPhoto">
changed group photo
</span>
<span ng-switch-when="messageActionChatDeletePhoto">
removed group photo
</span>
<my-i18n>
<span ng-switch-when="messageActionChatCreate" my-i18n-format="message_service_created_group"></span>
<span ng-switch-when="messageActionChatEditTitle" my-i18n-format="message_service_changed_group_name"></span>
<my-i18n-param name="group-name">&laquo;<strong ng-bind-html="::historyMessage.action.rTitle"></strong>&raquo;</my-i18n-param>
</my-i18n>
<span ng-switch-when="messageActionChatEditPhoto" my-i18n="message_service_changed_group_photo"></span>
<span ng-switch-when="messageActionChatDeletePhoto" my-i18n="message_service_removed_group_photo"></span>
<span ng-switch-when="messageActionChatAddUser" ng-switch="::historyMessage.from_id != historyMessage.action.user_id">
<span ng-switch-when="true">
invited <a my-user-link="historyMessage.action.user_id" color="true"></a>
</span>
<span ng-switch-default>
returned to group
<span ng-switch-when="true" my-i18n="message_service_invited_user">
<my-i18n-param name="user"><a my-user-link="historyMessage.action.user_id" color="true"></a></my-i18n-param>
</span>
<span ng-switch-default my-i18n="message_service_returned_to_group"></span>
</span>
<span ng-switch-when="messageActionChatDeleteUser" ng-switch="::historyMessage.from_id != historyMessage.action.user_id">
<span ng-switch-when="true">
kicked <a my-user-link="historyMessage.action.user_id" color="true"></a>
</span>
<span ng-switch-default>
left group
<span ng-switch-when="true" my-i18n="message_service_kicked_user">
<my-i18n-param name="user"><a my-user-link="historyMessage.action.user_id" color="true"></a></my-i18n-param>
</span>
<span ng-switch-default my-i18n="message_service_left_group"></span>
</span>
<span ng-switch-default ng-bind="'Unsupported action ' + historyMessage.action._"></span>
</span>
<span ng-switch-default ng-bind="'message_service_unsupported_action' | i18n:historyMessage.action._"></span>
</span>

8
app/partials/mobile/photo_modal.html

@ -6,9 +6,9 @@ @@ -6,9 +6,9 @@
<div class="media_meta_wrap clearfix">
<div class="media_modal_actions pull-right">
<a href="" class="media_modal_action_link" ng-click="download()">Download</a>
<a href="" class="media_modal_action_link" ng-if="canForward" ng-click="forward()">Forward</a>
<a href="" class="media_modal_action_link" ng-if="canDelete" ng-click="delete()">Delete</a>
<a href="" class="media_modal_action_link" ng-click="download()" my-i18n="media_modal_download"></a>
<a href="" class="media_modal_action_link" ng-if="canForward" ng-click="forward()" my-i18n="media_modal_forward"></a>
<a href="" class="media_modal_action_link" ng-if="canDelete" ng-click="delete()" my-i18n="media_modal_delete"></a>
</div>
<p class="media_modal_info">
@ -19,4 +19,4 @@ @@ -19,4 +19,4 @@
</div>
</div>
</div>

10
app/partials/mobile/profile_edit_modal.html

@ -8,15 +8,13 @@ @@ -8,15 +8,13 @@
<ul class="nav navbar-nav navbar-quick-nav">
<li class="navbar-quick-right">
<a ng-class="{disabled: profile.updating}" ng-click="updateProfile()" ng-bind="profile.updating ? 'Saving...' : 'Save'" ng-disabled="profile.updating"></a>
<a ng-class="{disabled: profile.updating}" ng-click="updateProfile()" ng-bind="profile.updating ? 'profile_edit_submit_active' : 'profile_edit_submit' | i18n" ng-disabled="profile.updating"></a>
</li>
<li>
<a ng-click="$dismiss()" class="navbar-quick-media-back">
<i class="icon icon-back"></i>
<div class="navbar-quick-back-title">
<h4>
Edit Profile
</h4>
<h4 my-i18n="profile_edit_modal_title"></h4>
</div>
</a>
</li>
@ -33,10 +31,10 @@ @@ -33,10 +31,10 @@
<form class="modal_simple_form" ng-submit="updateProfile()" my-vertical-position="0.3">
<div class="form-group" ng-class="{'has-error': error.field == 'first_name'}">
<input class="form-control input-lg" my-focused type="text" placeholder="First name" ng-model="profile.first_name" name="first_name"/>
<input class="form-control input-lg" my-focused type="text" placeholder="{{'profile_edit_first_name' | i18n}}" ng-model="profile.first_name" name="first_name"/>
</div>
<div class="form-group" ng-class="{'has-error': error.field == 'last_name'}">
<input class="form-control input-lg" type="text" placeholder="Last name" ng-model="profile.last_name"/>
<input class="form-control input-lg" type="text" placeholder="{{'profile_edit_last_name' | i18n}}" ng-model="profile.last_name"/>
</div>
</form>

8
app/partials/mobile/video_modal.html

@ -6,9 +6,9 @@ @@ -6,9 +6,9 @@
<div class="media_meta_wrap clearfix">
<div class="media_modal_actions pull-right">
<a href="" class="media_modal_action_link" ng-click="download()">Download</a>
<a ng-if="messageID" href="" class="media_modal_action_link" ng-click="forward()">Forward</a>
<a ng-if="messageID" href="" class="media_modal_action_link" ng-click="delete()">Delete</a>
<a href="" class="media_modal_action_link" ng-click="download()" my-i18n="media_modal_download"></a>
<a ng-if="messageID" href="" class="media_modal_action_link" ng-click="forward()" my-i18n="media_modal_forward"></a>
<a ng-if="messageID" href="" class="media_modal_action_link" ng-click="delete()" my-i18n="media_modal_delete"></a>
</div>
<p class="media_modal_info">
@ -18,4 +18,4 @@ @@ -18,4 +18,4 @@
</div>
</div>
</div>

20
app/partials/mobile/welcome.html

@ -5,14 +5,14 @@ @@ -5,14 +5,14 @@
<div class="welcome_form">
<div class="welcome_logo"></div>
<h3 class="welcome_header"><strong>Telegram</strong> Web</h3>
<h3 class="welcome_header" my-i18n="welcome_header_md"></h3>
<div class="welcome_text">
<p>This is an unofficial web-client for the <strong>Telegram Messenger</strong>.</p>
<p>It's still an <strong>alpha-version</strong> and may not be 200% reliable</p>
<p my-i18n="welcome_text_1_md"></p>
<p my-i18n="welcome_text_2_md"></p>
</div>
<div class="welcome_btn_wrap">
<a href="#/login" class="btn btn-primary btn-block">Start Messaging</a>
<a href="#/login" class="btn btn-primary btn-block" my-i18n="welcome_start_messaging"></a>
</div>
</div>
@ -24,24 +24,24 @@ @@ -24,24 +24,24 @@
<div class="col-md-4 col-sm-4">
<div class="welcome_footer_card_wrap row">
<div class="welcome_footer_card welcome_footer_card_messaging"></div>
<h4>Fast messaging</h4>
<div class="welcome_footer_card_lead">Send messages with rich emoji support right from your desktop or laptop computer</div>
<h4 my-i18n="welcome_fast_messaging_header"></h4>
<div class="welcome_footer_card_lead" my-i18n="welcome_fast_messaging_text"></div>
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="welcome_footer_card_wrap">
<div class="welcome_footer_card welcome_footer_card_filesharing"></div>
<h4>Easy file sharing</h4>
<div class="welcome_footer_card_lead">Share files of any type using drag-and-drop or the attachment icon</div>
<h4 my-i18n="welcome_easy_sharing_header"></h4>
<div class="welcome_footer_card_lead" my-i18n="welcome_easy_sharing_text"></div>
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="welcome_footer_card_wrap">
<div class="welcome_footer_card welcome_footer_card_powerful"></div>
<h4>Powerful tools</h4>
<div class="welcome_footer_card_lead">Browse shared media and files by type <br/> and set custom notifications</div>
<h4 my-i18n="welcome_powerful_tools_header"></h4>
<div class="welcome_footer_card_lead" my-i18n="welcome_powerful_tools_text_md"></div>
</div>
</div>

Loading…
Cancel
Save