add secret key status (wip)
This commit is contained in:
96
OpenKeychain/src/main/res/layout/key_health_card_content.xml
Normal file
96
OpenKeychain/src/main/res/layout/key_health_card_content.xml
Normal file
@@ -0,0 +1,96 @@
|
||||
<merge
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/CardViewHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Key Status" />
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/key_health_layout"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:background="?selectableItemBackground"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/key_health_icon"
|
||||
tools:src="@drawable/ic_check_white_24dp"
|
||||
tools:tint="@color/android_green_light"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/key_health_title"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
tools:text="Healthy" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/key_health_subtitle"
|
||||
tools:text="No key issues found." />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/key_health_expander"
|
||||
android:src="@drawable/ic_expand_more_black_24dp"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dip"
|
||||
android:id="@+id/key_health_divider"
|
||||
android:background="?android:attr/listDivider" />
|
||||
|
||||
<org.sufficientlysecure.keychain.ui.widget.KeyStatusList
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/key_health_status_list"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</merge>
|
||||
@@ -13,5 +13,4 @@
|
||||
android:name="org.sufficientlysecure.keychain.ui.LogDisplayFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</RelativeLayout>
|
||||
172
OpenKeychain/src/main/res/layout/subkey_status_card_content.xml
Normal file
172
OpenKeychain/src/main/res/layout/subkey_status_card_content.xml
Normal file
@@ -0,0 +1,172 @@
|
||||
<merge
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:showIn="@layout/tools_vertlin">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:id="@+id/cap_certify">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/cap_cert_icon"
|
||||
android:src="@drawable/ic_action_verified_cutout_24dp"
|
||||
tools:tint="@color/android_green_light"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?attr/colorHeaderText"
|
||||
android:text="@string/cap_title_confirm" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/cap_cert_text"
|
||||
tools:text="@string/cap_cert_ok" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/cap_cert_security_token"
|
||||
android:src="@drawable/yubi_icon_24dp"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginRight="6dp"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:id="@+id/cap_sign">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/cap_sign_icon"
|
||||
android:src="@drawable/ic_mode_edit_white_24dp"
|
||||
tools:tint="@color/android_green_light"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/cap_sign_caption"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?attr/colorHeaderText"
|
||||
android:text="@string/cap_title_sign" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/cap_sign_text"
|
||||
tools:text="@string/cap_sign_divert" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/cap_sign_security_token"
|
||||
android:src="@drawable/yubi_icon_24dp"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginRight="6dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:id="@+id/cap_decrypt">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/cap_decrypt_icon"
|
||||
android:src="@drawable/ic_lock_white_24dp"
|
||||
tools:tint="@color/android_red_light"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?attr/colorHeaderText"
|
||||
android:text="@string/cap_title_decrypt" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/cap_decrypt_text"
|
||||
tools:textColor="@color/android_red_light"
|
||||
tools:text="@string/cap_decrypt_unavailable" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/cap_decrypt_security_token"
|
||||
android:src="@drawable/yubi_icon_24dp"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginRight="6dp"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</merge>
|
||||
9
OpenKeychain/src/main/res/layout/tools_vertlin.xml
Normal file
9
OpenKeychain/src/main/res/layout/tools_vertlin.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<include layout="@layout/subkey_status_card_content" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -9,6 +9,19 @@
|
||||
android:paddingRight="16dp"
|
||||
android:paddingTop="16dp">
|
||||
|
||||
<org.sufficientlysecure.keychain.ui.widget.KeyHealthCardView
|
||||
android:id="@+id/subkey_status_card"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
card_view:cardBackgroundColor="?attr/colorCardViewBackground"
|
||||
card_view:cardElevation="2dp"
|
||||
card_view:cardUseCompatPadding="true"
|
||||
card_view:cardCornerRadius="4dp"
|
||||
/>
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:id="@+id/card_linked_ids"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -121,6 +121,7 @@
|
||||
<string name="menu_help">"Help"</string>
|
||||
<string name="menu_export_key">"Backup key"</string>
|
||||
<string name="menu_delete_key">"Delete key"</string>
|
||||
<string name="menu_status">"View key status"</string>
|
||||
<string name="menu_manage_keys">"Manage my keys"</string>
|
||||
<string name="menu_search">"Search"</string>
|
||||
<string name="menu_open">"Open"</string>
|
||||
@@ -1807,4 +1808,51 @@
|
||||
<string name="requested_key_label">Requested key:</string>
|
||||
<string name="error_preselect_sign_key">Error selecting key %s for signing!</string>
|
||||
<string name="error_preselect_encrypt_key">Error selecting key %s for encryption!</string>
|
||||
|
||||
<string name="title_key_status">"Key Status"</string>
|
||||
<string name="caption_secret_status">This key is yours. You can use it to:</string>
|
||||
|
||||
<string name="cap_title_confirm">Confirm other keys</string>
|
||||
<string name="cap_cert_ok">"This key can confirm other keys."</string>
|
||||
<string name="cap_cert_divert">"This key can confirm other keys, using a Security Token."</string>
|
||||
<string name="cap_cert_stripped">"This key is stripped, it can NOT confirm other keys."</string>
|
||||
<string name="cap_cert_unavailable">"This key is not configured to confirm keys!"</string>
|
||||
|
||||
<string name="cap_title_sign">Sign messages</string>
|
||||
<string name="cap_sign_ok">"This key can sign/send messages."</string>
|
||||
<string name="cap_sign_divert">"This key can sign/send messages, using a Security Token."</string>
|
||||
<string name="cap_sign_expired">"This key can't sign/send messages, because it is expired."</string>
|
||||
<string name="cap_sign_revoked">"This key can't sign/send messages, because it is revoked."</string>
|
||||
<string name="cap_sign_stripped">"This key can\'t sign/send messages on this device!"</string>
|
||||
<string name="cap_sign_unavailable">"This key is not configured to sign/send messages!"</string>
|
||||
<string name="cap_sign_insecure">"This key can sign/send messages, but not securely!"</string>
|
||||
|
||||
<string name="cap_title_decrypt">Decrypt messages</string>
|
||||
<string name="cap_decrypt_ok">"This key can decrypt/receive messages."</string>
|
||||
<string name="cap_decrypt_divert">"This key can decrypt/receive messages, using a Security Token."</string>
|
||||
<string name="cap_decrypt_expired">"This key can decrypt/receive messages, but is expired."</string>
|
||||
<string name="cap_decrypt_revoked">"This key can decrypt/receive messages, but is revoked."</string>
|
||||
<string name="cap_decrypt_stripped">"This key can\'t decrypt/receive messages on this device."</string>
|
||||
<string name="cap_decrypt_unavailable">"This key is not configured to decrypt/receive messages!"</string>
|
||||
<string name="cap_decrypt_insecure">"This key can decrypt/receive messages, but not securely!"</string>
|
||||
|
||||
<string name="key_health_ok_title">"Healthy"</string>
|
||||
<string name="key_health_ok_subtitle">"No key issues found."</string>
|
||||
<string name="key_health_divert_title">"Healthy (Security Token)"</string>
|
||||
<string name="key_health_divert_subtitle">"No key issues found."</string>
|
||||
<string name="key_health_expired_title">"Expired"</string>
|
||||
<string name="key_health_expired_subtitle">"This key should not be used anymore."</string>
|
||||
<string name="key_health_revoked_title">"Revoked"</string>
|
||||
<string name="key_health_revoked_subtitle">"This key can\'t be used anymore."</string>
|
||||
<string name="key_health_insecure_title">"Insecure"</string>
|
||||
<string name="key_health_insecure_subtitle">"This key is not secure!"</string>
|
||||
<string name="key_health_special_title">"Special"</string>
|
||||
<string name="key_health_special_subtitle">"Click for details"</string>
|
||||
<string name="key_health_sign_only_title">"Healthy (Signing Key)"</string>
|
||||
<string name="key_health_sign_only_subtitle">"Click for details"</string>
|
||||
<string name="key_health_stripped_title">"Healthy (Stripped)"</string>
|
||||
<string name="key_health_stripped_subtitle">"Click for details"</string>
|
||||
<string name="key_health_partial_stripped_title">"Healthy (Partially Stripped)"</string>
|
||||
<string name="key_health_partial_stripped_subtitle">"Click for details"</string>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user