Changelog updated
Wrap register protocol in try catch
Fixed mentions in the end of sentence
This commit is contained in:
Igor Zhukov 2014-12-16 14:09:03 -08:00
parent c08a227f60
commit 449030d08b
6 changed files with 9 additions and 15 deletions

View File

@ -3233,7 +3233,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
"\\uffa1-\\uffdc"; // half width Hangul (Korean) "\\uffa1-\\uffdc"; // half width Hangul (Korean)
var regexAlphaNumericChars = "0-9\.\_" + regexAlphaChars; var regexAlphaNumericChars = "0-9\.\_" + regexAlphaChars;
var regExp = new RegExp('(^|\\s)((?:https?://)?telegram\\.me/|@)([a-zA-Z\\d_\\.]{5,32})|((?:(ftp|https?)://|(?:mailto:)?([A-Za-z0-9._%+-]+@))(\\S*\\.\\S*[^\\s.;,(){}<>"\']))|(\\n)|(' + emojiUtf.join('|') + ')|(^|\\s)(#[' + regexAlphaNumericChars + ']{2,20})', 'i'); var regExp = new RegExp('(^|\\s)((?:https?://)?telegram\\.me/|@)([a-zA-Z\\d_]{5,32})|((?:(ftp|https?)://|(?:mailto:)?([A-Za-z0-9._%+-]+@))(\\S*\\.\\S*[^\\s.;,(){}<>"\']))|(\\n)|(' + emojiUtf.join('|') + ')|(^|\\s)(#[' + regexAlphaNumericChars + ']{2,20})', 'i');
var youtubeRegex = /(?:https?:\/\/)?(?:www\.)?youtu(?:|\.be|be\.com|\.b)(?:\/v\/|\/watch\\?v=|e\/|(?:\/\??#)?\/watch(?:.+)v=)(.{11})(?:\&[^\s]*)?/; var youtubeRegex = /(?:https?:\/\/)?(?:www\.)?youtu(?:|\.be|be\.com|\.b)(?:\/v\/|\/watch\\?v=|e\/|(?:\/\??#)?\/watch(?:.+)v=)(.{11})(?:\&[^\s]*)?/;
var vimeoRegex = /(?:https?:\/\/)?(?:www\.)?vimeo\.com\/(\d+)/; var vimeoRegex = /(?:https?:\/\/)?(?:www\.)?vimeo\.com\/(\d+)/;
@ -4182,8 +4182,8 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
started = true; started = true;
try { try {
navigator.registerProtocolHandler('tg', '#im?tgaddr=%s', 'Telegram Web'); navigator.registerProtocolHandler('tg', '#im?tgaddr=%s', 'Telegram Web');
} catch (e) {}
navigator.registerProtocolHandler('web+tg', '#im?tgaddr=%s', 'Telegram Web'); navigator.registerProtocolHandler('web+tg', '#im?tgaddr=%s', 'Telegram Web');
} catch (e) {}
$rootScope.$on('$routeUpdate', checkTgAddr); $rootScope.$on('$routeUpdate', checkTgAddr);
checkTgAddr(); checkTgAddr();

View File

@ -35,7 +35,8 @@
<div class="md_modal_section_version">0.3.8</div> <div class="md_modal_section_version">0.3.8</div>
<div class="md_modal_section_description changelog_version_changes"> <div class="md_modal_section_description changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list"> <ul class="list-unstyled changelog_version_changes_list">
<li>Telegram.me/username links supported</li> <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> </ul>
</div> </div>
</div> </div>

View File

@ -52,7 +52,7 @@
<div class="form-group" ng-class="{'has-error': error.field == 'phone_code'}"> <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'" my-i18n="login_incorrect_sms_code"></label> <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> <input type="tel" 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> </div>
<button class="btn btn-primary btn-block" type="submit" ng-class="{disabled: progress.enabled}" ng-disabled="progress.enabled" ng-switch="progress.enabled"> <button class="btn btn-primary btn-block" type="submit" ng-class="{disabled: progress.enabled}" ng-disabled="progress.enabled" ng-switch="progress.enabled">

View File

@ -19,14 +19,6 @@
<div class="changelog_versions_wrap"> <div class="changelog_versions_wrap">
<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">
</ul>
</div>
</div>
<div class="modal_section changelog_version_wrap"> <div class="modal_section changelog_version_wrap">
<h3 class="modal_section_header changelog_version_title"> <h3 class="modal_section_header changelog_version_title">
Version 0.3.8 Version 0.3.8
@ -34,7 +26,8 @@
</h3> </h3>
<div class="modal_section_body changelog_version_changes"> <div class="modal_section_body changelog_version_changes">
<ul class="list-unstyled changelog_version_changes_list"> <ul class="list-unstyled changelog_version_changes_list">
<li>Telegram.me/username links supported</li> <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> </ul>
</div> </div>
</div> </div>

View File

@ -52,7 +52,7 @@
<div class="form-group" ng-class="{'has-error': error.field == 'phone_code'}"> <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'" my-i18n="login_incorrect_sms_code"></label> <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> <input type="tel" 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> </div>
<button class="btn btn-primary btn-block" type="submit" ng-class="{disabled: progress.enabled}" ng-disabled="progress.enabled" ng-switch="progress.enabled"> <button class="btn btn-primary btn-block" type="submit" ng-class="{disabled: progress.enabled}" ng-disabled="progress.enabled" ng-switch="progress.enabled">

View File

@ -37,7 +37,7 @@
"gulp-angular-templatecache": "^1.1.0", "gulp-angular-templatecache": "^1.1.0",
"gulp-load-plugins": "^0.4.0", "gulp-load-plugins": "^0.4.0",
"gulp-usemin": "^0.3.8", "gulp-usemin": "^0.3.8",
"gulp-uglify": "^1.0.1", "gulp-uglify": "^1.0.2",
"gulp-rev": "^1.1.0", "gulp-rev": "^1.1.0",
"gulp-minify-css": "^0.3.0", "gulp-minify-css": "^0.3.0",
"gulp-minify-html": "^0.1.1", "gulp-minify-html": "^0.1.1",