Implement restore from seed UI

This commit is contained in:
Niels Andriesse
2019-07-17 10:26:06 +10:00
parent bac4b86ec3
commit 659d9e6a8f
4 changed files with 83 additions and 11 deletions

View File

@@ -40,7 +40,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
app:labeledEditText_background="@color/white"
app:labeledEditText_label="Display Name (Optional)"/>
app:labeledEditText_label="@string/activity_account_details_name_edit_text_label"/>
<com.dd.CircularProgressButton
android:id="@+id/nextButton"

View File

@@ -14,7 +14,8 @@
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:orientation="vertical">
android:orientation="vertical"
android:animateLayoutChanges="true">
<TextView
android:id="@+id/titleTextView"
@@ -26,12 +27,12 @@
android:textAlignment="center" />
<TextView
android:id="@+id/subtitleTextView"
android:id="@+id/seedExplanationTextView1"
style="@style/Signal.Text.Body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/activity_key_pair_subtitle"
android:layout_marginTop="24dp"
android:text="@string/activity_key_pair_seed_explanation_1"
android:textStyle="bold"
android:textAlignment="center" />
@@ -57,8 +58,38 @@
android:elevation="0dp"
android:stateListAnimator="@null" />
<TextView
android:id="@+id/seedExplanationTextView2"
style="@style/Signal.Text.Body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:visibility="gone"
android:text="@string/activity_key_pair_seed_explanation_2"
android:textAlignment="center" />
<org.thoughtcrime.securesms.components.LabeledEditText
android:id="@+id/mnemonicEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="20dp"
android:visibility="gone"
app:labeledEditText_background="@color/white"
app:labeledEditText_label="@string/activity_key_pair_mnemonic_edit_text_label"/>
<Button
android:id="@+id/toggleModeButton"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
android:textColor="@color/signal_primary"
android:text="@string/activity_key_pair_toggle_mode_button_title_1"
android:elevation="0dp"
android:stateListAnimator="@null" />
<com.dd.CircularProgressButton
android:id="@+id/registerButton"
android:id="@+id/registerOrRestoreButton"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="20dp"
@@ -69,7 +100,7 @@
app:cpb_colorProgress="@color/textsecure_primary"
app:cpb_cornerRadius="4dp"
app:cpb_selectorIdle="@drawable/progress_button_state"
app:cpb_textIdle="@string/activity_key_pair_register_button_title" />
app:cpb_textIdle="@string/activity_key_pair_register_or_restore_button_title_1" />
</LinearLayout>

View File

@@ -1526,13 +1526,19 @@
<!-- Account details activity -->
<string name="activity_account_details_title">Create Your Loki Messenger Account</string>
<string name="activity_account_details_subtitle">Enter a name to be shown to your contacts</string>
<string name="activity_account_details_name_edit_text_label">Display Name (Optional)</string>
<string name="activity_account_details_button_title">Next</string>
<!-- Key pair activity -->
<string name="activity_key_pair_title">Create Your Loki Messenger Account</string>
<string name="activity_key_pair_subtitle">Please save the seed below in a safe location. It can be used to restore your account if you lose access, or to migrate to a new device.</string>
<string name="activity_key_pair_seed_explanation_1">Please save the seed below in a safe location. It can be used to restore your account if you lose access, or to migrate to a new device.</string>
<string name="activity_key_pair_seed_explanation_2">Restore your account by entering your seed below</string>
<string name="activity_key_pair_copy_button_title">Copy</string>
<string name="activity_key_pair_mnemonic_edit_text_label">Your Seed</string>
<string name="activity_key_pair_toggle_mode_button_title_1">Restore Using Seed</string>
<string name="activity_key_pair_toggle_mode_button_title_2">Register a New Account</string>
<string name="activity_key_pair_mnemonic_copied_message">Copied to Clipboard</string>
<string name="activity_key_pair_register_button_title">Register</string>
<string name="activity_key_pair_register_or_restore_button_title_1">Register</string>
<string name="activity_key_pair_register_or_restore_button_title_2">Restore</string>
<!-- Settings activity -->
<string name="activity_settings_share_public_key_button_title">Share Public Key</string>
<string name="activity_settings_show_seed_button_title">Show Seed</string>