Skip to content

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
Develop

See merge request papers/airgap/airgap-vault!195
  • Loading branch information
godenzim committed Sep 1, 2020
2 parents eea53b2 + 7406853 commit 6b5aec1
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 41 deletions.
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ dependencies {
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation project(':capacitor-cordova-android-plugins')

implementation 'com.google.android.material:material:1.2.0'
implementation 'com.scottyab:rootbeer-lib:0.0.7'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ class Storage(private val context: Context, private val storageAlias: String, pr
val passwordText = editView.findViewById<EditText>(R.id.password)
val confirmText = editView.findViewById<EditText>(R.id.password_confirmation)

val dialog = AlertDialog.Builder(context, R.style.AirgapAlertDialogStyle).apply {
val dialog = AlertDialog.Builder(context, R.style.AirGapAlertDialogStyle).apply {
setTitle(title)
setMessage(message)

Expand Down Expand Up @@ -331,7 +331,7 @@ class Storage(private val context: Context, private val storageAlias: String, pr
cancel: () -> Unit = {}
) {
(context as? Activity)?.runOnUiThread {
val dialog = AlertDialog.Builder(context, R.style.AirgapAlertDialogStyle).apply {
val dialog = AlertDialog.Builder(context, R.style.AirGapAlertDialogStyle).apply {
setTitle(title)

val editView = LayoutInflater.from(context).inflate(R.layout.alert_input_dialog, null)
Expand Down
21 changes: 10 additions & 11 deletions android/app/src/main/res/layout/alert_input_dialog.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.design.widget.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AirgapAlertDialogStyle"
android:hint="@string/password_input_alert_hint"
android:textColorHint="@android:color/darker_gray"
>
android:theme="@style/AirGapAlertDialogStyle"
android:paddingStart="20dp"
android:paddingEnd="20dp">

<android.support.design.widget.TextInputEditText
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/password"
android:inputType="textPassword"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:fontFamily="sans-serif"
android:hint="@string/password_input_alert_hint"/>
android:fontFamily="sans-serif" />

</android.support.design.widget.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>

</LinearLayout>
39 changes: 19 additions & 20 deletions android/app/src/main/res/layout/alert_setup_dialog.xml
Original file line number Diff line number Diff line change
@@ -1,44 +1,43 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.design.widget.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/password_input_alert_hint"
android:textColorHint="@android:color/darker_gray"
android:theme="@style/AirgapAlertDialogStyle"
>
android:theme="@style/AirGapAlertDialogStyle"
android:paddingStart="20dp"
android:paddingEnd="20dp">

<android.support.design.widget.TextInputEditText
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/password"
android:inputType="textPassword"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:fontFamily="sans-serif"
android:hint="@string/password_input_alert_hint"/>
android:fontFamily="sans-serif" />

</android.support.design.widget.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>

<android.support.design.widget.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/password_input_alert_confirmation_hint"
android:textColorHint="@android:color/darker_gray"
android:theme="@style/AirgapAlertDialogStyle"
>
<android.support.design.widget.TextInputEditText
android:theme="@style/AirGapAlertDialogStyle"
android:paddingStart="20dp"
android:paddingEnd="20dp">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/password_confirmation"
android:inputType="textPassword"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:fontFamily="sans-serif"
android:hint="@string/password_input_alert_confirmation_hint"/>
android:fontFamily="sans-serif" />

</android.support.design.widget.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>

</LinearLayout>
13 changes: 6 additions & 7 deletions android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar.Bridge">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
Expand All @@ -11,7 +11,7 @@
<item name="android:textColorHint">#b4b4b4</item>
</style>

<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.NoActionBar">
<style name="AppTheme.NoActionBar" parent="Theme.MaterialComponents.Light.NoActionBar.Bridge">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:background">@null</item>
Expand All @@ -22,18 +22,17 @@
<item name="android:background">@drawable/screen</item>
</style>

<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.MaterialComponents.Dark.ActionBar" />

<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.MaterialComponents.Light" />

<style name="AirgapAlertDialogStyle" parent="Theme.AppCompat.Light.Dialog.Alert">
<style name="AirGapAlertDialogStyle" parent="Theme.MaterialComponents.Light.Dialog.Alert.Bridge">
<!-- Used for the buttons -->
<item name="colorAccent">#F7296E</item>
<!-- Used for the title and text -->
<item name="android:textColorPrimary">#838383</item>
<!-- Used for the background -->
<item name="android:background">#FAFAFA</item>
<item name="android:textColorHint">#b4b4b4</item>
<item name="android:textColor">#202020</item>>
</style>

</resources>
2 changes: 1 addition & 1 deletion src/app/pages/tab-settings/tab-settings.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<ion-label>{{ 'tab-settings.qr.settings_label' | translate }}</ion-label>
</ion-list-header>
<ion-item (click)="pasteClipboard()">
<ion-icon name="return-right" slot="start"></ion-icon>
<ion-icon name="return-up-forward-outline" slot="start"></ion-icon>
{{ 'tab-settings.paste-from-clipboard_label' | translate }}
</ion-item>
<ion-item>
Expand Down

0 comments on commit 6b5aec1

Please sign in to comment.