Browse Source

Improved login page

Moved countries modal to material
Removed a lot of old omg
Removed welcome page, moved intro to login
master
Igor Zhukov 10 years ago
parent
commit
870d0e2673
  1. 64
      app/badbrowser.html
  2. 499
      app/css/app.css
  3. 8
      app/css/desktop.css
  4. 53
      app/css/mobile.css
  5. BIN
      app/img/T_LogoM.png
  6. BIN
      app/img/T_LogoM_1x.png
  7. BIN
      app/img/Telegram.png
  8. BIN
      app/img/Telegram_2x.png
  9. BIN
      app/img/WebIntro1.png
  10. BIN
      app/img/WebIntro1_1x.png
  11. BIN
      app/img/WebIntro2.png
  12. BIN
      app/img/WebIntro2_1x.png
  13. BIN
      app/img/WebIntro3.png
  14. BIN
      app/img/WebIntro3_1x.png
  15. BIN
      app/img/bg_tile.png
  16. BIN
      app/img/changelog/search.png
  17. BIN
      app/img/decentralization.png
  18. BIN
      app/img/logo_dogogram.png
  19. 10
      app/js/controllers.js
  20. 38
      app/js/directives.js
  21. 20
      app/js/locales/en-us.json
  22. 4
      app/partials/desktop/contacts_modal.html
  23. 22
      app/partials/desktop/country_select_modal.html
  24. 4
      app/partials/desktop/edit_contact_modal.html
  25. 10
      app/partials/desktop/head.html
  26. 4
      app/partials/desktop/im.html
  27. 6
      app/partials/desktop/import_contact_modal.html
  28. 179
      app/partials/desktop/login.html
  29. 4
      app/partials/desktop/peer_select.html
  30. 55
      app/partials/desktop/welcome.html
  31. 4
      app/partials/mobile/contacts_modal.html
  32. 4
      app/partials/mobile/country_select_modal.html
  33. 4
      app/partials/mobile/edit_contact_modal.html
  34. 13
      app/partials/mobile/head.html
  35. 4
      app/partials/mobile/im.html
  36. 8
      app/partials/mobile/import_contact_modal.html
  37. 185
      app/partials/mobile/login.html
  38. 4
      app/partials/mobile/peer_select.html
  39. 4
      app/partials/mobile/phonebook_modal.html
  40. 55
      app/partials/mobile/welcome.html

64
app/badbrowser.html

@ -16,35 +16,10 @@ @@ -16,35 +16,10 @@
</head>
<body class="non_osx is_1x">
<div class="tg_page_head" style="clear: both;">
<div class="navbar navbar-static-top navbar-inverse navbar_peer_not_selected" role="navigation">
<div class="container">
<div class="navbar-header pull-left">
<a class="navbar-brand" href="index.html"><span class="tg_head_logo"></span></a>
</div>
<div class="navbar-menu pull-right">
<ul class="nav navbar-nav navbar-right" style="margin: 0;">
<li ng-if="!isLoggedIn"><a href="https://github.com/zhukov/webogram" target="_blank">About</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="welcome_form" style="padding-bottom: 50px; clear: both;">
<img class="welcome_logo" src="img/decentralization.png"/>
<h3 class="welcome_header"><strong>Telegram</strong> Web</h3>
<div class="bad_browser_wrap">
<h2>Your browser is outdated!</h2>
<div class="bad_browser_text">
@ -66,42 +41,5 @@ @@ -66,42 +41,5 @@
</div>
<div class="welcome_footer">
<div class="welcome_cards_wrap clearfix">
<div class="container-fluid">
<div class="row">
<div class="col-md-4 col-sm-4" style="width: 33.33333333%; float: left;">
<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>
</div>
</div>
<div class="col-md-4 col-sm-4" style="width: 33.33333333%; float: left;">
<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>
</div>
</div>
<div class="col-md-4 col-sm-4" style="width: 33.33333333%; float: left;">
<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 \n and set custom notifications</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

499
app/css/app.css

@ -192,6 +192,108 @@ input[type="number"] { @@ -192,6 +192,108 @@ input[type="number"] {
background: #fbe7e6;
}
.md-input-group {
height: 50px;
border-bottom: 1px solid #e6e6e6;
/*padding: 0 0 10px;*/
padding: 0;
margin: 0 0 22px;
}
.md-input-label {
font-weight: normal;
color: #999;
cursor: pointer;
display: block;
font-size: 13px;
margin: 0;
padding: 0;
z-index: 1;
pointer-events: none;
-webkit-font-smoothing: antialiased;
transform-origin: left center;
-webkit-transform-origin: left center;
-webkit-transform: translate3d(0, 22px, 0);
transform: translate3d(0, 22px, 0);
}
.md-input-animated .md-input-group,
.md-input-animated .md-input-label {
-webkit-transition: all 0.15s cubic-bezier(0.35, 0, 0.25, 1);
transition: all 0.15s cubic-bezier(0.35, 0, 0.25, 1);
}
.md-input {
color: #000;
display: inline-block;
border: 0;
outline: 0;
font-size: 13px;
padding: 3px 0;
margin: 3px 0 0;
width: 100%;
}
.md-input-disabled .md-input {
color: #999;
}
.md-input-focused {
border-bottom: 2px solid #6bace1;
}
.md-input-error {
border-bottom: 2px solid #e2726f;
}
.md-input-error .md-input-label {
color: #d45a58;
}
.md-input-has-value .md-input-label {
-webkit-transform: scale(0.9);
transform: scale(0.9);
}
.md-input-group-centered,
.md-input-group-centered .md-input {
text-align: center;
}
.md-input-group-centered .md-input-label {
transform-origin: center center;
-webkit-transform-origin: center center;
}
.md_modal_head {
color: #FFF;
background: #5580a3;
padding: 0 0 28px 26px;
}
.md_modal_head_simple {
padding-bottom: 13px;
}
.md_modal_actions_wrap {
float: right;
}
a.md_modal_action {
display: block;
float: right;
color: #dde8f1;
padding: 19px 15px 5px;
}
a.md_modal_action:hover {
color: #FFF;
}
a.md_modal_action_close {
padding-right: 22px;
}
a.md_modal_action:hover,
a.md_modal_action:focus,
a.md_modal_action:active {
text-decoration: none;
}
.md_modal_title {
font-weight: bold;
padding: 18px 0 5px;
font-size: 13px;
}
.navbar_offline .navbar-header,
@ -621,168 +723,181 @@ a.tg_radio_on:hover i.icon-radio { @@ -621,168 +723,181 @@ a.tg_radio_on:hover i.icon-radio {
}
/* Welcome */
.welcome_form {
background: #FFF;
padding: 45px 0 63px;
border-bottom: 1px solid #e9e9e9;
}
.welcome_logo {
background: url(../img/decentralization.png) 0 0 no-repeat;
background-size: 160px 160px;
display: block;
width: 160px;
height: 160px;
margin: 0 auto;
/* Login page */
.login_head_bg {
background: #537c9a;
height: 226px;
}
img.welcome_logo {
background: none;
.login_page {
margin: -131px auto 90px;
max-width: 404px;
}
.welcome_header {
text-align: center;
font-size: 24px;
font-weight: normal;
margin: 15px 0 20px;
.login_head_wrap {
height: 75px;
}
.welcome_text {
text-align: center;
margin-bottom: 26px;
font-size: 14px;
line-height: 14px;
padding: 0 15px;
.login_head_logo_link {
display: inline-block;
line-height: 30px;
padding: 23px 15px 22px;
}
.welcome_btn_wrap {
max-width: 219px;
margin: 0 auto;
.tg_logo_wrap {
line-height: 30px !important;
}
.welcome_footer {
background: #f8f8f8;
padding: 20px 0 65px;
.icon-tg-logo {
width: 30px;
height: 30px;
display: inline-block;
vertical-align: top;
background: url(../img/icons/General.png) no-repeat -5px -10px;
background-size: 40px 678px;
margin-right: 18px;
}
.welcome_cards_wrap {
max-width: 870px;
margin: 0 auto;
.icon-tg-title {
width: 63px;
height: 16px;
display: inline-block;
vertical-align: middle;
background: url(../img/Telegram_2x.png) no-repeat 0 0;
background-size: 63px 16px;
}
.welcome_footer_card_wrap {
width: 260px;
margin: 41px auto 0;
text-align: center;
.login_head_submit_wrap,
.login_head_submit_progress {
float: right;
}
.welcome_footer_card {
background: url(../img/WebIntro2_1x.png) 0 0 no-repeat;
background-size: 217px 178px;
width: 219px;
height: 180px;
border: 1px solid #e0e4e9;
margin: 0 auto 24px;
.login_head_submit_btn,
.login_head_submit_progress {
font-size: 13px;
line-height: 20px;
padding: 26px 15px 29px;
display: inline-block;
color: #FFF;
}
.welcome_footer_card_messaging {
background-image: url(../img/WebIntro1.png);
.login_head_submit_btn:hover,
.login_head_submit_btn:focus,
.login_head_submit_btn:active {
color: #FFF;
text-decoration: none;
}
.is_1x .welcome_footer_card_messaging {
background-image: url(../img/WebIntro1_1x.png);
.icon-next-submit {
width: 7px;
height: 12px;
display: inline-block;
vertical-align: middle;
background: url(../img/icons/General.png) no-repeat -18px -50px;
background-size: 40px 678px;
margin-left: 12px;
margin-top: -1px;
}
.welcome_footer_card_filesharing {
background-image: url(../img/WebIntro2.png);
.login_footer_wrap {
color: #84a2bc;
font-size: 13px;
line-height: 16px;
margin-top: 25px;
text-align: center;
}
.is_1x .welcome_footer_card_filesharing {
background-image: url(../img/WebIntro2_1x.png);
.logo_footer_learn_more_link,
.logo_footer_learn_more_link:hover,
.logo_footer_learn_more_link:focus,
.logo_footer_learn_more_link:active {
color: #84a2bc;
font-weight: bold;
}
.welcome_footer_card_powerful {
background-image: url(../img/WebIntro3.png);
.login_form_wrap {
background: #FFF;
padding: 44px 65px 44px;
-webkit-box-shadow: 0px 1px 1px rgba(97, 127, 152, 0.2),
1px 0px 0 rgba(97, 127, 152, 0.1),
-1px 0px 0 rgba(97, 127, 152, 0.1);
-moz-box-shadow: 0px 1px 1px rgba(97, 127, 152, 0.2),
1px 0px 0 rgba(97, 127, 152, 0.1),
-1px 0px 0 rgba(97, 127, 152, 0.1);
box-shadow: 0px 1px 1px rgba(97, 127, 152, 0.2),
1px 0px 0 rgba(97, 127, 152, 0.1),
-1px 0px 0 rgba(97, 127, 152, 0.1);
border-radius: 2px;
border: 0;
margin: 0;
max-width: none;
}
.is_1x .welcome_footer_card_powerful {
background-image: url(../img/WebIntro3_1x.png);
.login_phone_country_input_group {
cursor: pointer;
}
.welcome_footer_card_wrap h4 {
font-size: 18px;
.login_phone_num_input_group {
overflow: hidden;
}
.welcome_footer_card_wrap .welcome_footer_card_lead {
.login_phone_code_input_group {
float: left;
width: 50px;
margin-right: 25px;
}
/* Login page */
.login_form_wrap {
max-width: 310px;
padding: 25px;
.login_footer_about_wrap {
background: #FFF;
margin: 200px auto 0;
border-radius: 1px;
overflow: hidden;
margin-top: 12px;
padding: 44px 65px 44px;
-webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1);
box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1);
-webkit-box-shadow: 0px 1px 0 #dfe5ec;
-moz-box-shadow: 0px 1px 0 #dfe5ec;
box-shadow: 0px 1px 0 #dfe5ec;
border-radius: 3px;
border: 1px solid #dfe5ec;
}
.login_footer_about_wrap h3 {
margin: 0 0 20px;
font-size: 15px;
font-weight: bold;
text-align: left;
}
.login_footer_about_wrap p {
margin: 0 0 20px;
font-size: 13px;
line-height: 160%;
}
.login_footer_about_wrap p:last-child {
margin: 0;
}
.login_form_head {
color: #222222;
margin-top: 0;
margin-bottom: 7px;
text-align: center;
}
.login_edit_phone {
text-align: center;
margin-bottom: 3px;
margin: 0 0 20px;
font-size: 15px;
font-weight: bold;
}
.login_form_lead {
color: #959595;
text-align: center;
color: #999;
margin: 15px 0 30px;
font-size: 13px;
line-height: 160%;
}
.login_form_messaging {
text-align: center;
color: #959595;
color: #999;
font-size: 13px;
margin-top: 20px;
line-height: 160%;
}
.login_country_selector {
cursor: pointer;
background: #f7f7f7;
height: 34px;
padding: 10px 12px 10px 13px;
line-height: 14px;
margin-bottom: 12px;
}
.login_country_selector:hover {
background: #ededed;
}
.login_country_selector .icon-caret {
margin-top: 4px;
height: 5px;
width: 10px;
background-position: -16px -653px;
}
.login_phone_country,
.login_phone_number {
float: left;
display: inline-block;
width: auto;
font-size: 12px;
}
.login_phone_country {
width: 53px;
margin-right: 9px;
padding: 6px 3px;
.login_phone_head {
color: #222222;
font-size: 15px;
font-weight: bold;
text-align: center;
margin: 0;
}
.login_phone_number {
width: 198px;
.login_edit_phone {
margin: 5px 0 15px;
text-align: center;
}
.login_phone_code {
.login_smscode_lead {
color: #999;
margin: 15px 0 15px;
line-height: 160%;
text-align: center;
}
.login_first_name_wrap {
margin-bottom: 11px;
.login_smscode_lead:last-child {
margin-bottom: 30px;
}
@ -844,7 +959,7 @@ img.welcome_logo { @@ -844,7 +959,7 @@ img.welcome_logo {
}
a.im_dialogs_search_clear {
a.tg_search_clear {
position: absolute;
right: 0;
margin-top: -40px;
@ -852,14 +967,14 @@ a.im_dialogs_search_clear { @@ -852,14 +967,14 @@ a.im_dialogs_search_clear {
height: 34px;
opacity: 0.6;
}
.contacts_modal_search a.im_dialogs_search_clear {
.contacts_modal_search a.tg_search_clear {
right: 12px;
margin-top: -34px;
}
a.im_dialogs_search_clear:hover {
a.tg_search_clear:hover {
opacity: 1;
}
i.im_dialogs_search_clear {
i.icon-search-clear {
display: inline-block;
color: #999;
width: 13px;
@ -869,7 +984,7 @@ i.im_dialogs_search_clear { @@ -869,7 +984,7 @@ i.im_dialogs_search_clear {
background: url(../img/icons/IconsetW.png) -15px -192px no-repeat;
background-size: 42px 1171px;
}
.is_1x i.im_dialogs_search_clear {
.is_1x i.icon-search-clear {
background-image: url(../img/icons/IconsetW_1x.png);
}
@ -2100,23 +2215,9 @@ a:hover .icon-twitter { @@ -2100,23 +2215,9 @@ a:hover .icon-twitter {
background-image: url(../img/icons/IconsetW_1x.png);
}
.contacts_modal_search_clear {
position: absolute;
a.contacts_modal_search_clear {
right: 9px;
margin-top: -24px;
color: #999;
width: 13px;
height: 13px;
vertical-align: text-top;
background: url(../img/icons/IconsetW.png) -15px -192px no-repeat;
background-size: 42px 1171px;
opacity: 0.6;
}
.is_1x .contacts_modal_search_clear {
background-image: url(../img/icons/IconsetW_1x.png);
}
.contacts_modal_search_clear:hover {
opacity: 1;
}
.contacts_scrollable_wrap {
@ -2127,7 +2228,7 @@ a:hover .icon-twitter { @@ -2127,7 +2228,7 @@ a:hover .icon-twitter {
text-align: center;
color: #999;
font-size: 16px;
line-height: 18px;
line-height: 160%;
padding: 1px 50px;
margin: 0;
}
@ -2443,23 +2544,9 @@ a.peer_photo_init:focus { @@ -2443,23 +2544,9 @@ a.peer_photo_init:focus {
.countries_modal_search_field:active {
background-color: #FFF;
}
.countries_modal_search_clear {
position: absolute;
right: 9px;
margin-top: -23px;
color: #999;
width: 13px;
height: 13px;
vertical-align: text-top;
background: url(../img/icons/IconsetW.png) -15px -192px no-repeat;
background-size: 42px 1171px;
opacity: 0.6;
}
.is_1x .countries_modal_search_clear {
background-image: url(../img/icons/IconsetW_1x.png);
}
.countries_modal_search_clear:hover {
opacity: 1;
a.countries_modal_search_clear {
right: 12px;
margin-top: -34px;
}
.countries_modal_wrap .modal-body {
padding: 14px 0;
@ -2644,98 +2731,6 @@ a.peer_photo_init:focus { @@ -2644,98 +2731,6 @@ a.peer_photo_init:focus {
}
.md-input-group {
height: 50px;
border-bottom: 1px solid #e6e6e6;
/*padding: 0 0 10px;*/
padding: 0;
margin: 0 0 22px;
}
.md-input-label {
font-weight: normal;
color: #999;
cursor: pointer;
display: block;
font-size: 13px;
margin: 0;
padding: 0;
z-index: 1;
pointer-events: none;
-webkit-font-smoothing: antialiased;
transform-origin: left center;
-webkit-transform-origin: left center;
-webkit-transform: translate3d(0, 22px, 0);
transform: translate3d(0, 22px, 0);
}
.md-input-animated .md-input-group,
.md-input-animated .md-input-label {
-webkit-transition: all 0.15s cubic-bezier(0.35, 0, 0.25, 1);
transition: all 0.15s cubic-bezier(0.35, 0, 0.25, 1);
}
.md-input {
color: #000;
display: inline-block;
border: 0;
outline: 0;
font-size: 13px;
padding: 3px 0;
margin: 3px 0 0;
width: 100%;
}
.md-input-disabled .md-input {
color: #999;
}
.md-input-focused {
border-bottom: 2px solid #6bace1;
}
.md-input-error {
border-bottom: 2px solid #a94442;
}
.md-input-has-value .md-input-label {
-webkit-transform: scale(0.9);
transform: scale(0.9);
}
.md_modal_head {
color: #FFF;
background: #5580a3;
padding: 0 0 28px 26px;
}
.md_modal_head_simple {
padding-bottom: 13px;
}
.md_modal_actions_wrap {
float: right;
}
a.md_modal_action {
display: block;
float: right;
color: #dde8f1;
padding: 19px 15px 5px;
}
a.md_modal_action:hover {
color: #FFF;
}
a.md_modal_action_close {
padding-right: 22px;
}
a.md_modal_action:hover,
a.md_modal_action:focus,
a.md_modal_action:active {
text-decoration: none;
}
.md_modal_title {
font-weight: bold;
padding: 18px 0 5px;
font-size: 13px;
}
.peer_modal_profile_wrap {
padding: 35px 2px 0px;
}

8
app/css/desktop.css

@ -1411,9 +1411,17 @@ div.im_dialog_photo .peer_initials { @@ -1411,9 +1411,17 @@ div.im_dialog_photo .peer_initials {
transition: margin-top linear 0.2s;
}
.countries_modal_search {
padding: 12px 12px 12px;
margin: 0;
position: relative;
}
.countries_modal_col {
max-height: 350px;
}
.countries_modal_wrap .md_modal_body {
padding-bottom: 15px;
}
.modal_close_wrap {

53
app/css/mobile.css

@ -45,29 +45,12 @@ html { @@ -45,29 +45,12 @@ html {
}
.tg_page_head .navbar > .container .navbar-brand {
padding: 8px 15px;
opacity: 0.9;
margin-left: 0;
margin-right: 20px;
-webkit-transition: opacity swing .9s;
display: block;
line-height: 0;
height: auto;
}
.tg_page_head .navbar > .container .navbar-brand:hover {
opacity: 1;
}
.tg_head_logo {
background: url(../img/T_LogoM.png) 0 0 no-repeat;
background-size: 143px 30px;
display: inline-block;
width: 143px;
height: 30px;
vertical-align: text-top;
}
.is_1x .tg_head_logo {
background-image: url(../img/T_LogoM_1x.png);
}
.tg_page_head .navbar-menu .navbar-nav.navbar-right {
margin-right: 0;
}
@ -294,7 +277,7 @@ html { @@ -294,7 +277,7 @@ html {
float: left;
margin: 0;
}
.navbar_offline .tg_head_logo {
.navbar_offline .tg_logo_wrap {
display: none;
}
.navbar-offline > li > a {
@ -371,22 +354,36 @@ html { @@ -371,22 +354,36 @@ html {
-webkit-overflow-scrolling: touch;
}
.welcome_text {
line-height: 150%;
.login_head_bg {
display: none;
}
.login_page {
margin-top: 0;
margin-bottom: 30px;
}
.login_head_wrap {
height: 75px;
background: #537c9a;
}
.login_form_wrap {
border-radius: 0;
max-width: auto;
border-top: 0;
border-left: 0;
border-right: 0;
box-shadow: none;
-webkit-box-shadow: none;
margin: 30px auto 20px;
padding: 44px 40px 44px;
}
.login_form_wrap .btn-primary {
padding: 12px 13px;
.login_footer_about_wrap {
border-radius: 0;
border-top: 0;
border-left: 0;
border-right: 0;
box-shadow: none;
padding: 44px 40px 44px;
}
.login_phone_country,
.login_phone_number {
height: 42px;
.icon-next-submit {
margin-top: -3px;
}
.im_dialogs_empty_header {

BIN
app/img/T_LogoM.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

BIN
app/img/T_LogoM_1x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

BIN
app/img/Telegram.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
app/img/Telegram_2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
app/img/WebIntro1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

BIN
app/img/WebIntro1_1x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

BIN
app/img/WebIntro2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

BIN
app/img/WebIntro2_1x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

BIN
app/img/WebIntro3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

BIN
app/img/WebIntro3_1x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

BIN
app/img/bg_tile.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 KiB

BIN
app/img/changelog/search.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

BIN
app/img/decentralization.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

BIN
app/img/logo_dogogram.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

10
app/js/controllers.js

@ -23,14 +23,14 @@ angular.module('myApp.controllers', ['myApp.i18n']) @@ -23,14 +23,14 @@ angular.module('myApp.controllers', ['myApp.i18n'])
location.href = location.href.replace(/^http:/, 'https:');
return;
}
$scope.showWelcome = true;
$location.url('/login');
});
ChangelogNotifyService.checkUpdate();
LayoutSwitchService.start();
})
.controller('AppLoginController', function ($scope, $rootScope, $location, $timeout, $modal, $modalStack, MtpApiManager, ErrorService, NotificationsManager, ChangelogNotifyService, IdleManager, LayoutSwitchService, _) {
.controller('AppLoginController', function ($scope, $rootScope, $location, $timeout, $modal, $modalStack, MtpApiManager, ErrorService, NotificationsManager, ChangelogNotifyService, IdleManager, LayoutSwitchService, TelegramMeWebService, _) {
$modalStack.dismissAll();
IdleManager.start();
@ -44,8 +44,11 @@ angular.module('myApp.controllers', ['myApp.i18n']) @@ -44,8 +44,11 @@ angular.module('myApp.controllers', ['myApp.i18n'])
!Config.Modes.http &&
Config.App.domains.indexOf(location.hostname) != -1) {
location.href = location.href.replace(/^http:/, 'https:');
return;
}
TelegramMeWebService.setAuthorized(true);
});
var options = {dcID: 2, createNetworker: true},
countryChanged = false,
selectedCountry = false;
@ -53,6 +56,7 @@ angular.module('myApp.controllers', ['myApp.i18n']) @@ -53,6 +56,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
$scope.credentials = {phone_country: '', phone_country_name: '', phone_number: '', phone_full: ''};
$scope.progress = {};
$scope.callPending = {};
$scope.about = {};
$scope.chooseCountry = function () {
var modal = $modal.open({
@ -208,6 +212,7 @@ angular.module('myApp.controllers', ['myApp.i18n']) @@ -208,6 +212,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
$scope.credentials.viaApp = sentCode._ == 'auth.sentAppCode';
$scope.callPending.remaining = sentCode.send_call_timeout || 60;
$scope.error = {};
$scope.about = {};
callCheck();
@ -279,6 +284,7 @@ angular.module('myApp.controllers', ['myApp.i18n']) @@ -279,6 +284,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
error.handled = true;
$scope.credentials.phone_code_valid = true;
$scope.credentials.phone_unoccupied = true;
$scope.about = {};
return;
} else if (error.code == 400 && error.type == 'PHONE_NUMBER_OCCUPIED') {
error.handled = true;

38
app/js/directives.js

@ -2531,3 +2531,41 @@ angular.module('myApp.directives', ['myApp.filters']) @@ -2531,3 +2531,41 @@ angular.module('myApp.directives', ['myApp.filters'])
};
})
.directive('mySubmitOnEnter', function () {
return {
link: link
};
function link($scope, element, attrs) {
element.on('keydown', function (event) {
if (event.keyCode == 13) {
element.trigger('submit');
}
});
};
})
.directive('myScrollToOn', function () {
return {
link: function($scope, element, attrs) {
var ev = attrs.myScrollToOn;
var doScroll = function () {
onContentLoaded(function () {
console.log(111,element, element.offset().top);
$('html, body').animate({
scrollTop: element.offset().top
}, 200);
});
};
if (ev == '$init') {
doScroll();
} else {
$scope.$on(ev, doScroll);
}
}
};
})

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

@ -326,7 +326,9 @@ @@ -326,7 +326,9 @@
"login_sign_in": "Sign in",
"login_enter_number_description": "Please choose your country and enter your full phone number.",
"login_incorrect_number": "Incorrect phone number",
"login_tel_input_placeholder": "Enter your phone",
"login_code_input_placeholder": "Code",
"login_tel_input_placeholder": "Phone number",
"login_country_select_placeholder": "Country",
"login_generating_key": "Generating keys",
"login_generating_keys_info": "Keys are only generated once. This can take a few minutes on slower devices, please be patient.",
"login_edit_number": "Edit phone number",
@ -347,6 +349,12 @@ @@ -347,6 +349,12 @@
"login_last_name": "Last name",
"login_signing_up": "Signing up",
"login_sign_up": "Sign up",
"login_about_title": "About",
"login_about_desc1_md": "Telegram web-client is free, fast and secure way to enjoy most of the **Telegram** features right from your **web-browser**.",
"login_about_desc2_md": "It is always synced to to the **Telegram app** on your mobile device, which makes it a pretty useful tool for messaging and sharing files.",
"login_about_desc3_md": "We designed this product not because we were told to, but because we wanted it for ourselves. Our {source-link: source code} is open, so everyone can make a contribution.",
"login_about_intro": "Welcome to the official Telegram web-client.",
"login_about_learn": "Learn more",
"login_controller_unknown_country": "Unknown",
@ -378,16 +386,6 @@ @@ -378,16 +386,6 @@
"phonebook_modal_submit_active": "Importing",
"phonebook_modal_submit": "Import contacts",
"welcome_header_md": "**Telegram** Web",
"welcome_text_1_md": "The official **web client** for Telegram.",
"welcome_start_messaging": "Start Messaging",
"welcome_fast_messaging_header": "Fast messaging",
"welcome_fast_messaging_text": "Send messages with rich emoji support right from your desktop or laptop computer",
"welcome_easy_sharing_header": "Easy file sharing",
"welcome_easy_sharing_text": "Share files of any type using drag-and-drop or the attachment icon",
"welcome_powerful_tools_header": "Powerful tools",
"welcome_powerful_tools_text_md": "Browse shared media and files by type \n and set custom notifications",
"country_select_modal_country_ab": "Abkhazia",
"country_select_modal_country_af": "Afghanistan",
"country_select_modal_country_ax": "Åland Islands",

4
app/partials/desktop/contacts_modal.html

@ -24,8 +24,8 @@ @@ -24,8 +24,8 @@
<div class="contacts_modal_search">
<input class="form-control contacts_modal_search_field no_outline" my-focused type="search" placeholder="{{'modal_search' | i18n}}" ng-model="search.query"/>
<a class="im_dialogs_search_clear" ng-click="search.query = ''" ng-show="search.query.length">
<i class="im_dialogs_search_clear"></i>
<a class="im_dialogs_search_clear tg_search_clear" ng-click="search.query = ''" ng-show="search.query.length">
<i class="icon icon-search-clear"></i>
</a>
</div>

22
app/partials/desktop/country_select_modal.html

@ -1,12 +1,22 @@ @@ -1,12 +1,22 @@
<div class="countries_modal_wrap" my-modal-position>
<div class="countries_modal_wrap md_modal_wrap" my-modal-position>
<div class="modal-body">
<div class="md_modal_head md_modal_head_simple">
<div class="md_modal_title_wrap">
<div class="md_modal_actions_wrap clearfix">
<a class="md_modal_action md_modal_action_close" ng-click="$dismiss()" my-i18n="modal_close"></a>
</div>
</div>
<div class="md_modal_title" my-i18n="country_select_modal_title"></div>
</div>
<h4 class="modal_simple_header" my-i18n="country_select_modal_title"></h4>
<div class="md_modal_body">
<div class="countries_modal_search">
<input class="form-control countries_modal_search_field no_outline" my-focused type="search" placeholder="{{'modal_search' | i18n}}" ng-model="search.query"/>
<a class="countries_modal_search_clear" ng-click="search.query = ''" ng-show="search.query.length"></a>
<a class="countries_modal_search_clear tg_search_clear" ng-click="search.query = ''" ng-show="search.query.length">
<i class="icon icon-search-clear"></i>
</a>
</div>
<div class="countries_modal_col" my-countries-list>
@ -32,8 +42,4 @@ @@ -32,8 +42,4 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" ng-click="$dismiss()" my-i18n="modal_done"></button>
</div>
</div>

4
app/partials/desktop/edit_contact_modal.html

@ -13,12 +13,12 @@ @@ -13,12 +13,12 @@
<div class="md-input-group" my-labeled-input>
<label class="md-input-label" my-i18n="contact_edit_modal_first_name"></label>
<input class="md-input" my-focused type="text" ng-model="importContact.first_name" />
<input class="md-input" my-focused type="text" ng-model="importContact.first_name" my-submit-on-enter />
</div>
<div class="md-input-group" my-labeled-input>
<label class="md-input-label" my-i18n="contact_edit_modal_last_name"></label>
<input class="md-input" type="text" ng-model="importContact.last_name" />
<input class="md-input" type="text" ng-model="importContact.last_name" my-submit-on-enter />
</div>
</form>

10
app/partials/desktop/head.html

@ -11,14 +11,14 @@ @@ -11,14 +11,14 @@
</div><span class="tg_head_logo_text" my-i18n="head_telegram"></span>
</a>
<ul class="dropdown-menu" ng-switch="isLoggedIn">
<li ng-switch-when="true"><a ng-click="openGroup()">
<ul class="dropdown-menu">
<li><a ng-click="openGroup()">
<i class="icon icon-new-group"></i><span my-i18n="im_new_group"></span>
</a></li>
<li ng-switch-when="true" ng-if="!isEmpty.contacts"><a ng-click="openContacts()">
<li ng-if="!isEmpty.contacts"><a ng-click="openContacts()">
<i class="icon icon-contacts"></i><span my-i18n="im_contacts"></span>
</a></li>
<li ng-switch-when="true"><a ng-click="openSettings()">
<li><a ng-click="openSettings()">
<i class="icon icon-settings"></i><span my-i18n="im_settings"></span>
</a></li>
<li><a href="https://telegram.org/faq" target="_blank">
@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
<span ng-switch-when="true" class="tg_head_connecting_text"><my-i18n msgid="head_connecting"></my-i18n><span my-loading-dots></span></span>
</div>
<div ng-switch-default class="tg_head_main_peer_wrap">
<div ng-switch-default ng-if="!!historyPeer.id" class="tg_head_main_peer_wrap">
<a class="tg_head_btn tg_head_msgs_edit_btn" my-i18n="im_edit" ng-click="toggleEdit()"></a>

4
app/partials/desktop/im.html

@ -8,8 +8,8 @@ @@ -8,8 +8,8 @@
<div class="im_dialogs_panel">
<div class="im_dialogs_search">
<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">
<i class="im_dialogs_search_clear"></i>
<a class="im_dialogs_search_clear tg_search_clear" ng-click="searchClear()" ng-show="search.query.length">
<i class="icon icon-search-clear"></i>
</a>
</div>

6
app/partials/desktop/import_contact_modal.html

@ -8,17 +8,17 @@ @@ -8,17 +8,17 @@
<div class="md-input-group" my-labeled-input>
<label class="md-input-label" my-i18n="contact_import_modal_phone"></label>
<input class="md-input" my-focused type="text" ng-model="importContact.phone" />
<input class="md-input" my-focused type="text" ng-model="importContact.phone" my-submit-on-enter />
</div>
<div class="md-input-group" my-labeled-input>
<label class="md-input-label" my-i18n="contact_edit_modal_first_name"></label>
<input class="md-input" type="text" ng-model="importContact.first_name" />
<input class="md-input" type="text" ng-model="importContact.first_name" my-submit-on-enter />
</div>
<div class="md-input-group" my-labeled-input>
<label class="md-input-label" my-i18n="contact_edit_modal_last_name"></label>
<input class="md-input" type="text" ng-model="importContact.last_name" />
<input class="md-input" type="text" ng-model="importContact.last_name" my-submit-on-enter />
</div>
</form>

179
app/partials/desktop/login.html

@ -1,86 +1,123 @@ @@ -1,86 +1,123 @@
<div my-head></div>
<div class="login_page_wrap" my-custom-background="#e7ebf0">
<div class="login_head_bg"></div>
<div class="login_page">
<div class="login_head_wrap clearfix" ng-switch="progress.enabled">
<div ng-switch-when="true" class="login_head_submit_progress">
<my-i18n ng-if="!credentials.phone_code_hash" msgid="login_generating_key"></my-i18n><my-i18n ng-if="credentials.phone_code_hash &amp;&amp; !credentials.phone_code_valid" msgid="login_checking_code"></my-i18n><my-i18n ng-if="credentials.phone_code_valid &amp;&amp; credentials.phone_unoccupied" msgid="login_signing_up"></my-i18n><span my-loading-dots></span>
</div>
<div ng-switch-default class="login_head_submit_wrap">
<a class="login_head_submit_btn" ng-if="!credentials.phone_code_hash" ng-click="sendCode()">
<my-i18n msgid="modal_next"></my-i18n><i class="icon icon-next-submit"></i>
</a>
<a class="login_head_submit_btn" ng-if="credentials.phone_code_hash &amp;&amp; !credentials.phone_code_valid" ng-click="logIn()">
<my-i18n msgid="modal_next"></my-i18n><i class="icon icon-next-submit"></i>
</a>
<a class="login_head_submit_btn" ng-if="credentials.phone_code_valid &amp;&amp; credentials.phone_unoccupied" ng-click="logIn(true)">
<my-i18n msgid="modal_next"></my-i18n><i class="icon icon-next-submit"></i>
</a>
</div>
<a class="login_head_logo_link" href="https://telegram.org" target="_blank">
<i class="icon icon-tg-logo"></i><i class="icon icon-tg-title"></i>
</a>
</div>
<div class="login_form_wrap">
<div class="error" ng-if="error.message" ng-bind="error.message"></div>
<div class="login_form_wrap" my-vertical-position="0.4">
<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" my-i18n="login_sign_in"></h3>
<p class="login_form_lead" my-i18n="login_enter_number_description"></p>
<form name="mySendCodeForm" ng-if="!credentials.phone_code_hash" ng-submit="sendCode()">
<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="md-input-group md-input-has-value login_phone_country_input_group" ng-click="chooseCountry()">
<label class="md-input-label" my-i18n="login_country_select_placeholder"></label>
<div autocomplete="off" class="md-input"ng-bind="credentials.phone_country_name"></div>
</div>
<div class="login_country_selector" ng-click="chooseCountry()">
<span ng-bind="credentials.phone_country_name"></span>
<i class="icon icon-caret pull-right"></i>
</div>
<div class="login_phone_groups_wrap clearfix">
<div class="form-group" ng-class="{'has-error': error.field == 'phone'}">
<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 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"><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" 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()" 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">
<a ng-click="sendSms()" my-i18n="login_code_not_received"></a>
</p>
</div>
<div ng-switch-default>
<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" 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="md-input-group login_phone_code_input_group" ng-class="{'md-input-error': error.field == 'phone'}" my-labeled-input>
<label class="md-input-label" my-i18n="login_code_input_placeholder"></label>
<input autocomplete="off" class="md-input" my-focused name="phone_country" type="tel" ng-model="credentials.phone_country" />
</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'" my-i18n="login_incorrect_sms_code"></label>
<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 class="md-input-group login_phone_num_input_group" ng-class="{'md-input-error': error.field == 'phone'}" my-labeled-input ng-switch="error.field == 'phone'">
<label ng-switch-when="true" class="md-input-label" my-i18n="login_incorrect_number"></label>
<label ng-switch-default class="md-input-label" my-i18n="login_tel_input_placeholder"></label>
<input required autocomplete="off" my-submit-on-enter class="md-input" my-focus-on="country_selected" name="phone_number" type="tel" ng-model="credentials.phone_number" />
</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"><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>
</div>
<div class="login_form_messaging" ng-show="progress.enabled" my-i18n="login_generating_keys_info"></div>
</form>
<form name="myFullNameForm" ng-if="credentials.phone_code_valid &amp;&amp; credentials.phone_unoccupied" ng-submit="logIn(true)">
<h3 class="login_form_head" my-i18n="login_your_info"></h3>
<p class="login_form_lead" my-i18n="login_fulll_name_label"></p>
<form name="myLoginForm" ng-if="credentials.phone_code_hash &amp;&amp; !credentials.phone_code_valid" ng-submit="logIn()">
<h3 class="login_phone_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()" my-i18n="login_edit_number"></a></div>
<div ng-switch="credentials.viaApp">
<div ng-switch-when="true">
<p class="login_smscode_lead" my-i18n="login_enter_code_label_md"></p>
<p class="login_smscode_lead">
<a ng-click="sendSms()" my-i18n="login_code_not_received"></a>
</p>
</div>
<div ng-switch-default>
<p class="login_smscode_lead" my-i18n="login_enter_sms_code_label_md"></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'" 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>
<p class="login_smscode_lead">
<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="md-input-group md-input-group-centered" ng-class="{'md-input-error': error.field == 'phone_code'}" my-labeled-input ng-switch="error.field == 'phone_code'">
<label ng-switch-when="true" class="md-input-label" my-i18n="login_incorrect_sms_code"></label>
<label ng-switch-default class="md-input-label" my-i18n="login_number_input_placeholder"></label>
<input autocomplete="off" class="md-input" my-focused name="phone_code" type="tel" ng-model="credentials.phone_code" required />
</div>
</form>
<form name="myFullNameForm" ng-if="credentials.phone_code_valid &amp;&amp; credentials.phone_unoccupied" ng-submit="logIn(true)">
<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="md-input-group" ng-class="{'md-input-error': error.field == 'first_name'}" my-labeled-input ng-switch="error.field == 'first_name'">
<label ng-switch-when="true" class="md-input-label" my-i18n="login_incorrect_first_name"></label>
<label ng-switch-default class="md-input-label" my-i18n="login_first_name"></label>
<input autocomplete="off" class="md-input" my-focused name="first_name" type="text" ng-model="credentials.first_name" required />
</div>
<div class="md-input-group" ng-class="{'md-input-error': error.field == 'last_name'}" my-labeled-input ng-switch="error.field == 'last_name'">
<label ng-switch-when="true" class="md-input-label" my-i18n="login_incorrect_last_name"></label>
<label ng-switch-default class="md-input-label" my-i18n="login_last_name"></label>
<input autocomplete="off" class="md-input" name="last_name" type="text" ng-model="credentials.last_name" />
</div>
</form>
<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'" 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"><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 ng-switch="about.shown">
<div ng-switch-when="true" class="login_footer_about_wrap" my-scroll-to-on="$init">
<h3 my-i18n="login_about_title"></h3>
<p my-i18n="login_about_desc1_md"></p>
<p my-i18n="login_about_desc2_md"></p>
<p my-i18n="login_about_desc3_md">
<my-i18n-param name="source-link">
<a href="https://github.com/zhukov/webogram" target="_blank">{0}</a>
</my-i18n-param>
</p>
</div>
<div ng-switch-default class="login_footer_wrap">
<p my-i18n="login_about_intro"></p>
<a class="logo_footer_learn_more_link" href="" ng-click="about.shown = true" my-i18n="login_about_learn"></a>
</div>
</div>
</div>
</div>
<!-- <div my-lang-footer></div> -->

4
app/partials/desktop/peer_select.html

@ -15,8 +15,8 @@ @@ -15,8 +15,8 @@
<div class="im_dialogs_panel">
<div class="im_dialogs_search">
<input my-focused 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="search.query = ''" ng-show="search.query.length">
<i class="im_dialogs_search_clear"></i>
<a class="im_dialogs_search_clear tg_search_clear" ng-click="search.query = ''" ng-show="search.query.length">
<i class="icon icon-search-clear"></i>
</a>
</div>
</div>

55
app/partials/desktop/welcome.html

@ -1,55 +0,0 @@ @@ -1,55 +0,0 @@
<div my-head></div>
<div ng-if="showWelcome">
<div class="welcome_form">
<div class="welcome_logo"></div>
<h3 class="welcome_header" my-i18n="welcome_header_md"></h3>
<div class="welcome_text">
<p my-i18n="welcome_text_1_md"></p>
</div>
<div class="welcome_btn_wrap">
<a href="#/login" class="btn btn-primary btn-block" my-i18n="welcome_start_messaging"></a>
</div>
</div>
<div class="welcome_footer" my-custom-background="#f8f8f8">
<div class="welcome_cards_wrap clearfix">
<div class="container-fluid">
<div class="row">
<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 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 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 my-i18n="welcome_powerful_tools_header"></h4>
<div class="welcome_footer_card_lead" my-i18n="welcome_powerful_tools_text_md"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

4
app/partials/mobile/contacts_modal.html

@ -67,7 +67,9 @@ @@ -67,7 +67,9 @@
<div class="contacts_modal_search">
<input class="form-control contacts_modal_search_field no_outline" my-focused type="search" placeholder="{{'modal_search' | i18n}}" ng-model="search.query"/>
<a class="contacts_modal_search_clear" ng-click="search.query = ''" ng-show="search.query.length"></a>
<a class="im_dialogs_search_clear tg_search_clear" ng-click="search.query = ''" ng-show="search.query.length">
<i class="icon icon-search-clear"></i>
</a>
</div>

4
app/partials/mobile/country_select_modal.html

@ -27,7 +27,9 @@ @@ -27,7 +27,9 @@
<div class="countries_modal_search">
<input class="form-control countries_modal_search_field no_outline" my-focused type="search" placeholder="{{'modal_search' | i18n}}" ng-model="search.query"/>
<a class="countries_modal_search_clear" ng-click="search.query = ''" ng-show="search.query.length"></a>
<a class="countries_modal_search_clear tg_search_clear" ng-click="search.query = ''" ng-show="search.query.length">
<i class="icon icon-search-clear"></i>
</a>
</div>
<div class="countries_modal_col countries_wrap countries_scrollable_wrap mobile_scrollable_wrap" my-countries-list-mobile my-infinite-scroller-mobile>

4
app/partials/mobile/edit_contact_modal.html

@ -34,10 +34,10 @@ @@ -34,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="{{'contact_edit_modal_first_name' | i18n}}" 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" my-submit-on-enter/>
</div>
<div class="form-group">
<input class="form-control input-lg" type="text" placeholder="{{'contact_edit_modal_last_name' | i18n}}" 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" my-submit-on-enter/>
</div>
</form>

13
app/partials/mobile/head.html

@ -16,14 +16,14 @@ @@ -16,14 +16,14 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<ul ng-if="!curDialog.peer &amp;&amp; isLoggedIn" class="dropdown-menu">
<ul ng-if="!curDialog.peer" class="dropdown-menu">
<li><a ng-click="openGroup()" my-i18n="head_new_group"></a></li>
<li><a ng-click="importContact()" my-i18n="head_new_contact"></a></li>
<li ng-if="!isEmpty.contacts"><a ng-click="openContacts()" my-i18n="head_contacts"></a></li>
<li><a ng-click="openSettings()" my-i18n="head_settings"></a></li>
<li><a ng-click="logOut()" my-i18n="head_log_out"></a></li>
</ul>
<ul ng-if="curDialog.peer &amp;&amp; isLoggedIn" class="dropdown-menu">
<ul ng-if="curDialog.peer" class="dropdown-menu">
<li><a ng-click="toggleEdit()" my-i18n="head_edit_messages"></a></li>
<li ng-if="!historyFilter.mediaType" class="divider"></li>
<li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia('photos')" my-i18n="head_media_photos"></a></li>
@ -31,18 +31,17 @@ @@ -31,18 +31,17 @@
<li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia('documents')" my-i18n="head_media_documents"></a></li>
<li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia('audio')" my-i18n="head_media_audio"></a></li>
</ul>
<ul ng-if="!isLoggedIn" class="dropdown-menu">
<li><a href="https://telegram.org" target="_blank" my-i18n="head_about"></a></li>
</ul>
</div>
<a ng-if="isLoggedIn" class="navbar-search-wrap" ng-click="toggleSearch()">
<a class="navbar-search-wrap" ng-click="toggleSearch()">
<i class="icon-search"></i>
</a>
<div class="navbar-header">
<a class="navbar-brand" href="{{isLoggedIn ? '#/im' : '#/'}}"><span class="tg_head_logo"></span></a>
<a class="navbar-brand tg_logo_wrap" href="#/im"><i class="icon icon-tg-logo"></i><i class="icon icon-tg-title"></i></a>
<span class="tg_head_logo"></span></a>
<div ng-show="curDialog.peer" ng-switch="curDialog.peer &amp;&amp; historyFilter.mediaType.length > 0">
<ul ng-switch-when="true" class="nav navbar-nav navbar-quick-nav">

4
app/partials/mobile/im.html

@ -8,8 +8,8 @@ @@ -8,8 +8,8 @@
<div class="im_dialogs_panel">
<div class="im_dialogs_search">
<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">
<i class="im_dialogs_search_clear"></i>
<a class="im_dialogs_search_clear tg_search_clear" ng-click="searchClear()" ng-show="search.query.length">
<i class="icon icon-search-clear"></i>
</a>
</div>

8
app/partials/mobile/import_contact_modal.html

@ -31,15 +31,15 @@ @@ -31,15 +31,15 @@
<form class="modal_simple_form" ng-submit="doImport()" my-vertical-position="0.2">
<div class="form-group">
<input class="form-control input-lg" my-focused type="text" placeholder="{{'contact_import_modal_phone' | i18n}}" ng-model="importContact.phone"/>
<input class="form-control input-lg" my-focused type="text" placeholder="{{'contact_import_modal_phone' | i18n}}" ng-model="importContact.phone" my-submit-on-enter/>
</div>
<div class="form-group">
<input class="form-control input-lg" type="text" placeholder="{{'contact_edit_modal_first_name' | i18n}}" 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" my-submit-on-enter/>
</div>
<div class="form-group">
<input class="form-control input-lg" type="text" placeholder="{{'contact_edit_modal_last_name' | i18n}}" 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" my-submit-on-enter/>
</div>
<div class="import_modal_phonebook_wrap" ng-if="phonebookAvailable">
<a class="btn btn-link" ng-click="importPhonebook()" my-i18n="contact_import_modal_phonebook"></a>
</div>

185
app/partials/mobile/login.html

@ -1,86 +1,129 @@ @@ -1,86 +1,129 @@
<div my-head></div>
<div class="tg_page_head">
<div class="navbar navbar-static-top navbar-inverse navbar_peer_not_selected">
<div class="container">
<div class="navbar-header">
<ul class="nav navbar-nav navbar-quick-nav">
<li class="navbar-quick-right login_head_submit_wrap">
<a class="disabled" disabled="disabled" ng-if="progress.enabled" class="login_head_submit_progress">
<my-i18n ng-if="!credentials.phone_code_hash" msgid="login_generating_key"></my-i18n><my-i18n ng-if="credentials.phone_code_hash &amp;&amp; !credentials.phone_code_valid" msgid="login_checking_code"></my-i18n><my-i18n ng-if="credentials.phone_code_valid &amp;&amp; credentials.phone_unoccupied" msgid="login_signing_up"></my-i18n><span my-loading-dots></span>
</a>
<a ng-if="!progress.enabled &amp;&amp; !credentials.phone_code_hash" ng-click="sendCode()">
<my-i18n msgid="modal_next"></my-i18n><i class="icon icon-next-submit"></i>
</a>
<a ng-if="!progress.enabled &amp;&amp; credentials.phone_code_hash &amp;&amp; !credentials.phone_code_valid" ng-click="logIn()">
<my-i18n msgid="modal_next"></my-i18n><i class="icon icon-next-submit"></i>
</a>
<a ng-if="!progress.enabled &amp;&amp; credentials.phone_code_valid &amp;&amp; credentials.phone_unoccupied" ng-click="logIn(true)">
<my-i18n msgid="modal_next"></my-i18n><i class="icon icon-next-submit"></i>
</a>
</li>
<li>
<a class="navbar-brand tg_logo_wrap" href="https://telegram.org" target="_blank"><i class="icon icon-tg-logo"></i><i class="icon icon-tg-title"></i></a>
</li>
</ul>
</div>
<div class="login_form_wrap" my-vertical-position="0.3">
<div class="error" ng-if="error.message" ng-bind="error.message"></div>
</div>
</div>
</div>
<form name="mySendCodeForm" ng-if="!credentials.phone_code_hash" ng-submit="sendCode()">
<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>
<i class="icon icon-caret pull-right"></i>
</div>
<div class="login_page_wrap" my-custom-background="#e7ebf0">
<div class="login_page">
<div class="login_form_wrap" my-vertical-position="0.2" padding="true">
<div class="error" ng-if="error.message" ng-bind="error.message"></div>
<div class="form-group" ng-class="{'has-error': error.field == 'phone'}">
<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 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"><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" 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()" 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">
<a ng-click="sendSms()" my-i18n="login_code_not_received"></a>
</p>
</div>
<div ng-switch-default>
<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" 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>
<form name="mySendCodeForm" ng-if="!credentials.phone_code_hash" ng-submit="sendCode()">
<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="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>
<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 class="md-input-group md-input-has-value login_phone_country_input_group" ng-click="chooseCountry()">
<label class="md-input-label" my-i18n="login_country_select_placeholder"></label>
<div autocomplete="off" class="md-input"ng-bind="credentials.phone_country_name"></div>
</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"><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>
<div class="login_phone_groups_wrap clearfix">
<form name="myFullNameForm" ng-if="credentials.phone_code_valid &amp;&amp; credentials.phone_unoccupied" ng-submit="logIn(true)">
<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="md-input-group login_phone_code_input_group" ng-class="{'md-input-error': error.field == 'phone'}" my-labeled-input>
<label class="md-input-label" my-i18n="login_code_input_placeholder"></label>
<input autocomplete="off" class="md-input" my-focused name="phone_country" type="tel" ng-model="credentials.phone_country" />
</div>
<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'" 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="md-input-group login_phone_num_input_group" ng-class="{'md-input-error': error.field == 'phone'}" my-labeled-input ng-switch="error.field == 'phone'">
<label ng-switch-when="true" class="md-input-label" my-i18n="login_incorrect_number"></label>
<label ng-switch-default class="md-input-label" my-i18n="login_tel_input_placeholder"></label>
<input required autocomplete="off" class="md-input" my-focus-on="country_selected" name="phone_number" type="tel" ng-model="credentials.phone_number" />
</div>
</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_phone_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()" my-i18n="login_edit_number"></a></div>
<div ng-switch="credentials.viaApp">
<div ng-switch-when="true">
<p class="login_smscode_lead" my-i18n="login_enter_code_label_md"></p>
<p class="login_smscode_lead">
<a ng-click="sendSms()" my-i18n="login_code_not_received"></a>
</p>
</div>
<div ng-switch-default>
<p class="login_smscode_lead" my-i18n="login_enter_sms_code_label_md"></p>
<p class="login_smscode_lead">
<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="md-input-group md-input-group-centered" ng-class="{'md-input-error': error.field == 'phone_code'}" my-labeled-input ng-switch="error.field == 'phone_code'">
<label ng-switch-when="true" class="md-input-label" my-i18n="login_incorrect_sms_code"></label>
<label ng-switch-default class="md-input-label" my-i18n="login_number_input_placeholder"></label>
<input autocomplete="off" class="md-input" my-focused name="phone_code" type="tel" ng-model="credentials.phone_code" required />
</div>
</form>
<form name="myFullNameForm" ng-if="credentials.phone_code_valid &amp;&amp; credentials.phone_unoccupied" ng-submit="logIn(true)">
<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="md-input-group" ng-class="{'md-input-error': error.field == 'first_name'}" my-labeled-input ng-switch="error.field == 'first_name'">
<label ng-switch-when="true" class="md-input-label" my-i18n="login_incorrect_first_name"></label>
<label ng-switch-default class="md-input-label" my-i18n="login_first_name"></label>
<input autocomplete="off" class="md-input" my-focused name="first_name" type="text" ng-model="credentials.first_name" required />
</div>
<div class="md-input-group" ng-class="{'md-input-error': error.field == 'last_name'}" my-labeled-input ng-switch="error.field == 'last_name'">
<label ng-switch-when="true" class="md-input-label" my-i18n="login_incorrect_last_name"></label>
<label ng-switch-default class="md-input-label" my-i18n="login_last_name"></label>
<input autocomplete="off" class="md-input" name="last_name" type="text" ng-model="credentials.last_name" />
</div>
</form>
<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'" 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"><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 ng-switch="about.shown">
<div ng-switch-when="true" class="login_footer_about_wrap" my-scroll-to-on="$init">
<h3 my-i18n="login_about_title"></h3>
<p my-i18n="login_about_desc1_md"></p>
<p my-i18n="login_about_desc2_md"></p>
<p my-i18n="login_about_desc3_md"></p>
</div>
<div ng-switch-default class="login_footer_wrap">
<p my-i18n="login_about_intro"></p>
<a class="logo_footer_learn_more_link" href="" ng-click="about.shown = true" my-i18n="login_about_learn"></a>
</div>
</div>
</div>
</div>
<!-- <div my-lang-footer></div> -->

4
app/partials/mobile/peer_select.html

@ -33,8 +33,8 @@ @@ -33,8 +33,8 @@
<div class="im_dialogs_panel">
<div class="im_dialogs_search">
<input my-focused 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="search.query = ''" ng-show="search.query.length">
<i class="im_dialogs_search_clear"></i>
<a class="im_dialogs_search_clear tg_search_clear" ng-click="search.query = ''" ng-show="search.query.length">
<i class="icon icon-search-clear"></i>
</a>
</div>
</div>

4
app/partials/mobile/phonebook_modal.html

@ -36,7 +36,9 @@ @@ -36,7 +36,9 @@
<div class="contacts_modal_search">
<input class="form-control contacts_modal_search_field no_outline" my-focused type="search" placeholder="{{'modal_search' | i18n}}" ng-model="search.query"/>
<a class="contacts_modal_search_clear" ng-click="search.query = ''" ng-show="search.query.length"></a>
<a class="contacts_modal_search_clear tg_search_clear" ng-click="search.query = ''" ng-show="search.query.length">
<i class="icon icon-search-clear"></i>
</a>
</div>

55
app/partials/mobile/welcome.html

@ -1,55 +0,0 @@ @@ -1,55 +0,0 @@
<div my-head></div>
<div ng-if="showWelcome">
<div class="welcome_form">
<div class="welcome_logo"></div>
<h3 class="welcome_header" my-i18n="welcome_header_md"></h3>
<div class="welcome_text">
<p my-i18n="welcome_text_1_md"></p>
</div>
<div class="welcome_btn_wrap">
<a href="#/login" class="btn btn-primary btn-block" my-i18n="welcome_start_messaging"></a>
</div>
</div>
<div class="welcome_footer" my-custom-background="#f8f8f8">
<div class="welcome_cards_wrap clearfix">
<div class="container-fluid">
<div class="row">
<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 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 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 my-i18n="welcome_powerful_tools_header"></h4>
<div class="welcome_footer_card_lead" my-i18n="welcome_powerful_tools_text_md"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Loading…
Cancel
Save