mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-06-24 18:10:58 +00:00
Add ability to assign icons
More progress Open IconPicker dialog on click Add ability to reset Fix changing icons Cleanup Add ability to assign icons after import PR fixes
This commit is contained in:
parent
b916697391
commit
1a6f85ccb6
20 changed files with 717 additions and 15 deletions
5
app/src/main/res/drawable/baseline_arrow_right_24.xml
Normal file
5
app/src/main/res/drawable/baseline_arrow_right_24.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<vector android:autoMirrored="true" android:height="24dp"
|
||||
android:tint="#000000" android:viewportHeight="24"
|
||||
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M10,17l5,-5 -5,-5v10z"/>
|
||||
</vector>
|
5
app/src/main/res/drawable/ic_icon_unselected.xml
Normal file
5
app/src/main/res/drawable/ic_icon_unselected.xml
Normal file
File diff suppressed because one or more lines are too long
9
app/src/main/res/drawable/ic_reset_image.xml
Normal file
9
app/src/main/res/drawable/ic_reset_image.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M120,360L120,120L200,120L200,254Q250,192 322.5,156Q395,120 480,120Q598,120 690.5,187Q783,254 820,360L733,360Q699,288 632,244Q565,200 480,200Q423,200 372.5,221Q322,242 284,280L360,280L360,360L120,360ZM240,720L720,720L570,520L450,680L360,560L240,720ZM200,880Q167,880 143.5,856.5Q120,833 120,800L120,480L200,480L200,800Q200,800 200,800Q200,800 200,800L760,800Q760,800 760,800Q760,800 760,800L760,480L840,480L840,800Q840,833 816.5,856.5Q793,880 760,880L200,880Z"/>
|
||||
</vector>
|
6
app/src/main/res/drawable/rounded_background.xml
Normal file
6
app/src/main/res/drawable/rounded_background.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="?attr/cardBackground"/>
|
||||
<corners android:radius="4dp"/>
|
||||
<padding android:left="8dp" android:top="8dp" android:right="8dp" android:bottom="8dp"/>
|
||||
</shape>
|
27
app/src/main/res/layout/activity_assign_icons.xml
Normal file
27
app/src/main/res/layout/activity_assign_icons.xml
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout 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"
|
||||
android:background="?attr/background"
|
||||
tools:context="com.beemdevelopment.aegis.AssignIconsActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/ThemeOverlay.Aegis.AppBar">
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorAppBar" />
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/list_assign_icons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars="vertical"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
98
app/src/main/res/layout/card_assign_icon_entry.xml
Normal file
98
app/src/main/res/layout/card_assign_icon_entry.xml
Normal file
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/rounded_background"
|
||||
android:elevation="4dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:background="?attr/cardBackground"
|
||||
android:id="@+id/rlCardEntry"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingStart="14dp">
|
||||
|
||||
<!-- Title -->
|
||||
<TextView
|
||||
android:id="@+id/tvIssuer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="?attr/primaryText"
|
||||
android:text="Issuer"
|
||||
android:textStyle="bold"
|
||||
android:textSize="18sp"/>
|
||||
<TextView
|
||||
android:id="@+id/tvAccountName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="@color/secondary_text"
|
||||
android:text="AccountName"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<!-- Row with 3 columns -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:id="@+id/ivOldImage"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
app:tint="?attr/iconColorPrimary"
|
||||
android:alpha="0.7"
|
||||
android:src="@drawable/baseline_arrow_right_24"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_gravity="center_vertical"/>
|
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:id="@+id/ivNewImage"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnReset"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:src="@drawable/ic_reset_image"
|
||||
app:tint="?attr/iconColorPrimary"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:paddingTop="12.5dp"
|
||||
android:paddingBottom="12.5dp"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:layout_gravity="center_vertical"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
|
@ -22,18 +22,25 @@
|
|||
app:showAsAction="always" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_delete"
|
||||
android:title="@string/action_delete"
|
||||
android:id="@+id/action_assign_icons"
|
||||
android:title="@string/assign_icons"
|
||||
android:orderInCategory="100"
|
||||
android:icon="@drawable/ic_delete_white"
|
||||
android:tint="?attr/iconColorPrimary"
|
||||
app:showAsAction="ifRoom"/>
|
||||
app:showAsAction="never"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_share_qr"
|
||||
android:title="@string/action_transfer"
|
||||
android:orderInCategory="100"
|
||||
android:orderInCategory="110"
|
||||
android:icon="@drawable/ic_qr_code_full"
|
||||
android:tint="?attr/iconColorPrimary"
|
||||
app:showAsAction="always"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_delete"
|
||||
android:title="@string/action_delete"
|
||||
android:orderInCategory="400"
|
||||
android:icon="@drawable/ic_delete_white"
|
||||
android:tint="?attr/iconColorPrimary"
|
||||
app:showAsAction="ifRoom"/>
|
||||
</menu>
|
|
@ -171,6 +171,7 @@
|
|||
<string name="set_up_biometric">Set up biometric unlock</string>
|
||||
<string name="copy">Copy</string>
|
||||
<string name="edit">Edit</string>
|
||||
<string name="assign_icons">Assign icons</string>
|
||||
<string name="favorite" comment="Verb">Favorite</string>
|
||||
<string name="unfavorite" comment="Verb">Unfavorite</string>
|
||||
<string name="error_all_caps">ERROR</string>
|
||||
|
@ -205,6 +206,7 @@
|
|||
<string name="discard_changes">Discard changes?</string>
|
||||
<string name="discard_changes_description">Your changes have not been saved</string>
|
||||
<string name="saving_profile_error">Error saving profile</string>
|
||||
<string name="saving_assign_icons_error">Error assigning icons</string>
|
||||
<string name="welcome">Welcome</string>
|
||||
<string name="app_description">Aegis is a free, secure and open source 2FA app</string>
|
||||
<string name="setup_completed">Setup completed</string>
|
||||
|
@ -461,6 +463,7 @@
|
|||
<string name="title_activity_scan_qr">Scan a QR code</string>
|
||||
<string name="title_activity_manage_slots">Manage key slots</string>
|
||||
<string name="title_activity_import_entries">Import entries</string>
|
||||
<string name="title_activity_assign_icons">Assign icons</string>
|
||||
<string name="dialog_wipe_entries_title">Wipe entries</string>
|
||||
<string name="dialog_wipe_entries_message">Your vault already contains entries. Do you want to remove these entries before importing this file?\n\n<b>In doing so, you will permanently lose access to the existing entries in the vault.</b></string>
|
||||
<string name="dialog_wipe_entries_checkbox">Wipe vault contents</string>
|
||||
|
@ -491,6 +494,8 @@
|
|||
<string name="importer_help_steam"><b>Steam v3.0 and newer are not supported</b>. Supply a copy of <b>/data/data/com.valvesoftware.android.steam.community/files/Steamguard-*.json</b>, located in the internal storage directory of Steam.</string>
|
||||
<string name="importer_help_totp_authenticator">Supply a TOTP Authenticator export file.</string>
|
||||
<string name="importer_help_winauth">Supply a WinAuth export file.</string>
|
||||
<string name="import_assign_icons_dialog_title">Assign icons</string>
|
||||
<string name="import_assign_icons_dialog_text">Do you want to assign icons to the imported entries?</string>
|
||||
|
||||
<string name="importer_encrypted_exception_google_authenticator">Encrypted entry was skipped: %s</string>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue