mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 20:29:52 +01:00
Add a UI for changing the password
This commit is contained in:
128
briar-android/res/layout/activity_change_password.xml
Normal file
128
briar-android/res/layout/activity_change_password.xml
Normal file
@@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".android.ChangePasswordActivity">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/margin_activity_vertical"
|
||||
android:paddingEnd="@dimen/margin_activity_horizontal"
|
||||
android:paddingLeft="@dimen/margin_activity_horizontal"
|
||||
android:paddingRight="@dimen/margin_activity_horizontal"
|
||||
android:paddingStart="@dimen/margin_activity_horizontal"
|
||||
android:paddingTop="@dimen/margin_activity_vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/current_password_title"
|
||||
style="@style/BriarTextTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="@string/current_password"
|
||||
android:textSize="@dimen/text_size_medium"/>
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/current_password_entry_wrapper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/current_password_title"
|
||||
android:layout_centerHorizontal="true"
|
||||
app:errorEnabled="true">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/current_password_entry"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"/>
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/new_password_title"
|
||||
style="@style/BriarTextTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/current_password_entry_wrapper"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="@string/choose_new_password"
|
||||
android:textSize="@dimen/text_size_medium"/>
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/new_password_entry_wrapper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/new_password_title"
|
||||
android:layout_centerHorizontal="true"
|
||||
app:errorEnabled="true">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/new_password_entry"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"/>
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/new_password_confirm_title"
|
||||
style="@style/BriarTextTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/new_password_entry_wrapper"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="@string/confirm_new_password"
|
||||
android:textSize="@dimen/text_size_medium"/>
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/new_password_confirm_wrapper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/new_password_confirm_title"
|
||||
android:layout_centerHorizontal="true"
|
||||
app:errorEnabled="true">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/new_password_confirm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"/>
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<org.briarproject.android.util.StrengthMeter
|
||||
android:id="@+id/strength_meter"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/new_password_confirm_wrapper"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/change_password"
|
||||
style="@style/BriarButton.Default"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/strength_meter"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:enabled="false"
|
||||
android:text="@string/change_password"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_wheel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/change_password"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</ScrollView>
|
||||
@@ -139,6 +139,8 @@
|
||||
<string name="tor_mobile_setting">Connect via Tor</string>
|
||||
<string name="tor_mobile_setting_enabled">When using Wi-Fi or mobile data</string>
|
||||
<string name="tor_mobile_setting_disabled">Only when using Wi-Fi</string>
|
||||
<string name="security_settings_title">Security</string>
|
||||
<string name="change_password">Change password</string>
|
||||
<string name="panic_setting">Panic button setup</string>
|
||||
<string name="panic_setting_title">Panic button</string>
|
||||
<string name="panic_setting_hint">Configure how Briar will react when you use a panic button app</string>
|
||||
@@ -165,6 +167,10 @@
|
||||
<string name="purge_setting_summary">Delete your Briar account if a panic button is pressed. Caution: This will permanently delete your identities, contacts and messages</string>
|
||||
<string name="uninstall_setting_title">Uninstall Briar</string>
|
||||
<string name="uninstall_setting_summary">This requires manual confirmation in a panic event</string>
|
||||
<string name="current_password">Enter your current password:</string>
|
||||
<string name="choose_new_password">Choose your new password:</string>
|
||||
<string name="confirm_new_password">Confirm your new password:</string>
|
||||
<string name="password_changed">Password has been changed.</string>
|
||||
<string name="feedback_settings_title">Feedback</string>
|
||||
<string name="send_feedback">Send feedback</string>
|
||||
|
||||
|
||||
@@ -25,6 +25,20 @@
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/security_settings_title">
|
||||
|
||||
<Preference
|
||||
android:key="pref_key_change_password"
|
||||
android:title="@string/change_password">
|
||||
|
||||
<intent
|
||||
android:targetClass="org.briarproject.android.ChangePasswordActivity"
|
||||
android:targetPackage="org.briarproject"/>
|
||||
</Preference>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/panic_setting_title">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user