Supported 2SV setup on mobile
This commit is contained in:
parent
939ab4786c
commit
cc1a771237
@ -58,8 +58,10 @@
|
||||
"settings_modal_set_password": "Set Additional Password",
|
||||
"settings_modal_change_password": "Change password",
|
||||
"settings_modal_disable_password": "Turn off",
|
||||
"settings_modal_disable_password_mobile": "Turn password off",
|
||||
"settings_modal_password_email_pending": "Click the link in {email} to complete Two-Step Verification setup.",
|
||||
"settings_modal_password_email_pending_cancel": "Abort",
|
||||
"settings_modal_password_email_pending_cancel_mobile": "Abort Password",
|
||||
|
||||
"password_delete_title": "Turn Password Off",
|
||||
"password_change_title": "Two-Step Verification",
|
||||
|
@ -823,6 +823,10 @@ a.tg_radio_on:hover i.icon-radio {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.nano-content {
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
/* Login page */
|
||||
.login_head_bg {
|
||||
background: #5682a3;
|
||||
|
@ -1474,6 +1474,9 @@ a.im_message_fwd_author {
|
||||
}
|
||||
}
|
||||
}
|
||||
.sessions_modal_wrap .mobile_modal_body {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.mobile_modal {
|
||||
.peer_select_modal_wrap {
|
||||
|
70
app/partials/mobile/password_update_modal.html
Normal file
70
app/partials/mobile/password_update_modal.html
Normal file
@ -0,0 +1,70 @@
|
||||
<div class="username_edit_modal_wrap">
|
||||
|
||||
<div class="tg_page_head tg_modal_head">
|
||||
<div class="navbar navbar-static-top navbar-inverse">
|
||||
<div class="container">
|
||||
|
||||
<div class="navbar-header">
|
||||
|
||||
<ul class="nav navbar-nav navbar-quick-nav">
|
||||
<li class="navbar-quick-right">
|
||||
<a ng-class="{disabled: passwordSettings.updating}" ng-click="updatePassword()" ng-disabled="passwordSettings.updating" ng-switch="action">
|
||||
<span ng-switch-when="disable" ng-bind="passwordSettings.updating ? 'password_delete_active' : 'password_delete_submit' | i18n"></span>
|
||||
<span ng-switch-default ng-bind="passwordSettings.updating ? 'password_create_active' : 'password_create_submit' | i18n"></span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a ng-click="$dismiss()" class="navbar-quick-media-back">
|
||||
<i class="icon icon-back"></i>
|
||||
<div class="navbar-quick-back-title">
|
||||
<h4 ng-switch="action">
|
||||
<my-i18n ng-switch-when="disable" msgid="password_delete_title"></my-i18n>
|
||||
<my-i18n ng-switch-default msgid="password_change_title"></my-i18n>
|
||||
</h4>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<form class="modal_simple_form" ng-submit="updatePassword()" my-vertical-position="0.3">
|
||||
|
||||
<div ng-if="password._ != 'account.noPassword'" class="md-input-group" ng-class="{'md-input-error': passwordSettings.error_field == 'cur_password'}" my-labeled-input>
|
||||
<label class="md-input-label" my-i18n="password_current_placeholder"></label>
|
||||
<input class="md-input" my-focused type="password" ng-model="passwordSettings.cur_password" name="cur_password" my-focus-on="cur_password_focus" />
|
||||
</div>
|
||||
|
||||
<div ng-if="action != 'disable'" class="md-input-group md-input-grouped" ng-class="{'md-input-error': passwordSettings.error_field == 'new_password'}" my-labeled-input>
|
||||
<label class="md-input-label" my-i18n="password_new_placeholder"></label>
|
||||
<input class="md-input" type="password" ng-model="passwordSettings.new_password" name="new_password" my-focus-on="new_password_focus" />
|
||||
</div>
|
||||
|
||||
<div ng-if="action != 'disable'" class="md-input-group" ng-class="{'md-input-error': passwordSettings.confirm_password && passwordSettings.new_password && passwordSettings.confirm_password != passwordSettings.new_password}" my-labeled-input>
|
||||
<label class="md-input-label" my-i18n="password_confirm_placeholder"></label>
|
||||
<input class="md-input" type="password" ng-model="passwordSettings.confirm_password" name="confirm_password" my-focus-on="confirm_password_focus" />
|
||||
</div>
|
||||
|
||||
<div ng-if="action != 'disable'" class="md-input-group" my-labeled-input>
|
||||
<label class="md-input-label" my-i18n="password_hint_placeholder"></label>
|
||||
<input class="md-input" type="text" ng-model="passwordSettings.hint" name="hint" />
|
||||
</div>
|
||||
|
||||
<div ng-if="action != 'disable'" class="md_simple_form_description" my-i18n="password_create_description"></div>
|
||||
|
||||
<div ng-if="action != 'disable'" class="md-input-group" ng-class="{'md-input-error': passwordSettings.error_field == 'email'}" my-labeled-input>
|
||||
<label class="md-input-label" my-i18n="password_email_placeholder"></label>
|
||||
<input class="md-input" type="text" ng-model="passwordSettings.email" name="email" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
76
app/partials/mobile/sessions_list_modal.html
Normal file
76
app/partials/mobile/sessions_list_modal.html
Normal file
@ -0,0 +1,76 @@
|
||||
<div class="sessions_modal_wrap">
|
||||
|
||||
<div class="tg_page_head tg_modal_head">
|
||||
<div class="navbar navbar-static-top navbar-inverse">
|
||||
<div class="container">
|
||||
|
||||
<div class="navbar-header">
|
||||
<ul class="nav navbar-nav navbar-quick-nav">
|
||||
<li>
|
||||
<a ng-click="$dismiss()" class="navbar-quick-media-back">
|
||||
<i class="icon icon-back"></i>
|
||||
<div class="navbar-quick-back-title">
|
||||
<h4 my-i18n="sessions_modal_title"></h4>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-body mobile_modal_body">
|
||||
|
||||
<div my-sessions-list class="sessions_modal_col">
|
||||
|
||||
<div class="sessions_wrap nano" my-infinite-scroller>
|
||||
<div class="sessions_scrollable_wrap nano-content" ng-switch="!sessionsLoaded">
|
||||
|
||||
<div ng-switch-when="true" class="sessions_modal_loading" my-vertical-position="0.2" padding="true" my-i18n="sessions_modal_loading">
|
||||
<my-i18n-param name="dots">
|
||||
<span my-loading-dots></span>
|
||||
</my-i18n-param>
|
||||
</div>
|
||||
|
||||
<ul ng-switch-default class="sessions_modal_sessions_list nav nav-pills nav-stacked">
|
||||
|
||||
<li class="sessions_modal_session_wrap clearfix" ng-repeat="authorization in authorizations | limitTo: slice.limit track by authorization.hash">
|
||||
<div ng-if="authorization.current">
|
||||
<h5 class="sessions_modal_sessions_header" my-i18n="sessions_modal_current_session"></h5>
|
||||
</div>
|
||||
<div class="sessions_modal_session">
|
||||
<div class="session_meta_wrap pull-right">
|
||||
<div class="session_active_date" ng-switch="authorization.current">
|
||||
<span ng-switch-when="true" class="session_active_date_online" my-i18n="sessions_modal_session_online"></span>
|
||||
<span ng-switch-default ng-bind="authorization.date_active | dateOrTime"></span>
|
||||
</div>
|
||||
|
||||
<a ng-if="!authorization.current" class="session_terminate_btn btn btn-md" ng-click="terminateSession(authorization.hash)" my-i18n="sessions_modal_terminate_one"></a>
|
||||
</div>
|
||||
|
||||
<div class="sessions_modal_session_app" ng-bind="authorization.app_name + ' ' + authorization.app_version"></div>
|
||||
<div class="sessions_modal_session_device" ng-bind="authorization.device_model + ', ' + authorization.platform + ' ' + authorization.system_version"></div>
|
||||
<div class="sessions_modal_session_location" ng-bind="authorization.ip + ' - ' + authorization.country"></div>
|
||||
</div>
|
||||
<div ng-if="authorization.current && authorizations.length > 1">
|
||||
<div class="sessions_modal_terminate_all_wrap">
|
||||
<button class="btn btn-md btn-md-danger" ng-click="terminateAllSessions()" my-i18n="sessions_modal_terminate_all"></button>
|
||||
</div>
|
||||
|
||||
<h5 class="sessions_modal_sessions_header" my-i18n="sessions_modal_active_sessions"></h5>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
@ -21,7 +21,17 @@
|
||||
<a ng-click="changeUsername()" my-i18n="settings_modal_edit_username"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a ng-click="terminateSessions()" my-i18n="settings_modal_terminate_sessions"></a>
|
||||
<a ng-if="password._ == 'account.noPassword' && password.email_unconfirmed_pattern.length" ng-click="changePassword({action: 'cancel_email'})" my-i18n="settings_modal_password_email_pending_cancel_mobile">
|
||||
</a>
|
||||
<a ng-if="password._ == 'account.noPassword' && !password.email_unconfirmed_pattern" ng-click="changePassword({action: 'create'})" my-i18n="settings_modal_set_password"></a>
|
||||
<a ng-if="password._ == 'account.password'" ng-click="changePassword({action: 'change'})" my-i18n="settings_modal_change_password"></a>
|
||||
</li>
|
||||
<li ng-if="password._ == 'account.password'">
|
||||
<a ng-click="changePassword({action: 'disable'})" my-i18n="settings_modal_disable_password_mobile"></a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a ng-click="showSessions()" my-i18n="settings_modal_active_sessions"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user