Browse Source

Supported service notifications

master
Igor Zhukov 7 years ago
parent
commit
53aad40a14
  1. 4
      app/js/controllers.js
  2. 4
      app/js/lib/mtproto_wrapper.js
  3. 3
      app/js/locales/en-us.json
  4. 101
      app/js/messages_manager.js
  5. 23
      app/js/services.js
  6. 339
      app/partials/desktop/changelog_modal.html
  7. 7
      app/partials/desktop/error_modal.html
  8. 130
      app/partials/mobile/channel_modal.html
  9. 2
      app/partials/mobile/settings_modal.html

4
app/js/controllers.js

@ -2150,8 +2150,8 @@ angular.module('myApp.controllers', ['myApp.i18n']) @@ -2150,8 +2150,8 @@ angular.module('myApp.controllers', ['myApp.i18n'])
var lastIsRead = !historyMessage || !historyMessage.pFlags.unread
for (i = 0; i < len; i++) {
messageID = msgs[i]
if (messageID < maxID ||
history.ids.indexOf(messageID) !== -1) {
if (messageID > 0 && messageID < maxID ||
history.ids.indexOf(messageID) !== -1) {
continue
}
historyMessage = AppMessagesManager.wrapForHistory(messageID)

4
app/js/lib/mtproto_wrapper.js

@ -157,6 +157,10 @@ angular.module('izhukov.mtproto.wrapper', ['izhukov.utils', 'izhukov.mtproto']) @@ -157,6 +157,10 @@ angular.module('izhukov.mtproto.wrapper', ['izhukov.utils', 'izhukov.mtproto'])
}
deferred.reject(error)
if (error.code == 406) {
error.handled = true
}
if (!options.noErrorBox) {
error.input = method
error.stack = stack || (error.originalError && error.originalError.stack) || error.stack || (new Error()).stack

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

@ -187,6 +187,8 @@ @@ -187,6 +187,8 @@
"changelog_modal_header_recent_updates_md": "Recent updates in **Telegram Web**",
"changelog_modal_header_new_updates_md": "**Telegram Web** has been updated!",
"changelog_modal_title_current_version": "current version",
"changelog_modal_full_description_md": "Official free messaging app based on Telegram API for speed and security.\n\nThis software is licensed under GNU GPL version 3.",
"changelog_modal_changelog_link": "Changelog",
"group_create_contacts_modal_title": "New group",
"group_create_modal_title": "Create group",
@ -419,7 +421,6 @@ @@ -419,7 +421,6 @@
"error_modal_media_not_supported_description": "Your browser cannot play this media file. Try downloading the file and opening it in a standalone player.",
"error_modal_username_not_found_description": "There is no Telegram account with the username you provided.",
"error_modal_phonecalls_not_supported_description_md": "Unfortunately calls are not supported in the Web App at the moment.\n\nYou can call {user} using our mobile apps or native desktop applications.\n{download-link: Download »}",
"error_modal_fresh_reset_authorization_forbidden": "For security reasons, you can't terminate older sessions from a device that you've just connected. Please use an earlier connection or wait for a few hours",
"error_modal_app_signup_forbidden_md": "You don't have a Telegram account yet, please **sign up** with {signup-link: Android / iPhone} first.",
"error_modal_bad_request_description": "One of the params is missing or invalid.",

101
app/js/messages_manager.js

@ -18,6 +18,7 @@ angular.module('myApp.services') @@ -18,6 +18,7 @@ angular.module('myApp.services')
var pendingByRandomID = {}
var pendingByMessageID = {}
var pendingAfterMsgs = {}
var pendingTopMsgs = {}
var sendFilePromise = $q.when()
var tempID = -1
@ -181,7 +182,11 @@ angular.module('myApp.services') @@ -181,7 +182,11 @@ angular.module('myApp.services')
if (historiesStorage[peerID] === undefined &&
!message.deleted) {
var historyStorage = {count: null, history: [mid], pending: []}
var historyStorage = {count: null, history: [], pending: []}
historyStorage[mid > 0 ? 'history' : 'pending'].push(mid)
if (mid < 0 && message.pFlags.unread) {
dialog.unread_count++
}
historiesStorage[peerID] = historyStorage
if (mergeReplyKeyboard(historyStorage, message)) {
$rootScope.$broadcast('history_reply_markup', {peerID: peerID})
@ -526,6 +531,9 @@ angular.module('myApp.services') @@ -526,6 +531,9 @@ angular.module('myApp.services')
historyStorage = historiesStorage[peerID] = {count: null, history: [], pending: []}
}
if (maxID < 0) {
maxID = 0
}
var isMigrated = false
var reqPeerID = peerID
if (migratedToFrom[peerID]) {
@ -3007,29 +3015,30 @@ angular.module('myApp.services') @@ -3007,29 +3015,30 @@ angular.module('myApp.services')
saveMessages([message], {isNew: true})
// console.warn(dT(), 'message unread', message.mid, message.pFlags.unread)
if (historyStorage !== undefined) {
var history = historyStorage.history
if (history.indexOf(message.mid) != -1) {
return false
}
var topMsgID = history[0]
history.unshift(message.mid)
if (message.mid > 0 && message.mid < topMsgID) {
history.sort(function (a, b) {
return b - a
})
}
if (historyStorage.count !== null) {
historyStorage.count++
}
} else {
historyStorage = historiesStorage[peerID] = {
if (historyStorage === undefined) {
historyStorage = historiesStorage[peerID] = {
count: null,
history: [message.mid],
history: [],
pending: []
}
}
var history = message.mid > 0 ? historyStorage.history : historyStorage.pending
if (history.indexOf(message.mid) != -1) {
return false
}
var topMsgID = history[0]
history.unshift(message.mid)
if (message.mid > 0 && message.mid < topMsgID) {
history.sort(function (a, b) {
return b - a
})
}
if (message.mid > 0 &&
historyStorage.count !== null) {
historyStorage.count++
}
if (mergeReplyKeyboard(historyStorage, message)) {
$rootScope.$broadcast('history_reply_markup', {peerID: peerID})
}
@ -3466,6 +3475,49 @@ angular.module('myApp.services') @@ -3466,6 +3475,49 @@ angular.module('myApp.services')
})
}
break
case 'updateServiceNotification':
// update.inbox_date = tsNow(true)
// update.pFlags = {popup: true}
var fromID = 777000
var peerID = fromID
var messageID = tempID--
var message = {
_: 'message',
id: messageID,
from_id: fromID,
to_id: AppPeersManager.getOutputPeer(peerID),
flags: 0,
pFlags: {unread: true},
date: (update.inbox_date || tsNow(true)) + ServerTimeManager.serverTimeOffset,
message: update.message,
media: update.media,
entities: update.entities
}
if (!AppUsersManager.hasUser(fromID)) {
AppUsersManager.saveApiUsers([{
_: 'user',
id: fromID,
pFlags: {verified: true},
access_hash: 0,
first_name: 'Telegram',
phone: '42777'
}])
}
saveMessages([message])
if (update.inbox_date) {
pendingTopMsgs[peerID] = messageID
handleUpdate({
_: 'updateNewMessage',
message: message
})
}
if (update.pFlags.popup && update.message) {
var historyMessage = wrapForHistory(messageID)
ErrorService.show({error: {code: 400, type: 'UPDATE_SERVICE_NOTIFICATION'}, historyMessage: historyMessage})
}
break
}
}
@ -3493,11 +3545,18 @@ angular.module('myApp.services') @@ -3493,11 +3545,18 @@ angular.module('myApp.services')
var hasUpdated = false
angular.forEach(dialogsResult.dialogs, function (dialog) {
var peerID = AppPeersManager.getPeerID(dialog.peer)
if (dialog.top_message) {
var topMessage = dialog.top_message
var topPendingMesage = pendingTopMsgs[peerID]
if (topPendingMesage) {
if (!topMessage || getMessage(topPendingMesage).date > getMessage(topMessage).date) {
dialog.top_message = topMessage = topPendingMesage
}
}
if (topMessage) {
var wasBefore = getDialogByPeerID(peerID).length > 0
saveConversation(dialog)
if (wasBefore) {
clearDialogCache(dialog.top_message)
clearDialogCache(topMessage)
$rootScope.$broadcast('dialog_top', dialog)
} else {
updatedDialogs[peerID] = dialog

23
app/js/services.js

@ -4341,16 +4341,23 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) @@ -4341,16 +4341,23 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
}
})
.service('ChangelogNotifyService', function (Storage, $rootScope, $modal) {
.service('ChangelogNotifyService', function (Storage, $rootScope, $modal, $timeout, MtpApiManager, ApiUpdatesManager) {
function checkUpdate () {
Storage.get('last_version').then(function (lastVersion) {
if (lastVersion != Config.App.version) {
if (lastVersion) {
showChangelog(lastVersion)
$timeout(function () {
Storage.get('last_version').then(function (lastVersion) {
if (lastVersion != Config.App.version) {
MtpApiManager.invokeApi('help.getAppChangelog', {
prev_app_version: lastVersion
}).then(function (updates) {
if (updates._ == 'updates' && !updates.updates.length) {
return false
}
ApiUpdatesManager.processUpdateMessage(updates)
Storage.set({last_version: Config.App.version})
})
}
Storage.set({last_version: Config.App.version})
}
})
})
}, 5000)
}
function showChangelog (lastVersion) {

339
app/partials/desktop/changelog_modal.html

@ -31,341 +31,8 @@ @@ -31,341 +31,8 @@
<div class="md_modal_sections">
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.5.6')">
<div class="md_modal_section_version">0.5.6</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>Edit the text of your messages after sending them. This works across all Telegram chats, including groups and one-on-one conversations. Select a message and click 'Edit' or just press the up arrow button to edit your last message.</li>
<li>Unsend Messages: retract any messages within 48 hours of sending them. Check out the <a href="https://telegram.org/blog/unsend-and-usage" target="_blank">Telegram Blog</a> for more info.</li>
<li>Pinned chats. Check out the <a href="https://telegram.org/blog/pin-and-ifttt" target="_blank">Telegram Blog</a> for more info.</li>
<li>Sticker suggestions by emoji.</li>
<li>Search for messages in specific chats.</li>
<li>Background notifications in Chrome and Firefox (can be disabled in Settings)</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.5.5')">
<div class="md_modal_section_version">0.5.5</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>Introducing Drafts: Seamless syncing for unsent messages on all your devices. Drafts are now visible in your chats list.</li>
<li>Mention people in groups by typing @ and selecting them from the list — even if they don't have a username.</li>
<li>Share links to specific posts in channels via quick forwarding menu (click on the date in a message to try this out).</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.5.4')">
<div class="md_modal_section_version">0.5.4</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>Introducing Bot API 2.0, the biggest update to our bot platform since June 2015.</li>
<li>New inline keyboards with callback, 'open URL' or 'switch to inline mode' buttons help create seamless interfaces.</li>
<li>Bots can now update existing messages on the fly as you interact with them.</li>
<li>Prepare for the rise of location-based bots: all bots can now ask users to share their location.</li>
<li>Inline bots can now send all attachments supported in Telegram (videos, music, stickers, files, etc.).</li>
<li>Try out these sample bots to see what's coming your way soon: @music, @sticker, @youtube, @foursquare</li>
<li>Check out the <a href="https://telegram.org/blog/bots-2-0" target="_blank">Telegram Blog</a> for more info.</li>
<li>New quick forwarding in channels (click on the date in a message to try this out).</li>
<li>Improved performance.</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.5.3')">
<div class="md_modal_section_version">0.5.3</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>Inline bots: A new way to add bot content to any chat. Type a bot's username and your query in the text field to get instant results and send them to your chat partner. Try typing <code>@gif dog</code> in your next chat. Sample bots: @gif, @wiki, @bing, @vid, @bold.</li>
<li>Check out the <a href="https://telegram.org/blog/inline-bots" target="_blank">Telegram Blog</a> for more info.</li>
<li>Improved GIFs: 20x faster sending and downloading, nice animated progress</li>
<li>Click on message date to reply (or to forward from channels).</li>
<li>Preview images before sending when pasting from clipboard.</li>
<li>Improved formatting for copy-pasted history fragments (date, time and sender names inserted automatically).</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.5.2')">
<div class="md_modal_section_version">0.5.2</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>Unread counters for muted chats now colored in gray.</li>
<li>Improved previews for sticker sets: Click on a sticker to view the whole set, click on stickers in a set to send right away, added a 'Share' button.</li>
<li>Improved performance.</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.5.1')">
<div class="md_modal_section_version">0.5.1</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>Groups that have reached their capacity of 200 users can be upgraded to supergroups of up to 1,000 members.</li>
<li>Check out the <a href="https://telegram.org/blog/supergroups" target="_blank">Telegram Blog</a> for more info</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.5.0')">
<div class="md_modal_section_version">0.5.0</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>Removed annoying "multiple tabs open" error.</li>
<li>Improved message forwarding.</li>
<li>Added view counter to messages from channels.</li>
<li>Improved image loading in Safari and Firefox.</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.4.9')">
<div class="md_modal_section_version">0.4.9</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>New emoji and sticker menu, tabs for sticker packs.</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.4.8')">
<div class="md_modal_section_version">0.4.8</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>Introducing Channels – a great new way to broadcast your messages to unlimited audiences.</li>
<li>Check out the <a href="https://telegram.org/blog/channels" target="_blank">Telegram Blog</a> for more info</li>
<li>Improved performance in Safari on OS X El Capitan.</li>
<li>Added formatting for fixed-width code, surround text with `single backticks` for inline text and ```triple backticks``` for blocks of pre-formatted text.</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.4.7')">
<div class="md_modal_section_version">0.4.7</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>New bot API, free for everyone. If you're an engineer, create your own bots for games, services or integrations.
</li>
<li>Check out <a href="https://telegram.org/blog/bot-revolution" target="_blank">Telegram Blog</a> for more info</li>
<li>Improved Stickers support: now stickers are loading much faster.</li>
<li>Click on any custom stickers in chats to view and add sticker sets.</li>
<li>[Mobile] Reply to a message easily: tap on any message and select "Reply".</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.4.6')">
<div class="md_modal_section_version">0.4.6</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>Install and share custom sticker sets like this one: <a href="tg://addstickers?set=Animals">telegram.me/addstickers/Animals</a></li>
<li>If you're an artist, create custom sticker sets using our <a href="tg://resolve?domain=stickers">@Stickers</a> bot.</li>
<li>Check out <a href="https://telegram.org/blog/stickers-revolution" target="_blank">Telegram Blog</a> for more info</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.4.5')">
<div class="md_modal_section_version">0.4.5</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>
Invite links for group chats:<br/>
Check out <a href="https://telegram.org/blog/invite-links" target="_blank">Telegram Blog</a> for more info
</li>
<li>Smart notifications</li>
<li>'Listened' status for voice messages</li>
<li>Places in locations (venues, landmarks)</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.4.4')">
<div class="md_modal_section_version">0.4.4</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>Link Previews:<br/>
Get rich link summaries for tweets, YouTube videos, Instagram photos and other content.</li>
<li>Check out <a href="https://telegram.org/blog/link-preview" target="_blank">Telegram Blog</a> for more info.</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.4.3')">
<div class="md_modal_section_version">0.4.3</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>Sessions List:<br/>
View your active Telegram sessions (on desktop, tablet and mobile devices) and close specific sessions remotely.</li>
<li>Two-step verification:<br/>
Set up an additional password that will be required to log into your Telegram account.</li>
<li>Check out <a href="https://telegram.org/blog/sessions-and-2-step-verification" target="_blank">Telegram Blog</a> for more info.</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.4.2')">
<div class="md_modal_section_version">0.4.2</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>Optimization for screens with smaller Y-resolutions.</li>
<li>Supported Spotify URL embeds.</li>
<li>Mentions of the current user in group chats are now highlighted.</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.4.1')">
<div class="md_modal_section_version">0.4.1</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>Reply to specific messages in groups.</li>
<li>Mention @usernames in groups to notify multiple users.</li>
<li>Revised notifications in groups: mentioned users and people you reply to will be notified (private chat notification settings apply in this case instead of group settings). Check out <a href="https://telegram.org/blog/replies-mentions-hashtags" target="_blank">Telegram Blog</a> for more info.</li>
<li>Setting to disable message preview</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.4.0')">
<div class="md_modal_section_version">0.4.0</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>Full stickers support</li>
<li>Multisearch box: instantly find chats, usernames and messages</li>
<li>Emoji autocomplete: e.g., type <strong>:kiss</strong> in the message field to see the list. <a href="http://www.emoji-cheat-sheet.com/" target="_blank">Full cheat sheet &raquo;</a></li>
<li>Added 'typing' notification in chats list</li>
<li>Online members counter in group headers</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.3.9')">
<div class="md_modal_section_version">0.3.9</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>[Desktop] Material design completed</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.3.8')">
<div class="md_modal_section_version">0.3.8</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>Telegram.me links open right in Telegram Web when authorized</li>
<li>@username mentions in messages are clickable and open a conversation with the user</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.3.7')">
<div class="md_modal_section_version">0.3.7</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>[Desktop] New material design for modal windows</li>
<li>[Desktop] Forward messages to multiple recipients</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.3.6')">
<div class="md_modal_section_version">0.3.6</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>New viewer for photos, videos, documents.</li>
<li>[FirefoxOS] Improved media downloads.</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.3.5')">
<div class="md_modal_section_version">0.3.5</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>Added embedded Soundcloud tracks and playlists.</li>
<li>Added global user search to contacts list.</li>
<li>Added switch to mobile version on window resize.</li>
<li>Migrate to HTTPS notification</li>
<li>Bugfixes.</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.3.4')">
<div class="md_modal_section_version">0.3.4</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>Added embedded Facebook posts and Vimeo videos.</li>
<li>Improved IE10+ support: downloading files and style fixes.</li>
<li>Added unsupported media playback warning.</li>
<li>Bugfixes.</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.3.3')">
<div class="md_modal_section_version">0.3.3</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>Added Native Client module: dramatically improved encryption speed; Download and upload speed is now as high as in native applications.</li>
<li>HTTPS. We recommend you to use <a href="https://web.telegram.org" target="_blank">https://web.telegram.org</a>.</li>
<li>Added multiple open tabs warning. Please note, that only one tab with Telegram Web will work.</li>
<li>Added embedded Instagram, Twitter, Vine, YouTube links.</li>
<li>Jump to selected spot when playing back audio.</li>
<li>Bugfixes</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.3.2')">
<div class="md_modal_section_version">0.3.2</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>Usernames support: <a href="" ng-click="changeUsername()">Choose a username right now!</a></li>
<li>Search can now find public users by username.</li>
<li>Most popular emoticons shown in 'recent' when empty</li>
<li>[ChromeApp] Added saving window position and size</li>
<li>Bugfixes</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.3.1')">
<div class="md_modal_section_version">0.3.1</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>New languages: Spanish, German and Italian are now available </li>
<li>New custom-made audio player</li>
<li>Bad browser page for IE 6-9</li>
<li>Perfomance improvements and bugfixes</li>
</ul>
</div>
</div>
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.3.0')">
<div class="md_modal_section_version">0.3.0</div>
<div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list">
<li>Log in codes may be received in other Telegram apps</li>
<li>Partner's online status updates automatically</li>
<li>Added support for non-english hashtags in messages</li>
<li>Fixed invalid scrollbar width bug</li>
<li>[Desktop] Added automatic country code detection</li>
<li>[FirefoxOS] Improved PUSH-notifications for &lt;= 1.1</li>
<li>[FirefoxOS] Fixed emoji in notifications</li>
<li>[FirefoxOS] Fixed attachment bug for &lt;= 1.1</li>
<li>[FirefoxOS] Added phonebook permissions handling</li>
<li>[FirefoxOS] Added ability to share Gallery photos in Telegram</li>
</ul>
</div>
<div class="md_modal_versioned_section_wrap">
<div class="md_modal_section_description changelog_version_changes" my-i18n="changelog_modal_full_description_md"></div>
</div>
</div>
@ -373,7 +40,7 @@ @@ -373,7 +40,7 @@
<div class="changelog_footer_wrap clearfix">
<a class="changelog_github_link" href="https://github.com/zhukov/webogram" target="_blank">GitHub</a>
<a ng-show="changelogHidden" class="changelog_more_link" href="" ng-click="showAllVersions()">View Previous Updates</a>
<a class="changelog_more_link" href="https://github.com/zhukov/webogram/blob/master/CHANGELOG.md" target="_blank" my-i18n="changelog_modal_changelog_link"></a>
</div>
</div>

7
app/partials/desktop/error_modal.html

@ -65,7 +65,12 @@ @@ -65,7 +65,12 @@
<span ng-switch-when="CALLBACK_RESPONSE" ng-bind-html="error.description_html"></span>
<span ng-switch-when="FRESH_RESET_AUTHORISATION_FORBIDDEN" my-i18n="error_modal_fresh_reset_authorization_forbidden"></span>
<span ng-switch-when="UPDATE_SERVICE_NOTIFICATION">
<div my-message-body="historyMessage">
<div class="im_message_text" dir="auto"></div>
<div class="im_message_media"></div>
</div>
</span>

130
app/partials/mobile/channel_modal.html

@ -1,130 +0,0 @@ @@ -1,130 +0,0 @@
<div class="chat_modal_wrap">
<div class="tg_page_head tg_modal_head">
<div class="navbar navbar-static-top navbar-inverse">
<div class="container">
<div class="navbar-toggle-wrap dropdown" dropdown ng-if="chatFull.chat.pFlags.creator || !chatFull.chat.pFlags.left && !chatFull.chat.pFlags.kicked">
<a class="dropdown-toggle navbar-toggle" dropdown-toggle>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<ul class="dropdown-menu">
<li ng-if="hasRights('edit_photo')">
<a ng-click="deletePhoto()" my-i18n="group_modal_menu_delete_photo"></a>
</li>
<li ng-if="hasRights('edit_title')">
<a ng-click="editChannel()" my-i18n="modal_edit"></a>
</li>
<li ng-if="chatFull.chat.pFlags.creator">
<a ng-click="deleteChannel()" my-i18n="channel_modal_delete_channel"></a>
</li>
<li ng-if="!chatFull.chat.pFlags.creator && !chatFull.chat.pFlags.left && !chatFull.chat.pFlags.kicked">
<a ng-click="leaveChannel()" my-i18n="group_modal_menu_leave"></a>
</li>
</ul>
</div>
<div class="navbar-header">
<ul class="nav navbar-nav navbar-quick-nav">
<li>
<a ng-click="$close()" class="navbar-quick-media-back">
<i class="icon icon-back"></i>
<div class="navbar-quick-back-title">
<h4 my-i18n="channel_modal_info"></h4>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="modal-body mobile_modal_body">
<div class="mobile_user_modal_photo_profile_wrap">
<a ng-click="openPhoto(chatFull.chat_photo.id, {p: -chatFull.chat.id})" class="mobile_user_modal_image_wrap pull-left" my-peer-photolink="::-chatFull.chat.id" img-class="mobile_user_modal_image mobile_chat_modal_image" no-open="true" watch="true" ng-class="{disabled: !chatFull.chat.photo.photo_small}" ng-disabled="!chatFull.chat.photo.photo_small"></a>
<div class="mobile_user_modal_info_wrap clearfix">
<h4 class="mobile_user_modal_header" my-peer-link="-chatFull.chat.id" verified="true"></h4>
<p class="mobile_user_modal_status" ng-if="chatFull.participants_count > 0">
<ng-pluralize count="chatFull.participants_count"
when="group_modal_pluralize_participants">
</ng-pluralize>
</p>
</div>
</div>
<div class="mobile_modal_section" ng-if="chatFull.rAbout">
<h4 class="mobile_modal_section_header" my-i18n="channel_modal_description"></h4>
<div class="mobile_modal_section_value" ng-bind-html="chatFull.rAbout"></div>
</div>
<div class="mobile_modal_section" ng-if="chatFull.chat.username || chatFull.chat.pFlags.creator">
<h4 class="mobile_modal_section_header" my-i18n="channel_modal_share_link"></h4>
<div class="mobile_modal_section_value" ng-switch="chatFull.chat.username.length > 0">
<a ng-switch-when="true" class="settings_modal_username_link" ng-click="shareLink($event)" ng-bind="'https://t.me/' + chatFull.chat.username" ng-href="https://t.me/{{chatFull.chat.username}}" target="_blank"></a>
<a ng-switch-default ng-click="shareLink($event)" ng-bind="chatFull.exported_invite.link" ng-href="{{chatFull.exported_invite.link}}" target="_blank"></a>
</div>
</div>
<div class="mobile_modal_action_wrap" ng-if="hasRights('invite')">
<a class="mobile_modal_action" ng-click="inviteToChannel()" my-i18n="channel_modal_add_member"></a>
</div>
<div class="mobile_modal_action_wrap" ng-if="chatFull.chat.pFlags.left">
<a class="mobile_modal_action" ng-click="joinChannel()" my-i18n="channel_modal_join"></a>
</div>
<div class="mobile_modal_action_wrap" ng-if="hasRights('edit_photo') &amp;&amp; !photo.updating">
<span class="mobile_modal_action mobile_modal_upload_action">
<input my-file-upload type="file" multiple="false" class="im_attach_input" size="120" multiple="false" accept="image/x-png, image/png, image/gif, image/jpeg" />
<my-i18n="group_modal_update_photo"></my-i18n>
</span>
</div>
<div class="mobile_modal_action_wrap" ng-if="photo.updating">
<span class="mobile_modal_action" my-i18n>
<my-i18n="group_modal_update_active"></my-i18n>
<span my-loading-dots></span>
</span>
</div>
<div class="mobile_modal_action_wrap">
<a class="mobile_modal_action tg_checkbox clearfix" ng-click="settings.notifications = !settings.notifications" ng-class="settings.notifications ? 'tg_checkbox_on' : ''">
<span class="icon icon-checkbox-outer"><i class="icon-checkbox-inner"></i></span>
<span class="tg_checkbox_label" my-i18n="group_modal_notifications"></span>
</a>
</div>
<div class="mobile_modal_section" ng-if="chatFull.participants.participants.length > 0">
<h4 class="mobile_modal_section_header" my-i18n="group_modal_members"></h4>
<div class="mobile_modal_section_body">
<div class="chat_modal_members_list">
<div class="chat_modal_participant_wrap clearfix" ng-repeat="participant in chatFull.participants.participants">
<a ng-if="participant.canKick" ng-click="kickFromChannel(participant.user_id)" class="chat_modal_participant_kick pull-right" my-i18n="group_modal_members_kick"></a>
<a ng-if="participant.canLeave" ng-click="leaveChannel()" class="chat_modal_participant_kick pull-right" my-i18n="group_modal_menu_leave"></a>
<a class="chat_modal_participant_photo pull-left" my-peer-photolink="participant.user_id" img-class="chat_modal_participant_photo" status="true"></a>
<div class="chat_modal_participant_name">
<a my-peer-link="participant.user_id"></a>
</div>
<div class="chat_modal_participant_status" my-user-status="::participant.user_id" bot-chat-privacy="true"></div>
</div>
</div>
</div>
</div>
</div>
</div>

2
app/partials/mobile/settings_modal.html

@ -158,7 +158,7 @@ @@ -158,7 +158,7 @@
<a href="https://twitter.com/telegram_web" target="_blank" title="{{'settings_modal_follow_us_twitter' | i18n}}" class="settings_external_service"><i class="icon icon-twitter"></i></a>
</div>
<p>
<a ng-click="openChangelog()" my-i18n="settings_modal_recent_updates">
<a href="https://github.com/zhukov/webogram/blob/master/CHANGELOG.md" target="_blank" my-i18n="settings_modal_recent_updates">
<my-i18n-param name="version" ng-bind="version"></my-i18n-param>
</a>
</p>

Loading…
Cancel
Save