diff --git a/app/css/app.css b/app/css/app.css
index 17a0e25d..28a09732 100644
--- a/app/css/app.css
+++ b/app/css/app.css
@@ -159,6 +159,33 @@ input[type="number"] {
outline: none;
}
+.btn-md {
+ background: none;
+ text-decoration: none !important;
+ border-radius: 2px;
+ overflow: hidden;
+ text-transform: uppercase;
+ font-size: 13px;
+ padding: 6px 10px;
+}
+.btn-md,
+.btn-md:focus,
+.btn-md:hover {
+ color: #3a6d99;
+}
+.btn-md:hover {
+ background: #f2f6fa;
+}
+
+.btn-md-danger,
+.btn-md-danger:focus,
+.btn-md-danger:hover {
+ color: #c05f5a;
+}
+.btn-md-danger:hover {
+ background: #fbe7e6;
+}
+
.tg_page_head .navbar-quick-nav,
.tg_page_head .navbar-toggle {
display: none;
@@ -284,6 +311,11 @@ input[type="number"] {
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.175);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.175);
}
+.dropdown-menu-to-up {
+ top: auto;
+ bottom: 100%;
+ margin: 0 0 3px;
+}
.dropdown-menu > li > a {
padding: 5px 14px;
font-size: 13px;
@@ -383,6 +415,11 @@ input[type="number"] {
.modal-body {
padding: 14px 14px;
}
+.modal-footer {
+ padding: 0 14px 13px;
+ margin: 0;
+ border-top: 0;
+}
.modal_simple_header {
font-size: 14px;
margin: 0 0 10px;
@@ -391,14 +428,14 @@ input[type="number"] {
}
.modal_simple_form {
- max-width: 230px;
+ max-width: 276px;
margin: 0 auto;
- padding: 70px 0 50px;
+ /*padding: 70px 0 50px;*/
}
.modal_simple_form h4 {
- font-size: 16px;
- margin-bottom: 20px;
- text-align: center;
+ font-size: 14px;
+ margin-bottom: 38px;
+ text-align: left;
}
.modal_simple_form .form-group {
margin-bottom: 13px;
@@ -410,6 +447,45 @@ input[type="number"] {
text-align: justify;
}
+.md_simple_modal_wrap {
+
+}
+.md_simple_modal_body {
+ padding: 40px 37px 0;
+}
+.md_simple_header {
+ font-size: 14px;
+ margin: 0 0 10px;
+ font-weight: bold;
+}
+.md_simple_modal_body .modal_simple_form {
+ max-width: none;
+ margin: 0;
+ padding: 0;
+}
+.md_simple_modal_body .modal_simple_form h4 {
+ font-size: 14px;
+ margin-top: 0;
+ margin-bottom: 38px;
+ text-align: left;
+}
+.md_simple_form_description {
+ color: #777;
+ line-height: 160%;
+ margin: 0 0 10px;
+ text-align: justify;
+}
+.md_simple_modal_footer {
+ text-align: right;
+ padding: 10px 27px 15px;
+}
+.md_simple_modal_footer .btn {
+ margin-left: 10px;
+}
+
+
+
+
.modal_section_header {
font-size: 12px;
line-height: 14px;
@@ -429,61 +505,63 @@ input[type="number"] {
padding-bottom: 8px;
}
-.modal-footer {
- padding: 0 14px 13px;
- margin: 0;
- border-top: 0;
-}
-
a.tg_checkbox {
color: #000;
display: block;
line-height: 18px;
- margin: 8px 0;
+ padding: 8px 0;
+ margin: 9px 0;
}
a.tg_checkbox:hover {
text-decoration: none;
}
.tg_checkbox span.icon-checkbox-outer {
+ float: right;
display: inline-block;
- background: #c7c7c7;
- width: 33px;
- height: 18px;
- line-height: 18px;
+ background-color: #e6e6e6;
+ width: 36px;
+ height: 14px;
+ line-height: 14px;
vertical-align: middle;
- padding: 4px;
- border-radius: 10px;
- overflow: hidden;
- margin: 0 9px 0 0;
-
- -webkit-transition: background ease-in-out 0.1s;
- transition: background ease-in-out 0.1s;
+ border-radius: 8px;
+ margin: 3px 0px 3px 0;
+ -webkit-transition: background-color ease-in-out 0.1s;
+ transition: background-color ease-in-out 0.1s;
}
.tg_checkbox.tg_checkbox_on span.icon-checkbox-outer {
- background-color: #5c8db3;
+ background-color: #bfd9ed;
}
.tg_checkbox i.icon-checkbox-inner {
display: inline-block;
- background: #fff;
- width: 10px;
- height: 10px;
- border-radius: 5px;
+ background: #FFF;
+ width: 20px;
+ height: 20px;
+ border-radius: 10px;
overflow: hidden;
float: left;
- margin-left: 0;
-
- -webkit-transition: margin-left ease 0.1s;
- transition: margin-left ease 0.1s;
+ margin-left: -6px;
+ margin-top: -3px;
+ -webkit-transition: all ease 0.1s;
+ transition: all ease 0.1s;
+ border: 1px solid #E7E7E7;
+ -webkit-box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.05);
+ box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.05);
}
.tg_checkbox.tg_checkbox_on i.icon-checkbox-inner {
- margin-left: 15px;
+ background: #6b9bc2;
+ margin-left: 16px;
+ border: 0;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
}
.tg_checkbox_label {
display: inline-block;
line-height: 18px;
vertical-align: middle;
}
-a.tg_checkbox:hover span.icon-checkbox-outer {
+/*a.tg_checkbox:hover span.icon-checkbox-outer {
background: #bdbdbd;
}
a.tg_checkbox_on:hover span.icon-checkbox-outer {
@@ -491,47 +569,62 @@ a.tg_checkbox_on:hover span.icon-checkbox-outer {
}
a.tg_checkbox:hover i.icon-checkbox-inner {
background: #f2f2f2;
+}*/
+.tg_radios_wrap {
+ margin: 15px 0;
}
-
a.tg_radio {
color: #000;
display: block;
- line-height: 18px;
- margin: 5px 0;
+ line-height: 20px;
+ padding: 5px 0 6px;
}
a.tg_radio:hover {
text-decoration: none;
}
-.tg_radio i.icon-radio {
+.tg_radio .icon-radio-outer {
display: inline-block;
- background: #FFF;
width: 20px;
height: 20px;
line-height: 20px;
vertical-align: middle;
border-radius: 10px;
- border: 1px solid #cccccc;
+ border: 2px solid #d8d8d8;
overflow: hidden;
- margin: 0 9px 0 14px;
+ margin: 0 8px 0 0;
-webkit-transition: border-color ease-in-out 0.1s;
transition: border-color ease-in-out 0.1s;
}
-.tg_radio.tg_radio_on i.icon-radio {
- border: 6px solid #5c8db3;
+i.icon-radio {
+ display: inline-block;
+ background-color: #FFF;
+ width: 16px;
+ height: 16px;
+ line-height: 16px;
+ border-radius: 8px;
+ border: 3px solid #FFF;
+ -webkit-transition: background-color ease-in-out 0.1s;
+ transition: background-color ease-in-out 0.1s;
}
+.tg_radio.tg_radio_on .icon-radio-outer {
+ border-color: #5c8db3;
+}
+.tg_radio.tg_radio_on i.icon-radio {
+ background-color: #6b9bc2;
+}
+a.tg_radio:hover i.icon-radio {
+ background-color: #f2f2f2;
+}
+a.tg_radio_on:hover i.icon-radio {
+ background-color: #5785aa;
+}
+
.tg_radio_label {
display: inline-block;
line-height: 20px;
vertical-align: middle;
}
-a.tg_radio:hover i.icon-radio {
- background: #f2f2f2;
- border-color: #ccc;
-}
-a.tg_radio_on:hover i.icon-radio {
- border-color: #5785aa;
-}
.tg_range_wrap {
line-height: 18px;
@@ -544,22 +637,23 @@ a.tg_radio_on:hover i.icon-radio {
}
.tg_slider_track {
position: absolute;
- background: #c7c7c7;
- height: 3px;
- margin: 8px 0;
- border-radius: 2px;
+ background: #c4daec;
+ height: 4px;
+ margin: 7px 0;
width: 100%;
z-index: 2;
}
+.tg_slider_track_fill {
+ background: #83afd2;
+ height: 4px;
+}
.tg_slider_thumb {
position: absolute;
border: 0;
- background: #568cb5;
- width: 12px;
- height: 12px;
- border-radius: 6px;
- margin-top: 4px;
- /*overflow: hidden;*/
+ background: #6b9bc2;
+ width: 18px;
+ height: 18px;
+ border-radius: 9px;
z-index: 3;
}
@@ -812,7 +906,7 @@ img.welcome_logo {
background: #F2F2F2 url(../img/icons/IconsetW.png) -6px -205px no-repeat;
background-size: 42px 1171px;
border: 1px solid #F2F2F2;
- border-radius: 3px;
+ border-radius: 2px;
padding: 6px 20px 6px 30px;
margin: 0 0 6px;
}
@@ -829,24 +923,34 @@ img.welcome_logo {
}
-.im_dialogs_search_clear {
+a.im_dialogs_search_clear {
position: absolute;
- right: 9px;
- margin-top: -30px;
+ right: 0;
+ margin-top: -40px;
+ width: 34px;
+ height: 34px;
+ opacity: 0.6;
+}
+.contacts_modal_search a.im_dialogs_search_clear {
+ right: 12px;
+ margin-top: -34px;
+}
+a.im_dialogs_search_clear:hover {
+ opacity: 1;
+}
+i.im_dialogs_search_clear {
+ display: inline-block;
color: #999;
width: 13px;
height: 13px;
+ margin: 10px 0 0 11px;
vertical-align: text-top;
background: url(../img/icons/IconsetW.png) -15px -192px no-repeat;
background-size: 42px 1171px;
- opacity: 0.6;
}
-.is_1x .im_dialogs_search_clear {
+.is_1x i.im_dialogs_search_clear {
background-image: url(../img/icons/IconsetW_1x.png);
}
-.im_dialogs_search_clear:hover {
- opacity: 1;
-}
.im_dialogs_tabs_wrap {
display: none;
@@ -866,7 +970,8 @@ img.welcome_logo {
padding: 7px 0;
}
.im_dialogs_tab:hover,
-.im_dialogs_tab:active {
+.im_dialogs_tab:active,
+.im_dialogs_tab:focus {
color: #8c8c8c;
text-decoration: none;
}
@@ -910,11 +1015,11 @@ img.welcome_logo {
}
.im_dialogs_scrollable_wrap a.im_dialog:hover,
.im_dialogs_scrollable_wrap a.im_dialog_selected {
- border-radius: 2px;
+ border-radius: 0;
background: #f2f6fa;
}
.im_dialogs_scrollable_wrap .active a.im_dialog {
- border-radius: 2px;
+ border-radius: 0;
background-color: #6490b1;
}
.im_dialogs_scrollable_wrap .active a.im_dialog:hover,
@@ -954,6 +1059,7 @@ a.im_dialog_selected .im_dialog_message_text {
.im_dialog_photo {
width: 40px;
height: 40px;
+ line-height: 40px;
border-radius: 2px;
overflow: hidden;
margin: 0 10px 0 0;
@@ -970,11 +1076,12 @@ a.im_dialog_selected .im_dialog_message_text {
}
.im_dialog_badge {
- background: #6ec26d;
- border-radius: 2px;
- font-size: 10px;
- padding: 3px 4px;
- margin-top: 4px;
+ background: #64c270;
+ font-size: 11px;
+ padding: 5px;
+ border-radius: 10px;
+ min-width: 21px;
+ text-align: center;
}
.active .im_dialog_badge {
color: #428bca;
@@ -1134,6 +1241,11 @@ a.im_dialog_selected .im_dialog_date {
border-radius: 2px;
overflow: hidden;
}
+.im_message_from_photo .peer_initials,
+.im_message_contact_photo .peer_initials,
+.im_message_fwd_photo .peer_initials {
+ line-height: 34px;
+}
a.im_message_from_photo,
a.im_message_contact_photo {
margin: 1px 12px 0 0;
@@ -1779,7 +1891,7 @@ textarea.im_message_field {
.im_attach_input,
.im_media_attach_input {
cursor: pointer;
- font-size: 72px !important;
+ font-size: 120px !important;
opacity: 0.01;
position: absolute;
z-index: 100;
@@ -2054,9 +2166,9 @@ img.img_fullsize {
max-width: 350px;
}
.error_modal_description {
- text-align: center;
- padding: 20px 20px;
- font-size: 14px;
+ color: #999;
+ padding: 5px 0;
+ font-size: 13px;
line-height: 160%;
}
.error_modal_details textarea {
@@ -2077,25 +2189,17 @@ img.img_fullsize {
width: 100%;
text-align: left;
}
-.error_modal_details div {
- padding: 0 20px;
- font-size: 13px;
- text-align: center;
-}
-.error_modal_details div a {
+.error_modal_details_link,
+.error_modal_details_link:hover {
+ font-size: 11px;
color: #999;
}
-
-.confirm_modal_window .modal-dialog {
- max-width: 400px;
-}
.confirm_modal_description {
text-align: center;
- padding: 20px 20px;
+ padding: 20px 0;
font-size: 14px;
line-height: 160%;
- margin-top: 40px;
}
.confirm_phone_number {
@@ -2195,7 +2299,7 @@ a:hover .icon-twitter {
background: url(../img/icons/IconsetW.png) -6px -205px no-repeat;
background-size: 42px 1171px;
border: 1px solid #d9dbde;
- border-radius: 3px;
+ border-radius: 2px;
padding: 6px 15px 6px 30px;
margin: 0;
}
@@ -2252,7 +2356,6 @@ a:hover .icon-twitter {
.contacts_modal_members_list a.contacts_modal_contact:hover,
.contacts_modal_members_list .active a.contacts_modal_contact,
.contacts_modal_members_list .active a.contacts_modal_contact:hover {
- border-radius: 2px;
background: #f2f6fa;
}
@@ -2278,7 +2381,9 @@ a:hover .icon-twitter {
color: #999;
}
a.contacts_modal_contact:hover .contacts_modal_contact_status,
-.contacts_modal_members_list .active a.contacts_modal_contact .contacts_modal_contact_status {
+.contacts_modal_members_list .active a.contacts_modal_contact .contacts_modal_contact_status,
+a.contacts_modal_contact:hover .md_modal_list_peer_description,
+.contacts_modal_members_list .active a.contacts_modal_contact .md_modal_list_peer_description {
color: #91a6ba;
}
@@ -2348,13 +2453,10 @@ img.chat_modal_participant_photo {
.contacts_modal_members_list .disabled .icon-contact-tick {
display: none;
}
-
-.contacts_modal_panel {
- text-align: center;
-}
-
-.group_edit_modal_window .modal-dialog {
- max-width: 506px;
+.md_simple_modal_window .modal-dialog,
+.confirm_modal_window .modal-dialog,
+.error_modal_window .modal-dialog {
+ max-width: 348px;
}
@@ -2444,6 +2546,28 @@ ce671b orange
.user_color_8,
.user_color_8:hover {color: #c07844;}
+.user_bgcolor_1 {background: #e57979;}
+.user_bgcolor_2 {background: #fba76f;}
+.user_bgcolor_3 {background: #ecd074;}
+.user_bgcolor_4 {background: #80d066;}
+.user_bgcolor_5 {background: #73cdd0;}
+.user_bgcolor_6 {background: #6fb1e4;}
+.user_bgcolor_7 {background: #cc90e2;}
+.user_bgcolor_8 {background: #f98bae;}
+
+a.peer_photo_init:hover,
+a.peer_photo_init:active,
+a.peer_photo_init:focus {
+ text-decoration: none;
+}
+.peer_initials {
+ display: block;
+ color: #FFF;
+ text-align: center;
+ text-transform: uppercase;
+}
+
+
.im_dialogs_contacts_wrap h5 {
color: #999;
@@ -2585,16 +2709,14 @@ ce671b orange
/* Loading dots animation */
-.loading_dots
-{
+.loading_dots {
display: inline-block;
- font-size: 1em; /* set size here */
+ font-size: 1em;
line-height: 1;
padding: 0.125em 0 0.175em 0.15em;
}
-.loading_dots span
-{
+.loading_dots i {
border: 0.125rem solid;
border-radius: 50%;
display: inline-block;
@@ -2607,23 +2729,20 @@ ce671b orange
-ms-animation: loading_dots 0.8s linear infinite;
animation: loading_dots 0.8s linear infinite;
}
-.loading_dots span:nth-child(2)
-{
+.loading_dots i:nth-child(2) {
-webkit-animation-delay: 0.2s;
-moz-animation-delay: 0.2s;
-ms-animation-delay: 0.2s;
animation-delay: 0.2s;
}
-.loading_dots span:nth-child(3)
-{
+.loading_dots i:nth-child(3) {
-webkit-animation-delay: 0.4s;
-moz-animation-delay: 0.4s;
-ms-animation-delay: 0.4s;
animation-delay: 0.4s;
}
-@-webkit-keyframes loading_dots
-{
+@-webkit-keyframes loading_dots {
0% {
opacity: 0;
}
@@ -2635,8 +2754,7 @@ ce671b orange
}
}
-@-moz-keyframes loading_dots
-{
+@-moz-keyframes loading_dots {
0% {
opacity: 0;
}
@@ -2647,8 +2765,7 @@ ce671b orange
opacity: 0;
}
}
-@-ms-keyframes loading_dots
-{
+@-ms-keyframes loading_dots {
0% {
opacity: 0;
}
@@ -2659,8 +2776,7 @@ ce671b orange
opacity: 0;
}
}
-@keyframes loading_dots
-{
+@keyframes loading_dots {
0% {
opacity: 0;
}
@@ -2672,6 +2788,17 @@ ce671b orange
}
}
+.telegram_modal_logo {
+ background: url(../img/Telegram72_2x.png) no-repeat 0 0;
+ background-size: 72px 72px;
+}
+.is_1x .telegram_modal_logo {
+ background-image: url(../img/Telegram72.png);
+}
+
+.changelog_modal_window .modal-dialog {
+ max-width: 480px;
+}
.changelog_card_wrap {
text-align: center;
padding: 12px 0 18px;
@@ -2704,6 +2831,17 @@ ce671b orange
.changelog_version_changes_list li {
line-height: 20px;
}
+.changelog_footer_wrap {
+ padding: 15px 28px 30px 120px;
+}
+.changelog_github_link {
+ font-size: 13px;
+ float: right;
+ color: #999;
+}
+.changelog_more_link {
+ font-size: 13px;
+}
.bad_browser_wrap {
@@ -2726,4 +2864,395 @@ ce671b orange
#nacl_listener {
position: absolute;
left: -10000px;
+}
+
+
+.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: 12px;
+ 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: 12px;
+ 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: #FFF;
+ padding: 19px 15px 5px;
+}
+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 {
+ padding: 18px 0 5px;
+ font-size: 13px;
+}
+
+
+.peer_modal_profile_wrap {
+ padding: 35px 2px 0px;
+}
+.peer_modal_photo {
+ width: 72px;
+ height: 72px;
+ border-radius: 36px;
+ overflow: hidden;
+}
+a.peer_modal_photo,
+div.peer_modal_photo {
+ display: block;
+ margin-right: 19px;
+}
+.peer_modal_photo .peer_initials {
+ line-height: 72px;
+ font-size: 17px;
+}
+.peer_modal_profile_name {
+ font-size: 17px;
+ padding: 15px 0 9px;
+}
+.peer_modal_profile_description {
+ color: #beddf5;
+}
+
+.md_modal_split_actions_wrap {
+ position: relative;
+}
+.md_modal_split_actions {
+ position: absolute;
+ right: 25px;
+ top: -26px;
+}
+.md_modal_split_action {
+ display: block;
+ background: #FFF;
+ float: right;
+ position: relative;
+ width: 52px;
+ height: 52px;
+ margin-left: 20px;
+ border-radius: 26px;
+ overflow: hidden;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
+}
+.md_modal_split_action_camera {
+ display: inline-block;
+ width: 20px;
+ height: 18px;
+ background: url(../img/icons/ProfileIcons_2x.png) 0 0 no-repeat;
+ background-size: 40px 360px;
+ background-position: -10px -164px;
+ margin: 17px 0 0 16px;
+}
+.md_modal_split_action:hover .md_modal_split_action_camera,
+.md_modal_split_action:active .md_modal_split_action_camera {
+ background-position: -10px -192px;
+}
+.md_modal_split_action_twitter {
+ display: inline-block;
+ width: 27px;
+ height: 22px;
+ background: url(../img/icons/ProfileIcons_2x.png) 0 0 no-repeat;
+ background-size: 40px 360px;
+ background-position: -7px -280px;
+ margin: 17px 0 0 13px;
+}
+.md_modal_split_action:hover .md_modal_split_action_twitter,
+.md_modal_split_action:active .md_modal_split_action_twitter {
+ background-position: -7px -312px;
+}
+
+.md_modal_split_action_msg {
+ display: inline-block;
+ width: 20px;
+ height: 20px;
+ background: url(../img/icons/ProfileIcons_2x.png) 0 0 no-repeat;
+ background-size: 40px 360px;
+ background-position: -10px -220px;
+ margin: 18px 0 0 16px;
+}
+.md_modal_split_action:hover .md_modal_split_action_msg,
+.md_modal_split_action:active .md_modal_split_action_msg {
+ background-position: -10px -250px;
+}
+
+.md_modal_sections {
+ padding-top: 17px
+}
+
+.md_modal_iconed_section_wrap {
+ position: relative;
+ border-bottom: 1px solid #ebebeb;
+ margin: 19px 0 0 120px;
+ padding-right: 28px;
+}
+.md_modal_iconed_section_wrap:last-child {
+ border-bottom: 0;
+}
+
+.md_modal_iconed_section_number {
+ margin-top: 0;
+}
+.md_modal_iconed_section_toggle {
+ margin-top: 10px;
+}
+.md_modal_section_icon {
+ margin-top: 8px;
+}
+.md_modal_iconed_section_radio {
+ margin-top: 1px;
+}
+
+.md_modal_section_icon {
+ display: inline-block;
+ margin-left: -64px;
+ margin-top: 5px;
+ background: url(../img/icons/ProfileIcons_2x.png) 0 0 no-repeat;
+ background-size: 40px 360px;
+ position: absolute;
+}
+.md_modal_iconed_section_toggle .md_modal_section_icon {
+ margin-top: 8px;
+}
+.md_modal_iconed_section_radio .md_modal_section_icon {
+ margin-top: 10px;
+}
+.md_modal_iconed_section_link .md_modal_section_icon {
+ margin-top: 4px;
+}
+.md_modal_section_icon_phone {
+ width: 18px;
+ height: 18px;
+ background-position: -12px -10px;
+ margin-top: 3px;
+}
+.md_modal_section_icon_notification {
+ width: 17px;
+ height: 20px;
+ background-position: -12px -38px;
+}
+.md_modal_section_icon_keyboard {
+ width: 20px;
+ height: 14px;
+ background-position: -10px -140px;
+ margin-left: -66px;
+}
+.md_modal_section_icon_person {
+ width: 16px;
+ height: 16px;
+ background-position: -12px -90px;
+}
+.md_modal_section_icon_people {
+ width: 22px;
+ height: 14px;
+ background-position: -9px -116px;
+}
+.md_modal_section_icon_more {
+ width: 18px;
+ height: 12px;
+ background-position: -11px -68px;
+}
+
+.md_modal_section_param_wrap {
+ margin-top: 19px;
+ margin-bottom: 19px;
+}
+.md_modal_section_param_wrap:last-child {
+ margin-bottom: 16px;
+}
+.md_modal_section_param_wrap .md_modal_section_param_name {
+ color: #909090;
+ font-size: 11px;
+ line-height: 14px;
+ margin-top: 4px;
+}
+.md_modal_section_range_wrap {
+ padding-right: 4px;
+ margin-bottom: 25px;
+ padding-top: 1px;
+}
+.md_modal_section_select_wrap {
+ margin-bottom: 20px;
+}
+.md_modal_section_select {
+ float: right;
+ font-size: 12px;
+ padding: 0;
+}
+.md_modal_section_select_wrap .md_modal_section_param_name {
+ padding-top: 1px;
+}
+.md_modal_section_select .dropdown-toggle {
+ font-size: 12px;
+ padding: 0;
+ line-height: normal;
+}
+.md_modal_section_select .dropdown-menu {
+ left: -15px;
+}
+.md_modal_section_link_wrap {
+ padding-bottom: 15px;
+}
+.md_modal_section_link {
+ color: inherit;
+ display: block;
+ padding: 4px 0;
+}
+.md_modal_section_link:hover {
+ text-decoration: none;
+}
+
+.md_modal_versioned_section_wrap {
+ position: relative;
+ border-bottom: 1px solid #ebebeb;
+ margin: 19px 0 0 120px;
+ padding-right: 28px;
+}
+.md_modal_versioned_section_wrap:last-child {
+ border-bottom: 0;
+}
+.md_modal_section_version {
+ color: #777;
+ display: inline-block;
+ margin-left: -70px;
+ position: absolute;
+}
+.md_modal_section_splitter {
+ border-top: 1px solid #dfdfdf;
+ box-shadow: inset 0px 1px 1px #ededed;
+ height: 12px;
+ background: #f5f5f5;
+}
+
+
+.md_modal_list_peer_wrap {
+ padding-bottom: 16px;
+}
+.md_modal_list_peer_action {
+ font-size: 13px;
+ padding: 3px;
+ margin: -3px;
+}
+.md_modal_list_peer_photo {
+ width: 42px;
+ height: 42px;
+ line-height: 42px;
+ border-radius: 50%;
+ overflow: hidden;
+}
+a.md_modal_list_peer_photo,
+div.md_modal_list_peer_photo {
+ margin-right: 12px;
+}
+.md_modal_list_peer_name {
+ font-size: 13px;
+ font-weight: bold;
+}
+a.md_modal_list_peer_name {
+ color: inherit;
+}
+.md_modal_list_peer_description {
+ margin-top: 4px;
+ color: #999;
+}
+.md_modal_list_peer_description.status_online,
+.md_modal_list_peer_description .status_online {
+ color: #3a6d99;
+}
+
+.md_modal_footer {
+ padding: 15px 27px 15px;
+}
+
+
+
+.md_photo_loading {
+ display: block;
+ width: 72px;
+ height: 72px;
+ border-radius: 36px;
+ overflow: hidden;
+ background: #48769b;
+ text-align: center;
+ line-height: 72px;
+ padding: 0;
+}
+.md_photo_loading i {
+ display: inline-block;
+ background: #FFF;
+ width: 8px;
+ height: 8px;
+ border-radius: 4px;
+ vertical-align: middle;
+ border: 0;
+ margin-left: 6px;
+}
+.md_photo_loading i:first-child {
+ margin-left: 0;
}
\ No newline at end of file
diff --git a/app/css/desktop.css b/app/css/desktop.css
index e77cf0c9..b1ecbcbd 100644
--- a/app/css/desktop.css
+++ b/app/css/desktop.css
@@ -159,13 +159,16 @@ a.footer_link.active:active {
padding-bottom: 10px;
}
.im_dialogs_scrollable_wrap {
- padding: 0 19px 0 12px;
+ padding: 0 7px 0 0;
/* Hardware acceleration in Safari */
-webkit-transform: translateZ(0);
-webkit-perspective: 1000;
-webkit-backface-visibility: hidden;
}
+.im_dialogs_modal_col_wrap .im_dialogs_scrollable_wrap {
+ padding: 0;
+}
.im_dialogs_col .nano > .nano-pane {
background : rgba(0,0,0,0.0);
width : 12px;
@@ -213,23 +216,14 @@ a.footer_link.active:active {
transition : none;
}
.contacts_modal_col .nano > .nano-pane {
- width: 6px;
- right: 7px;
+ width: 5px;
+ right: 4px;
}
.im_dialogs_modal_col .nano > .nano-pane {
width: 6px;
right: 2px;
}
-.im_dialogs_modal_col .im_dialogs_scrollable_wrap {
- padding: 0 12px 0 12px;
-}
-.contacts_modal_col {
- margin-right: -17px;
-}
-.contacts_scrollable_wrap {
- padding: 0 17px 0 0;
-}
.im_history_col .nano > .nano-pane {
top: 10px;
@@ -323,38 +317,25 @@ a.footer_link.active:active {
/* Contacts modal */
.contacts_modal_window .modal-dialog {
- max-width: 456px;
+ max-width: 420px;
}
-.contacts_modal_header {
- padding: 6px 0 18px;
+.contacts_modal_search {
+ padding: 15px 12px 12px;
+ position: relative;
}
-.contacts_modal_edit_wrap {
- position: absolute;
- margin-top: -1px;
+.contacts_modal_members_list a.contacts_modal_contact {
+ padding: 8px 16px;
}
-.contacts_modal_edit_link {
- font-size: 14px;
- padding: 5px 7px;
+.contacts_modal_members_list .active a.contacts_modal_contact,
+.contacts_modal_members_list .active a.contacts_modal_contact:hover {
+ background: #6490b1;
+ color: #FFF;
}
-.contacts_modal_title {
- font-size: 14px;
- margin: 0;
- text-align: center;
- font-weight: bold;
+.contacts_modal_members_list .active a.contacts_modal_contact .md_modal_list_peer_description,
+.contacts_modal_members_list .active a.contacts_modal_contact:hover .md_modal_list_peer_description {
+ color: #FFF;
}
-.icon-message-status {
- background: #6ba2cb;
- border: 0;
- display: block;
- width: 10px;
- height: 10px;
- border-radius: 7px;
- position: absolute;
- margin-left: -26px;
- margin-top: 13px;
- opacity: 0;
-}
.im_message_unread .icon-message-status {
opacity: 1.0;
}
@@ -448,10 +429,33 @@ a.footer_link.active:active {
/* Dialogs modal */
.peer_select_window .modal-dialog {
- max-width: 506px;
+ max-width: 420px;
}
-.peer_select_modal_wrap .modal-body {
- padding: 0 2px 14px;
+.peer_select_window .im_dialogs_panel {
+ padding-top: 15px;
+}
+.peer_select_modal_footer {
+ box-shadow: 0 -1px 0px rgba(0,0,0,0.05);
+ padding: 15px 10px 15px;
+}
+.peer_select_modal_recipients_wrap {
+ padding: 6px 0 0 10px;
+ white-space: nowrap;
+ max-width: 300px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+.peer_select_modal_recipients_empty,
+.peer_select_modal_recipients_name {
+ color: #999;
+}
+.peer_select_modal_recipient {
+ display: inline-block;
+ white-space: nowrap;
+ max-width: 120px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ vertical-align: bottom;
}
@@ -513,10 +517,12 @@ a.footer_link.active:active {
.im_panel_own_photo {
width: 50px;
height: 50px;
- border-radius: 0;
+ line-height: 50px;
+ border-radius: 25px;
overflow: hidden;
}
-div.im_panel_peer_photo {
+div.im_panel_peer_photo,
+a.im_panel_peer_photo {
cursor: pointer;
margin-left: 12px;
height: 55px;
@@ -534,8 +540,8 @@ div.im_panel_own_photo {
border-radius: 6px;
overflow: hidden;
position: absolute;
- margin-top: -7px;
- margin-left: 43px;
+ margin-top: -12px;
+ margin-left: 36px;
}
.emoji-wysiwyg-editor,
.im_message_field {
@@ -544,7 +550,7 @@ div.im_panel_own_photo {
/* Peer modals */
.user_modal_window .modal-dialog {
- max-width: 506px;
+ max-width: 480px;
}
.user_modal_photo_profile_wrap {
padding: 13px 12px;
@@ -610,9 +616,8 @@ div.im_panel_own_photo {
.chat_modal_window .modal-dialog {
- max-width: 506px;
+ max-width: 480px;
}
-
.chat_modal_header {
font-weight: bold;
margin: 0 0 10px;
@@ -698,7 +703,7 @@ div.im_panel_own_photo {
}
.settings_modal_window .modal-dialog {
- max-width: 482px;
+ max-width: 480px;
}
.settings_modal_settings {
padding: 4px 0;
@@ -951,14 +956,36 @@ div.im_panel_own_photo {
margin-bottom: 0;
}
-
-
.im_dialogs_panel_dropdown.open .dropdown-toggle {
background: #6690b0;
}
.im_dialogs_panel_dropdown.open .dropdown-toggle .icon-bar {
background: #fff;
}
+.im_dialogs_scrollable_wrap a.im_dialog {
+ padding: 8px 16px;
+}
+.im_dialogs_scrollable_wrap .active a.im_dialog {
+ margin-right: -2px;
+ padding-right: 18px;
+}
+.im_dialog_photo {
+ width: 48px;
+ height: 48px;
+ line-height: 48px;
+ border-radius: 50%;
+}
+div.im_dialog_photo {
+ margin-right: 12px;
+}
+.im_dialog_message {
+ margin-top: 4px;
+}
+.active .im_dialog_date,
+.active a.im_dialog:hover .im_dialog_date,
+.active a.im_dialog_selected .im_dialog_date {
+ color: #FFF;
+}
/* Import contact modal */
.import_contact_modal_window .modal-dialog {
@@ -974,10 +1001,6 @@ div.im_panel_own_photo {
max-height: 350px;
}
-.changelog_modal_window .modal-dialog {
- max-width: 506px;
-}
-
.modal_close_wrap {
display: none;
@@ -1106,19 +1129,39 @@ div.im_panel_own_photo {
}
.media_modal_info_wrap {
line-height: 16px;
- padding: 24px 20px;
- position: absolute;
- left: 0;
+ padding: 15px 16px;
+ width: 200px;
}
-.media_modal_author {
+.media_modal_author_photo {
+ width: 32px;
+ height: 32px;
+ border-radius: 50%;
+ overflow: hidden;
+}
+.media_modal_author_photo .peer_initials {
+ line-height: 32px;
+}
+a.media_modal_author_photo {
+ margin: 1px 10px 1px 0;
+}
+div.media_modal_author_name {
font-size: 13px;
- margin-right: 4px;
+ margin-top: 1px;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
}
.media_modal_date,
a.media_modal_date:hover {
font-size: 11px;
color: rgba(255, 255, 255, 0.4);
}
+div.media_modal_date {
+ margin-top: 2px;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
.photo_modal_window,
.video_modal_window,
@@ -1177,6 +1220,3 @@ a.media_modal_date:hover {
height: 18px;
margin: 23px 27px;
}
-
-
-
diff --git a/app/css/mobile.css b/app/css/mobile.css
index 4ed15ea4..a2dbe7a1 100644
--- a/app/css/mobile.css
+++ b/app/css/mobile.css
@@ -510,13 +510,13 @@ img.im_message_video_thumb,
max-width: 100%;
}
.im_message_out.im_content_message_wrap {
- padding-left: 60px;
+ padding-left: 80px;
padding-right: 0;
float: right;
}
.im_message_in.im_content_message_wrap {
padding-left: 0;
- padding-right: 42px;
+ padding-right: 60px;
}
.im_history_messages_group .im_message_in.im_content_message_wrap,
.im_history_messages_group .im_grouped_short .im_message_in.im_content_message_wrap,
@@ -534,16 +534,25 @@ img.im_message_video_thumb,
.im_message_meta {
float: none;
position: absolute;
- bottom: 6px;
- right: -12px;
+ bottom: 5px;
+ left: 100%;
+ white-space: nowrap;
+ margin-left: -60px;
+ width: 60px;
+ padding: 0 0 0 8px;
+ overflow: hidden;
}
.im_message_date {
- font-size: 12px;
- padding-left: 4px;
+ font-size: 10px;
+ /*font-size: 12px;*/
+ padding: 0;
}
.im_message_out .im_message_meta {
- right: auto;
- left: -12px;
+ width: 80px;
+ left: 0;
+ text-align: right;
+ margin-left: 0;
+ padding: 0 8px 0 0;
}
.im_message_out .im_message_fwd_date {
@@ -627,7 +636,7 @@ a.im_message_from_photo {
vertical-align: text-top;
margin-right: 2px;
opacity: 1;
- margin-top: 5px;
+ margin-top: 6px;
}
.im_message_out .icon-message-status-tick,
.is_1x .im_message_out .icon-message-status-tick {
@@ -740,14 +749,6 @@ a.im_dialog_selected .im_dialog_date {
font-size: 12px;
margin-right: 3px;
}
-.im_dialog_badge {
- background: #64c270;
- font-size: 11px;
- padding: 5px;
- border-radius: 10px;
- min-width: 21px;
- text-align: center;
-}
.im_dialog_unread,
.active .im_dialog_unread,
a.im_dialog:hover .im_dialog_unread,
diff --git a/app/img/Telegram72.png b/app/img/Telegram72.png
new file mode 100644
index 00000000..4c89c28e
Binary files /dev/null and b/app/img/Telegram72.png differ
diff --git a/app/img/Telegram72_2x.png b/app/img/Telegram72_2x.png
new file mode 100644
index 00000000..f6d92dab
Binary files /dev/null and b/app/img/Telegram72_2x.png differ
diff --git a/app/img/icons/ProfileIcons.png b/app/img/icons/ProfileIcons.png
new file mode 100644
index 00000000..f7135af9
Binary files /dev/null and b/app/img/icons/ProfileIcons.png differ
diff --git a/app/img/icons/ProfileIcons_2x.png b/app/img/icons/ProfileIcons_2x.png
new file mode 100644
index 00000000..ffd330ad
Binary files /dev/null and b/app/img/icons/ProfileIcons_2x.png differ
diff --git a/app/js/controllers.js b/app/js/controllers.js
index b63bbff1..a9db9213 100644
--- a/app/js/controllers.js
+++ b/app/js/controllers.js
@@ -355,7 +355,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
templateUrl: templateUrl('chat_create_modal'),
controller: 'ChatCreateModalController',
scope: scope,
- windowClass: 'group_edit_modal_window mobile_modal'
+ windowClass: 'md_simple_modal_window mobile_modal'
});
}
@@ -889,6 +889,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
});
MtpApiManager.getUserID().then(function (id) {
+ $scope.ownID = id;
$scope.ownPhoto = AppUsersManager.getUserPhoto(id, 'User');
});
@@ -1211,11 +1212,15 @@ angular.module('myApp.controllers', ['myApp.i18n'])
selectedMessageIDs.push(messageID);
});
- PeersSelectService.selectPeer({confirm_type: 'FORWARD_PEER'}).then(function (peerString) {
- var peerID = AppPeersManager.getPeerID(peerString);
- AppMessagesManager.forwardMessages(peerID, selectedMessageIDs).then(function () {
- selectedCancel();
- $rootScope.$broadcast('history_focus', {peerString: peerString});
+ PeersSelectService.selectPeers({confirm_type: 'FORWARD_PEER'}).then(function (peerStrings) {
+ angular.forEach(peerStrings, function (peerString) {
+ var peerID = AppPeersManager.getPeerID(peerString);
+ AppMessagesManager.forwardMessages(peerID, selectedMessageIDs).then(function () {
+ selectedCancel();
+ if (peerStrings.length == 1) {
+ $rootScope.$broadcast('history_focus', {peerString: peerString});
+ }
+ });
});
});
@@ -1517,10 +1522,14 @@ angular.module('myApp.controllers', ['myApp.i18n'])
$scope.forward = function () {
var messageID = $scope.messageID;
- PeersSelectService.selectPeer({confirm_type: 'FORWARD_PEER'}).then(function (peerString) {
- var peerID = AppPeersManager.getPeerID(peerString);
- AppMessagesManager.forwardMessages(peerID, [messageID]).then(function () {
- $rootScope.$broadcast('history_focus', {peerString: peerString});
+ PeersSelectService.selectPeers({confirm_type: 'FORWARD_PEER'}).then(function (peerStrings) {
+ angular.forEach(peerStrings, function (peerString) {
+ var peerID = AppPeersManager.getPeerID(peerString);
+ AppMessagesManager.forwardMessages(peerID, [messageID]).then(function () {
+ if (peerStrings.length == 1) {
+ $rootScope.$broadcast('history_focus', {peerString: peerString});
+ }
+ });
});
});
};
@@ -1695,15 +1704,21 @@ angular.module('myApp.controllers', ['myApp.i18n'])
})
- .controller('UserpicModalController', function ($q, $scope, $rootScope, $modalInstance, AppPhotosManager, AppUsersManager, AppPeersManager, AppMessagesManager, PeersSelectService, ErrorService) {
+ .controller('UserpicModalController', function ($q, $scope, $rootScope, $modalInstance, MtpApiManager, AppPhotosManager, AppUsersManager, AppPeersManager, AppMessagesManager, ApiUpdatesManager, PeersSelectService, ErrorService) {
$scope.photo = AppPhotosManager.wrapForFull($scope.photoID);
+ $scope.photo.thumb = {
+ location: AppPhotosManager.choosePhotoSize($scope.photo, 0, 0).location
+ };
+
$scope.nav = {};
$scope.canForward = true;
var inputUser = AppUsersManager.getUserInput($scope.userID),
list = [$scope.photoID],
maxID = $scope.photoID,
+ preloaded = {},
+ myID = 0,
hasMore = true;
updatePrevNext();
@@ -1712,15 +1727,19 @@ angular.module('myApp.controllers', ['myApp.i18n'])
if (userpicCachedResult.photos.indexOf($scope.photoID) >= 0) {
list = userpicCachedResult.photos;
maxID = list[list.length - 1];
- hasMore = list.length < userpicCachedResult.count;
-
- updatePrevNext();
}
+ hasMore = list.length < userpicCachedResult.count;
+ updatePrevNext();
+ });
+
+ MtpApiManager.getUserID().then(function (id) {
+ myID = id;
+ $scope.canDelete = $scope.photo.user_id == myID;
});
var jump = 0;
- function movePosition (sign) {
+ function movePosition (sign, deleteCurrent) {
var curIndex = list.indexOf($scope.photoID),
index = curIndex >= 0 ? curIndex + sign : 0,
curJump = ++jump;
@@ -1733,32 +1752,80 @@ angular.module('myApp.controllers', ['myApp.i18n'])
$scope.photoID = list[index];
$scope.photo = AppPhotosManager.wrapForFull($scope.photoID);
+ $scope.photo.thumb = {
+ location: AppPhotosManager.choosePhotoSize($scope.photo, 0, 0).location
+ };
+
+ var newCount;
+ if (deleteCurrent) {
+ list.splice(curIndex, 1);
+ newCount = $scope.count - 1;
+ }
+
+ updatePrevNext(newCount);
+
+ preloaded[$scope.photoID] = true;
updatePrevNext();
+
+ if (sign > 0 && hasMore && list.indexOf($scope.photoID) + 1 >= list.length) {
+ loadMore();
+ } else {
+ preloadPhotos(sign);
+ }
});
};
+ function preloadPhotos (sign) {
+ var preloadOffsets = sign < 0 ? [-1,-2] : [1,2];
+ var index = list.indexOf($scope.photoID);
+ angular.forEach(preloadOffsets, function (offset) {
+ var photoID = list[index + offset];
+ if (photoID !== undefined && preloaded[photoID] === undefined) {
+ preloaded[photoID] = true;
+ AppPhotosManager.preloadPhoto(photoID);
+ }
+ })
+ }
+
var loadingPromise = false;
function loadMore () {
if (loadingPromise) return loadingPromise;
return loadingPromise = AppPhotosManager.getUserPhotos(inputUser, maxID).then(function (userpicResult) {
- maxID = userpicResult.photos[userpicResult.photos.length - 1];
- list = list.concat(userpicResult.photos);
+ if (userpicResult.photos.length) {
+ maxID = userpicResult.photos[userpicResult.photos.length - 1];
+ list = list.concat(userpicResult.photos);
- hasMore = list.length < userpicResult.count;
+ hasMore = list.length < userpicResult.count;
+ } else {
+ hasMore = false;
+ }
- updatePrevNext();
- loadingPromise = false;
- }, function () {
+ updatePrevNext(userpicResult.count);
loadingPromise = false;
+
+ if (userpicResult.photos.length) {
+ return $q.reject();
+ }
+
+ preloadPhotos(+1);
});
};
- function updatePrevNext () {
+ function updatePrevNext (count) {
var index = list.indexOf($scope.photoID);
+ if (hasMore) {
+ if (count) {
+ $scope.count = Math.max(count, list.length);
+ }
+ } else {
+ $scope.count = list.length;
+ }
+ $scope.pos = $scope.count - index;
$scope.nav.hasNext = index > 0;
$scope.nav.hasPrev = hasMore || index < list.length - 1;
+ $scope.canDelete = $scope.photo.user_id == myID;
};
$scope.nav.next = function () {
@@ -1777,25 +1844,109 @@ angular.module('myApp.controllers', ['myApp.i18n'])
};
$scope.forward = function () {
- var messageID = $scope.photoID;
- PeersSelectService.selectPeer({confirm_type: 'FORWARD_PEER'}).then(function (peerString) {
- var peerID = AppPeersManager.getPeerID(peerString);
- AppMessagesManager.sendOther(peerID, {
- _: 'inputMediaPhoto',
- id: {
- _: 'inputPhoto',
- id: $scope.photoID,
- access_hash: $scope.photo.access_hash,
+ PeersSelectService.selectPeers({confirm_type: 'FORWARD_PEER'}).then(function (peerStrings) {
+ angular.forEach(peerStrings, function (peerString) {
+ var peerID = AppPeersManager.getPeerID(peerString);
+ AppMessagesManager.sendOther(peerID, {
+ _: 'inputMediaPhoto',
+ id: {
+ _: 'inputPhoto',
+ id: $scope.photoID,
+ access_hash: $scope.photo.access_hash,
+ }
+ });
+ if (peerStrings.length == 1) {
+ $rootScope.$broadcast('history_focus', {peerString: peerStrings[0]});
}
});
- $rootScope.$broadcast('history_focus', {peerString: peerString});
});
};
$scope['delete'] = function () {
- var messageID = $scope.photoID;
- ErrorService.confirm({type: 'MESSAGE_DELETE'}).then(function () {
- AppMessagesManager.deleteMessages([messageID]);
+ var photoID = $scope.photoID;
+ var myUser = AppUsersManager.getUser(myID);
+ var onDeleted = function () {
+ if (!$scope.nav.hasNext && !$scope.nav.hasPrev) {
+ return $modalInstance.dismiss();
+ }
+ movePosition($scope.nav.hasNext ? -1 : +1, true);
+ };
+
+ ErrorService.confirm({type: 'PHOTO_DELETE'}).then(function () {
+ if (myUser && myUser.photo && myUser.photo.photo_id == photoID) {
+ MtpApiManager.invokeApi('photos.updateProfilePhoto', {
+ id: {_: 'inputPhotoEmpty'},
+ crop: {_: 'inputPhotoCropAuto'}
+ }).then(function (updateResult) {
+ ApiUpdatesManager.processUpdateMessage({
+ _: 'updateShort',
+ update: {
+ _: 'updateUserPhoto',
+ user_id: myID,
+ date: tsNow(true),
+ photo: updateResult,
+ previous: true
+ }
+ });
+ onDeleted();
+ });
+ }
+ else {
+ MtpApiManager.invokeApi('photos.deletePhotos', {
+ id: [{_: 'inputPhoto', id: photoID, access_hash: 0}]
+ }).then(onDeleted);
+ }
+ });
+ };
+
+ $scope.download = function () {
+ AppPhotosManager.downloadPhoto($scope.photoID);
+ };
+
+ })
+
+ .controller('ChatpicModalController', function ($q, $scope, $rootScope, $modalInstance, MtpApiManager, AppPhotosManager, AppChatsManager, AppPeersManager, AppMessagesManager, PeersSelectService, ErrorService) {
+
+ $scope.photo = AppPhotosManager.wrapForFull($scope.photoID);
+ $scope.photo.thumb = {
+ location: AppPhotosManager.choosePhotoSize($scope.photo, 0, 0).location
+ };
+
+ $scope.canForward = true;
+ $scope.canDelete = true;
+
+ $scope.forward = function () {
+ PeersSelectService.selectPeers({confirm_type: 'FORWARD_PEER'}).then(function (peerStrings) {
+ angular.forEach(peerStrings, function (peerString) {
+ var peerID = AppPeersManager.getPeerID(peerString);
+ AppMessagesManager.sendOther(peerID, {
+ _: 'inputMediaPhoto',
+ id: {
+ _: 'inputPhoto',
+ id: $scope.photoID,
+ access_hash: $scope.photo.access_hash,
+ }
+ });
+ if (peerStrings.length == 1) {
+ $rootScope.$broadcast('history_focus', {peerString: peerStrings[0]});
+ }
+ });
+ });
+ };
+
+ $scope['delete'] = function () {
+ ErrorService.confirm({type: 'PHOTO_DELETE'}).then(function () {
+ $scope.photo.updating = true;
+ MtpApiManager.invokeApi('messages.editChatPhoto', {
+ chat_id: $scope.chatID,
+ photo: {_: 'inputChatPhotoEmpty'}
+ }).then(function (updateResult) {
+ AppMessagesManager.onStatedMessage(updateResult);
+ $modalInstance.dismiss();
+ $rootScope.$broadcast('history_focus', {peerString: AppChatsManager.getChatString($scope.chatID)});
+ })['finally'](function () {
+ $scope.photo.updating = false;
+ });
});
};
@@ -1815,10 +1966,14 @@ angular.module('myApp.controllers', ['myApp.i18n'])
$scope.forward = function () {
var messageID = $scope.messageID;
- PeersSelectService.selectPeer({confirm_type: 'FORWARD_PEER'}).then(function (peerString) {
- var peerID = AppPeersManager.getPeerID(peerString);
- AppMessagesManager.forwardMessages(peerID, [messageID]).then(function () {
- $rootScope.$broadcast('history_focus', {peerString: peerString});
+ PeersSelectService.selectPeers({confirm_type: 'FORWARD_PEER'}).then(function (peerStrings) {
+ angular.forEach(peerStrings, function (peerString) {
+ var peerID = AppPeersManager.getPeerID(peerString);
+ AppMessagesManager.forwardMessages(peerID, [messageID]).then(function () {
+ if (peerStrings.length == 1) {
+ $rootScope.$broadcast('history_focus', {peerString: peerString});
+ }
+ });
});
});
};
@@ -1847,10 +2002,14 @@ angular.module('myApp.controllers', ['myApp.i18n'])
$scope.forward = function () {
var messageID = $scope.messageID;
- PeersSelectService.selectPeer({confirm_type: 'FORWARD_PEER'}).then(function (peerString) {
- var peerID = AppPeersManager.getPeerID(peerString);
- AppMessagesManager.forwardMessages(peerID, [messageID]).then(function () {
- $rootScope.$broadcast('history_focus', {peerString: peerString});
+ PeersSelectService.selectPeers({confirm_type: 'FORWARD_PEER'}).then(function (peerStrings) {
+ angular.forEach(peerStrings, function (peerString) {
+ var peerID = AppPeersManager.getPeerID(peerString);
+ AppMessagesManager.forwardMessages(peerID, [messageID]).then(function () {
+ if (peerStrings.length == 1) {
+ $rootScope.$broadcast('history_focus', {peerString: peerString});
+ }
+ });
});
});
};
@@ -1897,9 +2056,6 @@ angular.module('myApp.controllers', ['myApp.i18n'])
AppUsersManager.saveApiUser(userFullResult.user, true);
}
AppPhotosManager.savePhoto(userFullResult.profile_photo);
- if (userFullResult.profile_photo._ != 'photoEmpty') {
- $scope.userPhoto.id = userFullResult.profile_photo.id;
- }
$scope.blocked = userFullResult.blocked;
NotificationsManager.savePeerSettings($scope.userID, userFullResult.notify_settings);
@@ -1946,7 +2102,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
$modal.open({
templateUrl: templateUrl(edit ? 'edit_contact_modal' : 'import_contact_modal'),
controller: 'ImportContactModalController',
- windowClass: 'import_contact_modal_window mobile_modal',
+ windowClass: 'md_simple_modal_window mobile_modal',
scope: scope
}).result.then(function (foundUserID) {
if ($scope.userID == foundUserID) {
@@ -1970,23 +2126,26 @@ angular.module('myApp.controllers', ['myApp.i18n'])
};
$scope.shareContact = function () {
- PeersSelectService.selectPeer({confirm_type: 'SHARE_CONTACT_PEER'}).then(function (peerString) {
- var peerID = AppPeersManager.getPeerID(peerString);
-
- AppMessagesManager.sendOther(peerID, {
- _: 'inputMediaContact',
- phone_number: $scope.user.phone,
- first_name: $scope.user.first_name,
- last_name: $scope.user.last_name,
- user_id: $scope.user.id
+ PeersSelectService.selectPeers({confirm_type: 'SHARE_CONTACT_PEER'}).then(function (peerStrings) {
+ angular.forEach(peerStrings, function (peerString) {
+ var peerID = AppPeersManager.getPeerID(peerString);
+ AppMessagesManager.sendOther(peerID, {
+ _: 'inputMediaContact',
+ phone_number: $scope.user.phone,
+ first_name: $scope.user.first_name,
+ last_name: $scope.user.last_name,
+ user_id: $scope.user.id
+ });
+ if (peerStrings.length == 1) {
+ $rootScope.$broadcast('history_focus', {peerString: peerStrings[0]});
+ }
});
- $rootScope.$broadcast('history_focus', {peerString: peerString});
- })
+ });
}
})
- .controller('ChatModalController', function ($scope, $timeout, $rootScope, $modal, AppUsersManager, AppChatsManager, MtpApiManager, MtpApiFileManager, NotificationsManager, AppMessagesManager, AppPeersManager, ApiUpdatesManager, ContactsSelectService, ErrorService) {
+ .controller('ChatModalController', function ($scope, $timeout, $rootScope, $modal, AppUsersManager, AppChatsManager, AppPhotosManager, MtpApiManager, MtpApiFileManager, NotificationsManager, AppMessagesManager, AppPeersManager, ApiUpdatesManager, ContactsSelectService, ErrorService) {
$scope.chatFull = AppChatsManager.wrapForFull($scope.chatID, {});
@@ -1995,6 +2154,9 @@ angular.module('myApp.controllers', ['myApp.i18n'])
}).then(function (result) {
AppChatsManager.saveApiChats(result.chats);
AppUsersManager.saveApiUsers(result.users);
+ if (result.full_chat && result.full_chat.chat_photo.id) {
+ AppPhotosManager.savePhoto(result.full_chat.chat_photo);
+ }
$scope.chatFull = AppChatsManager.wrapForFull($scope.chatID, result.full_chat);
$scope.$broadcast('ui_height');
@@ -2021,18 +2183,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
});
function onStatedMessage (statedMessage) {
- ApiUpdatesManager.processUpdateMessage({
- _: 'updates',
- users: statedMessage.users,
- chats: statedMessage.chats,
- seq: statedMessage.seq,
- updates: [{
- _: 'updateNewMessage',
- message: statedMessage.message,
- pts: statedMessage.pts
- }]
- });
-
+ AppMessagesManager.onStatedMessage(statedMessage);
$rootScope.$broadcast('history_focus', {peerString: $scope.chatFull.peerString});
}
@@ -2148,7 +2299,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
templateUrl: templateUrl('chat_edit_modal'),
controller: 'ChatEditModalController',
scope: scope,
- windowClass: 'group_edit_modal_window mobile_modal'
+ windowClass: 'md_simple_modal_window mobile_modal'
});
}
@@ -2170,9 +2321,6 @@ angular.module('myApp.controllers', ['myApp.i18n'])
}).then(function (userFullResult) {
AppUsersManager.saveApiUser(userFullResult.user);
AppPhotosManager.savePhoto(userFullResult.profile_photo);
- if (userFullResult.profile_photo._ != 'photoEmpty') {
- $scope.photo.id = userFullResult.profile_photo.id;
- }
});
$scope.notify = {volume: 0.5};
@@ -2193,6 +2341,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
crop: {_: 'inputPhotoCropAuto'}
}).then(function (updateResult) {
AppUsersManager.saveApiUsers(updateResult.users);
+ AppPhotosManager.savePhoto(updateResult.photo);
MtpApiManager.getUserID().then(function (id) {
ApiUpdatesManager.processUpdateMessage({
_: 'updateShort',
@@ -2208,7 +2357,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
});
});
})['finally'](function () {
- delete $scope.updating;
+ delete $scope.photo.updating;
});
};
@@ -2240,7 +2389,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
$modal.open({
templateUrl: templateUrl('profile_edit_modal'),
controller: 'ProfileEditModalController',
- windowClass: 'profile_edit_modal_window mobile_modal'
+ windowClass: 'md_simple_modal_window mobile_modal'
});
};
@@ -2248,7 +2397,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
$modal.open({
templateUrl: templateUrl('username_edit_modal'),
controller: 'UsernameEditModalController',
- windowClass: 'username_edit_modal_window mobile_modal'
+ windowClass: 'md_simple_modal_window mobile_modal'
});
};
@@ -2339,11 +2488,41 @@ angular.module('myApp.controllers', ['myApp.i18n'])
})
.controller('ChangelogModalController', function ($scope, $modal) {
+
+ $scope.currentVersion = Config.App.version;
+ if (!$scope.lastVersion) {
+ var versionParts = $scope.currentVersion.split('.');
+ $scope.lastVersion = versionParts[0] + '.' + versionParts[1] + '.' + Math.max(0, versionParts[2] - 1);
+ }
+
+ $scope.changelogHidden = false;
+ $scope.changelogShown = false;
+
+ $scope.canShowVersion = function (curVersion) {
+ if ($scope.changelogShown) {
+ return true;
+ }
+
+ var show = versionCompare(curVersion, $scope.lastVersion) >= 0;
+ if (!show) {
+ $scope.changelogHidden = true;
+ }
+
+ return show;
+ };
+
+ $scope.showAllVersions = function () {
+ $scope.changelogShown = true;
+ $scope.changelogHidden = false;
+ $scope.$emit('ui_height');
+ $scope.$broadcast('ui_height');
+ };
+
$scope.changeUsername = function () {
$modal.open({
templateUrl: templateUrl('username_edit_modal'),
controller: 'UsernameEditModalController',
- windowClass: 'username_edit_modal_window mobile_modal'
+ windowClass: 'md_simple_modal_window mobile_modal'
});
};
})
@@ -2583,22 +2762,53 @@ angular.module('myApp.controllers', ['myApp.i18n'])
.controller('PeerSelectController', function ($scope, $modalInstance, $q, AppPeersManager, ErrorService) {
+ $scope.selectedPeers = {};
+ $scope.selectedPeerIDs = [];
+ $scope.selectedCount = 0;
+
$scope.dialogSelect = function (peerString) {
- var promise;
- if ($scope.confirm_type) {
- var peerID = AppPeersManager.getPeerID(peerString),
- peerData = AppPeersManager.getPeer(peerID);
- promise = ErrorService.confirm({
- type: $scope.confirm_type,
- peer_id: peerID,
- peer_data: peerData
+ if (!$scope.multiSelect) {
+ var promise;
+ if ($scope.confirm_type) {
+ var peerID = AppPeersManager.getPeerID(peerString),
+ peerData = AppPeersManager.getPeer(peerID);
+ promise = ErrorService.confirm({
+ type: $scope.confirm_type,
+ peer_id: peerID,
+ peer_data: peerData
+ });
+ } else {
+ promise = $q.when();
+ }
+ promise.then(function () {
+ $modalInstance.close(peerString);
});
- } else {
- promise = $q.when();
+ return;
+ }
+
+ var peerID = AppPeersManager.getPeerID(peerString);
+ if ($scope.selectedPeers[peerID]) {
+ delete $scope.selectedPeers[peerID];
+ $scope.selectedCount--;
+ var pos = $scope.selectedPeerIDs.indexOf(peerID);
+ if (pos >= 0) {
+ $scope.selectedPeerIDs.splice(pos, 1);
+ }
+ } else {
+ $scope.selectedPeers[peerID] = AppPeersManager.getPeer(peerID);
+ $scope.selectedCount++;
+ $scope.selectedPeerIDs.unshift(peerID);
+ }
+ };
+
+ $scope.submitSelected = function () {
+ if ($scope.selectedCount > 0) {
+ var selectedPeerStrings = [];
+ angular.forEach($scope.selectedPeers, function (t, peerID) {
+ selectedPeerStrings.push(AppPeersManager.getPeerString(peerID));
+ });
+ return $modalInstance.close(selectedPeerStrings);
}
- promise.then(function () {
- $modalInstance.close(peerString);
- });
};
$scope.toggleSearch = function () {
diff --git a/app/js/directives.js b/app/js/directives.js
index 5cf1db92..d2eaffc2 100644
--- a/app/js/directives.js
+++ b/app/js/directives.js
@@ -1744,7 +1744,7 @@ angular.module('myApp.directives', ['myApp.filters'])
function link ($scope, element, attrs) {
element.html(isAnimationSupported(element[0])
- ? '
'
+ ? '
'
: '...'
);
}
@@ -2132,6 +2132,108 @@ angular.module('myApp.directives', ['myApp.filters'])
}
})
+ .directive('myPeerPhotolink', function (AppPeersManager, AppUsersManager, AppChatsManager, MtpApiFileManager, FileManager) {
+
+ return {
+ link: link
+ };
+
+ function link($scope, element, attrs) {
+
+ element.addClass('peer_photo_init');
+
+ var peerID, peer, peerPhoto;
+ var imgEl = $('');
+ var initEl = $('');
+ var jump = 0;
+ var prevClass = false;
+
+ var setPeerID = function (newPeerID) {
+ if (peerID == newPeerID) {
+ return false;
+ }
+ peerID = newPeerID;
+ peer = AppPeersManager.getPeer(peerID);
+
+ var newClass = 'user_bgcolor_' + (peer.num || 1);
+ if (newClass != prevClass) {
+ if (prevClass) {
+ initEl.removeClass(prevClass);
+ }
+ initEl.addClass(newClass);
+ }
+
+ updatePeerPhoto();
+
+ return true;
+ }
+
+ var updatePeerPhoto = function () {
+ peerPhoto = peer.photo && angular.copy(peer.photo.photo_small);
+
+ var hasPhoto = peerPhoto !== undefined;
+
+ if (hasPhoto) {
+ var cachedBlob = MtpApiFileManager.getCachedFile(peer.photo.photo_small);
+ if (cachedBlob) {
+ initEl.remove();
+ imgEl.prependTo(element).attr('src', FileManager.getUrl(cachedBlob, 'image/jpeg'));
+ return;
+ }
+ }
+
+ initEl.text(peer.initials).prependTo(element);
+ imgEl.remove();
+
+
+ if (hasPhoto) {
+ var curJump = ++jump;
+
+ MtpApiFileManager.downloadSmallFile(peer.photo.photo_small).then(function (blob) {
+ if (curJump != jump) {
+ return;
+ }
+ initEl.remove();
+ imgEl.prependTo(element).attr('src', FileManager.getUrl(blob, 'image/jpeg'));
+
+ }, function (e) {
+ console.log('Download image failed', e, peer.photo.photo_small, element[0]);
+ });
+ }
+ };
+
+ if (element[0].tagName == 'A' && !attrs.noOpen) {
+ element.on('click', function (e) {
+ if (peerID > 0) {
+ AppUsersManager.openUser(peerID, attrs.userOverride && $eval(attrs.userOverride));
+ } else {
+ AppChatsManager.openChat(-peerID);
+ }
+ });
+ }
+
+ $scope.$watch(attrs.myPeerPhotolink, setPeerID);
+
+ if (attrs.watch) {
+ $scope.$on('user_update', function (e, updUserID) {
+ if (peerID == updUserID) {
+ if (!angular.equals(peer.photo && peer.photo.photo_small, peerPhoto)) {
+ updatePeerPhoto();
+ }
+ }
+ });
+ $scope.$on('chat_update', function (e, updChatID) {
+ if (peerID == -updChatID) {
+ if (!angular.equals(peer.photo && peer.photo.photo_small, peerPhoto)) {
+ updatePeerPhoto();
+ }
+ }
+ });
+ }
+
+ }
+ })
+
.directive('myAudioPlayer', function ($timeout, $q, Storage, AppAudioManager, AppDocsManager, ErrorService) {
var currentPlayer = false;
@@ -2382,3 +2484,42 @@ angular.module('myApp.directives', ['myApp.filters'])
}
})
+
+ .directive('myLabeledInput', function () {
+
+ return {
+ link: link
+ };
+
+ function link($scope, element, attrs) {
+ var input = $('.md-input:first', element);
+ var label = $('.md-input-label:first', element);
+ var isDisabled = input[0] && input[0].tagName == 'SPAN';
+ var focused = false;
+ var updateHasValueClass = function () {
+ if (isDisabled) {
+ element.toggleClass('md-input-has-value', input.html().length > 0);
+ } else {
+ element.toggleClass('md-input-has-value', focused || input.val().length > 0);
+ }
+ };
+
+ updateHasValueClass();
+ onContentLoaded(function () {
+ updateHasValueClass();
+ setZeroTimeout(function () {
+ element.addClass('md-input-animated');
+ });
+ });
+
+ if (!isDisabled) {
+ input.on('blur focus', function (e) {
+ focused = e.type == 'focus';
+ element.toggleClass('md-input-focused', focused);
+ updateHasValueClass();
+ });
+ }
+
+
+ };
+ })
diff --git a/app/js/lib/config.js b/app/js/lib/config.js
index 9d9b9f6f..c9bf26ec 100644
--- a/app/js/lib/config.js
+++ b/app/js/lib/config.js
@@ -84,7 +84,7 @@ Config.Schema.MTProto = {"constructors":[{"id":"481674261","predicate":"vector",
-Config.Schema.API = {"constructors":[{"id":"-1132882121","predicate":"boolFalse","params":[],"type":"Bool"},{"id":"-1720552011","predicate":"boolTrue","params":[],"type":"Bool"},{"id":"481674261","predicate":"vector","params":[],"type":"Vector t"},{"id":"-994444869","predicate":"error","params":[{"name":"code","type":"int"},{"name":"text","type":"string"}],"type":"Error"},{"id":"1450380236","predicate":"null","params":[],"type":"Null"},{"id":"2134579434","predicate":"inputPeerEmpty","params":[],"type":"InputPeer"},{"id":"2107670217","predicate":"inputPeerSelf","params":[],"type":"InputPeer"},{"id":"270785512","predicate":"inputPeerContact","params":[{"name":"user_id","type":"int"}],"type":"InputPeer"},{"id":"-1690012891","predicate":"inputPeerForeign","params":[{"name":"user_id","type":"int"},{"name":"access_hash","type":"long"}],"type":"InputPeer"},{"id":"396093539","predicate":"inputPeerChat","params":[{"name":"chat_id","type":"int"}],"type":"InputPeer"},{"id":"-1182234929","predicate":"inputUserEmpty","params":[],"type":"InputUser"},{"id":"-138301121","predicate":"inputUserSelf","params":[],"type":"InputUser"},{"id":"-2031530139","predicate":"inputUserContact","params":[{"name":"user_id","type":"int"}],"type":"InputUser"},{"id":"1700689151","predicate":"inputUserForeign","params":[{"name":"user_id","type":"int"},{"name":"access_hash","type":"long"}],"type":"InputUser"},{"id":"-208488460","predicate":"inputPhoneContact","params":[{"name":"client_id","type":"long"},{"name":"phone","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"}],"type":"InputContact"},{"id":"-181407105","predicate":"inputFile","params":[{"name":"id","type":"long"},{"name":"parts","type":"int"},{"name":"name","type":"string"},{"name":"md5_checksum","type":"string"}],"type":"InputFile"},{"id":"-1771768449","predicate":"inputMediaEmpty","params":[],"type":"InputMedia"},{"id":"767900285","predicate":"inputMediaUploadedPhoto","params":[{"name":"file","type":"InputFile"}],"type":"InputMedia"},{"id":"-1893027092","predicate":"inputMediaPhoto","params":[{"name":"id","type":"InputPhoto"}],"type":"InputMedia"},{"id":"-104578748","predicate":"inputMediaGeoPoint","params":[{"name":"geo_point","type":"InputGeoPoint"}],"type":"InputMedia"},{"id":"-1494984313","predicate":"inputMediaContact","params":[{"name":"phone_number","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"}],"type":"InputMedia"},{"id":"322623222","predicate":"inputMediaUploadedVideo","params":[{"name":"file","type":"InputFile"},{"name":"duration","type":"int"},{"name":"w","type":"int"},{"name":"h","type":"int"},{"name":"mime_type","type":"string"}],"type":"InputMedia"},{"id":"-1726817601","predicate":"inputMediaUploadedThumbVideo","params":[{"name":"file","type":"InputFile"},{"name":"thumb","type":"InputFile"},{"name":"duration","type":"int"},{"name":"w","type":"int"},{"name":"h","type":"int"},{"name":"mime_type","type":"string"}],"type":"InputMedia"},{"id":"2130852582","predicate":"inputMediaVideo","params":[{"name":"id","type":"InputVideo"}],"type":"InputMedia"},{"id":"480546647","predicate":"inputChatPhotoEmpty","params":[],"type":"InputChatPhoto"},{"id":"-1809496270","predicate":"inputChatUploadedPhoto","params":[{"name":"file","type":"InputFile"},{"name":"crop","type":"InputPhotoCrop"}],"type":"InputChatPhoto"},{"id":"-1293828344","predicate":"inputChatPhoto","params":[{"name":"id","type":"InputPhoto"},{"name":"crop","type":"InputPhotoCrop"}],"type":"InputChatPhoto"},{"id":"-457104426","predicate":"inputGeoPointEmpty","params":[],"type":"InputGeoPoint"},{"id":"-206066487","predicate":"inputGeoPoint","params":[{"name":"lat","type":"double"},{"name":"long","type":"double"}],"type":"InputGeoPoint"},{"id":"483901197","predicate":"inputPhotoEmpty","params":[],"type":"InputPhoto"},{"id":"-74070332","predicate":"inputPhoto","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputPhoto"},{"id":"1426648181","predicate":"inputVideoEmpty","params":[],"type":"InputVideo"},{"id":"-296249774","predicate":"inputVideo","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputVideo"},{"id":"342061462","predicate":"inputFileLocation","params":[{"name":"volume_id","type":"long"},{"name":"local_id","type":"int"},{"name":"secret","type":"long"}],"type":"InputFileLocation"},{"id":"1023632620","predicate":"inputVideoFileLocation","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputFileLocation"},{"id":"-1377390588","predicate":"inputPhotoCropAuto","params":[],"type":"InputPhotoCrop"},{"id":"-644787419","predicate":"inputPhotoCrop","params":[{"name":"crop_left","type":"double"},{"name":"crop_top","type":"double"},{"name":"crop_width","type":"double"}],"type":"InputPhotoCrop"},{"id":"1996904104","predicate":"inputAppEvent","params":[{"name":"time","type":"double"},{"name":"type","type":"string"},{"name":"peer","type":"long"},{"name":"data","type":"string"}],"type":"InputAppEvent"},{"id":"-1649296275","predicate":"peerUser","params":[{"name":"user_id","type":"int"}],"type":"Peer"},{"id":"-1160714821","predicate":"peerChat","params":[{"name":"chat_id","type":"int"}],"type":"Peer"},{"id":"-1432995067","predicate":"storage.fileUnknown","params":[],"type":"storage.FileType"},{"id":"8322574","predicate":"storage.fileJpeg","params":[],"type":"storage.FileType"},{"id":"-891180321","predicate":"storage.fileGif","params":[],"type":"storage.FileType"},{"id":"172975040","predicate":"storage.filePng","params":[],"type":"storage.FileType"},{"id":"-1373745011","predicate":"storage.filePdf","params":[],"type":"storage.FileType"},{"id":"1384777335","predicate":"storage.fileMp3","params":[],"type":"storage.FileType"},{"id":"1258941372","predicate":"storage.fileMov","params":[],"type":"storage.FileType"},{"id":"1086091090","predicate":"storage.filePartial","params":[],"type":"storage.FileType"},{"id":"-1278304028","predicate":"storage.fileMp4","params":[],"type":"storage.FileType"},{"id":"276907596","predicate":"storage.fileWebp","params":[],"type":"storage.FileType"},{"id":"2086234950","predicate":"fileLocationUnavailable","params":[{"name":"volume_id","type":"long"},{"name":"local_id","type":"int"},{"name":"secret","type":"long"}],"type":"FileLocation"},{"id":"1406570614","predicate":"fileLocation","params":[{"name":"dc_id","type":"int"},{"name":"volume_id","type":"long"},{"name":"local_id","type":"int"},{"name":"secret","type":"long"}],"type":"FileLocation"},{"id":"537022650","predicate":"userEmpty","params":[{"name":"id","type":"int"}],"type":"User"},{"id":"1879553105","predicate":"userSelf","params":[{"name":"id","type":"int"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"username","type":"string"},{"name":"phone","type":"string"},{"name":"photo","type":"UserProfilePhoto"},{"name":"status","type":"UserStatus"},{"name":"inactive","type":"Bool"}],"type":"User"},{"id":"-894214632","predicate":"userContact","params":[{"name":"id","type":"int"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"username","type":"string"},{"name":"access_hash","type":"long"},{"name":"phone","type":"string"},{"name":"photo","type":"UserProfilePhoto"},{"name":"status","type":"UserStatus"}],"type":"User"},{"id":"-640891665","predicate":"userRequest","params":[{"name":"id","type":"int"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"username","type":"string"},{"name":"access_hash","type":"long"},{"name":"phone","type":"string"},{"name":"photo","type":"UserProfilePhoto"},{"name":"status","type":"UserStatus"}],"type":"User"},{"id":"123533224","predicate":"userForeign","params":[{"name":"id","type":"int"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"username","type":"string"},{"name":"access_hash","type":"long"},{"name":"photo","type":"UserProfilePhoto"},{"name":"status","type":"UserStatus"}],"type":"User"},{"id":"-704549510","predicate":"userDeleted","params":[{"name":"id","type":"int"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"username","type":"string"}],"type":"User"},{"id":"1326562017","predicate":"userProfilePhotoEmpty","params":[],"type":"UserProfilePhoto"},{"id":"-715532088","predicate":"userProfilePhoto","params":[{"name":"photo_id","type":"long"},{"name":"photo_small","type":"FileLocation"},{"name":"photo_big","type":"FileLocation"}],"type":"UserProfilePhoto"},{"id":"164646985","predicate":"userStatusEmpty","params":[],"type":"UserStatus"},{"id":"-306628279","predicate":"userStatusOnline","params":[{"name":"expires","type":"int"}],"type":"UserStatus"},{"id":"9203775","predicate":"userStatusOffline","params":[{"name":"was_online","type":"int"}],"type":"UserStatus"},{"id":"-1683826688","predicate":"chatEmpty","params":[{"name":"id","type":"int"}],"type":"Chat"},{"id":"1855757255","predicate":"chat","params":[{"name":"id","type":"int"},{"name":"title","type":"string"},{"name":"photo","type":"ChatPhoto"},{"name":"participants_count","type":"int"},{"name":"date","type":"int"},{"name":"left","type":"Bool"},{"name":"version","type":"int"}],"type":"Chat"},{"id":"-83047359","predicate":"chatForbidden","params":[{"name":"id","type":"int"},{"name":"title","type":"string"},{"name":"date","type":"int"}],"type":"Chat"},{"id":"1661886910","predicate":"chatFull","params":[{"name":"id","type":"int"},{"name":"participants","type":"ChatParticipants"},{"name":"chat_photo","type":"Photo"},{"name":"notify_settings","type":"PeerNotifySettings"}],"type":"ChatFull"},{"id":"-925415106","predicate":"chatParticipant","params":[{"name":"user_id","type":"int"},{"name":"inviter_id","type":"int"},{"name":"date","type":"int"}],"type":"ChatParticipant"},{"id":"265468810","predicate":"chatParticipantsForbidden","params":[{"name":"chat_id","type":"int"}],"type":"ChatParticipants"},{"id":"2017571861","predicate":"chatParticipants","params":[{"name":"chat_id","type":"int"},{"name":"admin_id","type":"int"},{"name":"participants","type":"Vector"},{"name":"version","type":"int"}],"type":"ChatParticipants"},{"id":"935395612","predicate":"chatPhotoEmpty","params":[],"type":"ChatPhoto"},{"id":"1632839530","predicate":"chatPhoto","params":[{"name":"photo_small","type":"FileLocation"},{"name":"photo_big","type":"FileLocation"}],"type":"ChatPhoto"},{"id":"-2082087340","predicate":"messageEmpty","params":[{"name":"id","type":"int"}],"type":"Message"},{"id":"1450613171","predicate":"message","params":[{"name":"flags","type":"int"},{"name":"id","type":"int"},{"name":"from_id","type":"int"},{"name":"to_id","type":"Peer"},{"name":"date","type":"int"},{"name":"message","type":"string"},{"name":"media","type":"MessageMedia"}],"type":"Message"},{"id":"-1553471722","predicate":"messageForwarded","params":[{"name":"flags","type":"int"},{"name":"id","type":"int"},{"name":"fwd_from_id","type":"int"},{"name":"fwd_date","type":"int"},{"name":"from_id","type":"int"},{"name":"to_id","type":"Peer"},{"name":"date","type":"int"},{"name":"message","type":"string"},{"name":"media","type":"MessageMedia"}],"type":"Message"},{"id":"495384334","predicate":"messageService","params":[{"name":"flags","type":"int"},{"name":"id","type":"int"},{"name":"from_id","type":"int"},{"name":"to_id","type":"Peer"},{"name":"date","type":"int"},{"name":"action","type":"MessageAction"}],"type":"Message"},{"id":"1038967584","predicate":"messageMediaEmpty","params":[],"type":"MessageMedia"},{"id":"-926655958","predicate":"messageMediaPhoto","params":[{"name":"photo","type":"Photo"}],"type":"MessageMedia"},{"id":"-1563278704","predicate":"messageMediaVideo","params":[{"name":"video","type":"Video"}],"type":"MessageMedia"},{"id":"1457575028","predicate":"messageMediaGeo","params":[{"name":"geo","type":"GeoPoint"}],"type":"MessageMedia"},{"id":"1585262393","predicate":"messageMediaContact","params":[{"name":"phone_number","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"user_id","type":"int"}],"type":"MessageMedia"},{"id":"694364726","predicate":"messageMediaUnsupported","params":[{"name":"bytes","type":"bytes"}],"type":"MessageMedia"},{"id":"-1230047312","predicate":"messageActionEmpty","params":[],"type":"MessageAction"},{"id":"-1503425638","predicate":"messageActionChatCreate","params":[{"name":"title","type":"string"},{"name":"users","type":"Vector"}],"type":"MessageAction"},{"id":"-1247687078","predicate":"messageActionChatEditTitle","params":[{"name":"title","type":"string"}],"type":"MessageAction"},{"id":"2144015272","predicate":"messageActionChatEditPhoto","params":[{"name":"photo","type":"Photo"}],"type":"MessageAction"},{"id":"-1780220945","predicate":"messageActionChatDeletePhoto","params":[],"type":"MessageAction"},{"id":"1581055051","predicate":"messageActionChatAddUser","params":[{"name":"user_id","type":"int"}],"type":"MessageAction"},{"id":"-1297179892","predicate":"messageActionChatDeleteUser","params":[{"name":"user_id","type":"int"}],"type":"MessageAction"},{"id":"-1422222932","predicate":"dialog","params":[{"name":"peer","type":"Peer"},{"name":"top_message","type":"int"},{"name":"unread_count","type":"int"},{"name":"notify_settings","type":"PeerNotifySettings"}],"type":"Dialog"},{"id":"590459437","predicate":"photoEmpty","params":[{"name":"id","type":"long"}],"type":"Photo"},{"id":"582313809","predicate":"photo","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"user_id","type":"int"},{"name":"date","type":"int"},{"name":"caption","type":"string"},{"name":"geo","type":"GeoPoint"},{"name":"sizes","type":"Vector"}],"type":"Photo"},{"id":"236446268","predicate":"photoSizeEmpty","params":[{"name":"type","type":"string"}],"type":"PhotoSize"},{"id":"2009052699","predicate":"photoSize","params":[{"name":"type","type":"string"},{"name":"location","type":"FileLocation"},{"name":"w","type":"int"},{"name":"h","type":"int"},{"name":"size","type":"int"}],"type":"PhotoSize"},{"id":"-374917894","predicate":"photoCachedSize","params":[{"name":"type","type":"string"},{"name":"location","type":"FileLocation"},{"name":"w","type":"int"},{"name":"h","type":"int"},{"name":"bytes","type":"bytes"}],"type":"PhotoSize"},{"id":"-1056548696","predicate":"videoEmpty","params":[{"name":"id","type":"long"}],"type":"Video"},{"id":"948937617","predicate":"video","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"user_id","type":"int"},{"name":"date","type":"int"},{"name":"caption","type":"string"},{"name":"duration","type":"int"},{"name":"mime_type","type":"string"},{"name":"size","type":"int"},{"name":"thumb","type":"PhotoSize"},{"name":"dc_id","type":"int"},{"name":"w","type":"int"},{"name":"h","type":"int"}],"type":"Video"},{"id":"286776671","predicate":"geoPointEmpty","params":[],"type":"GeoPoint"},{"id":"541710092","predicate":"geoPoint","params":[{"name":"long","type":"double"},{"name":"lat","type":"double"}],"type":"GeoPoint"},{"id":"-486486981","predicate":"auth.checkedPhone","params":[{"name":"phone_registered","type":"Bool"},{"name":"phone_invited","type":"Bool"}],"type":"auth.CheckedPhone"},{"id":"-269659687","predicate":"auth.sentCode","params":[{"name":"phone_registered","type":"Bool"},{"name":"phone_code_hash","type":"string"},{"name":"send_call_timeout","type":"int"},{"name":"is_password","type":"Bool"}],"type":"auth.SentCode"},{"id":"-155815004","predicate":"auth.authorization","params":[{"name":"expires","type":"int"},{"name":"user","type":"User"}],"type":"auth.Authorization"},{"id":"-543777747","predicate":"auth.exportedAuthorization","params":[{"name":"id","type":"int"},{"name":"bytes","type":"bytes"}],"type":"auth.ExportedAuthorization"},{"id":"-1195615476","predicate":"inputNotifyPeer","params":[{"name":"peer","type":"InputPeer"}],"type":"InputNotifyPeer"},{"id":"423314455","predicate":"inputNotifyUsers","params":[],"type":"InputNotifyPeer"},{"id":"1251338318","predicate":"inputNotifyChats","params":[],"type":"InputNotifyPeer"},{"id":"-1540769658","predicate":"inputNotifyAll","params":[],"type":"InputNotifyPeer"},{"id":"-265263912","predicate":"inputPeerNotifyEventsEmpty","params":[],"type":"InputPeerNotifyEvents"},{"id":"-395694988","predicate":"inputPeerNotifyEventsAll","params":[],"type":"InputPeerNotifyEvents"},{"id":"1185074840","predicate":"inputPeerNotifySettings","params":[{"name":"mute_until","type":"int"},{"name":"sound","type":"string"},{"name":"show_previews","type":"Bool"},{"name":"events_mask","type":"int"}],"type":"InputPeerNotifySettings"},{"id":"-1378534221","predicate":"peerNotifyEventsEmpty","params":[],"type":"PeerNotifyEvents"},{"id":"1830677896","predicate":"peerNotifyEventsAll","params":[],"type":"PeerNotifyEvents"},{"id":"1889961234","predicate":"peerNotifySettingsEmpty","params":[],"type":"PeerNotifySettings"},{"id":"-1923214866","predicate":"peerNotifySettings","params":[{"name":"mute_until","type":"int"},{"name":"sound","type":"string"},{"name":"show_previews","type":"Bool"},{"name":"events_mask","type":"int"}],"type":"PeerNotifySettings"},{"id":"-860866985","predicate":"wallPaper","params":[{"name":"id","type":"int"},{"name":"title","type":"string"},{"name":"sizes","type":"Vector"},{"name":"color","type":"int"}],"type":"WallPaper"},{"id":"1997575642","predicate":"userFull","params":[{"name":"user","type":"User"},{"name":"link","type":"contacts.Link"},{"name":"profile_photo","type":"Photo"},{"name":"notify_settings","type":"PeerNotifySettings"},{"name":"blocked","type":"Bool"},{"name":"real_first_name","type":"string"},{"name":"real_last_name","type":"string"}],"type":"UserFull"},{"id":"-116274796","predicate":"contact","params":[{"name":"user_id","type":"int"},{"name":"mutual","type":"Bool"}],"type":"Contact"},{"id":"-805141448","predicate":"importedContact","params":[{"name":"user_id","type":"int"},{"name":"client_id","type":"long"}],"type":"ImportedContact"},{"id":"1444661369","predicate":"contactBlocked","params":[{"name":"user_id","type":"int"},{"name":"date","type":"int"}],"type":"ContactBlocked"},{"id":"1038193057","predicate":"contactSuggested","params":[{"name":"user_id","type":"int"},{"name":"mutual_contacts","type":"int"}],"type":"ContactSuggested"},{"id":"-748155807","predicate":"contactStatus","params":[{"name":"user_id","type":"int"},{"name":"status","type":"UserStatus"}],"type":"ContactStatus"},{"id":"909233996","predicate":"chatLocated","params":[{"name":"chat_id","type":"int"},{"name":"distance","type":"int"}],"type":"ChatLocated"},{"id":"322183672","predicate":"contacts.foreignLinkUnknown","params":[],"type":"contacts.ForeignLink"},{"id":"-1484775609","predicate":"contacts.foreignLinkRequested","params":[{"name":"has_phone","type":"Bool"}],"type":"contacts.ForeignLink"},{"id":"468356321","predicate":"contacts.foreignLinkMutual","params":[],"type":"contacts.ForeignLink"},{"id":"-768992160","predicate":"contacts.myLinkEmpty","params":[],"type":"contacts.MyLink"},{"id":"1818882030","predicate":"contacts.myLinkRequested","params":[{"name":"contact","type":"Bool"}],"type":"contacts.MyLink"},{"id":"-1035932711","predicate":"contacts.myLinkContact","params":[],"type":"contacts.MyLink"},{"id":"-322001931","predicate":"contacts.link","params":[{"name":"my_link","type":"contacts.MyLink"},{"name":"foreign_link","type":"contacts.ForeignLink"},{"name":"user","type":"User"}],"type":"contacts.Link"},{"id":"1871416498","predicate":"contacts.contacts","params":[{"name":"contacts","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.Contacts"},{"id":"-1219778094","predicate":"contacts.contactsNotModified","params":[],"type":"contacts.Contacts"},{"id":"-1387117803","predicate":"contacts.importedContacts","params":[{"name":"imported","type":"Vector"},{"name":"retry_contacts","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.ImportedContacts"},{"id":"471043349","predicate":"contacts.blocked","params":[{"name":"blocked","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.Blocked"},{"id":"-1878523231","predicate":"contacts.blockedSlice","params":[{"name":"count","type":"int"},{"name":"blocked","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.Blocked"},{"id":"1447681221","predicate":"contacts.suggested","params":[{"name":"results","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.Suggested"},{"id":"364538944","predicate":"messages.dialogs","params":[{"name":"dialogs","type":"Vector