Slightly improved disabled plain text chat room warning display

This commit is contained in:
Sylvain Berfini 2024-02-15 13:06:25 +01:00
parent 3882c57cfc
commit fc82c8bcf6
5 changed files with 98 additions and 13 deletions

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="256"
android:viewportHeight="256">
<path
android:pathData="M208,80L96,80L96,56a32,32 0,0 1,32 -32c15.37,0 29.2,11 32.16,25.59a8,8 0,0 0,15.68 -3.18C171.32,24.15 151.2,8 128,8A48.05,48.05 0,0 0,80 56L80,80L48,80A16,16 0,0 0,32 96L32,208a16,16 0,0 0,16 16L208,224a16,16 0,0 0,16 -16L224,96A16,16 0,0 0,208 80ZM208,208L48,208L48,96L208,96L208,208Z"
android:fillColor="#4e6074"/>
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="256"
android:viewportHeight="256">
<path
android:pathData="M208,76L100,76L100,56a28,28 0,0 1,28 -28c13.51,0 25.65,9.62 28.24,22.39a12,12 0,1 0,23.52 -4.78C174.87,21.5 153.1,4 128,4A52.06,52.06 0,0 0,76 56L76,76L48,76A20,20 0,0 0,28 96L28,208a20,20 0,0 0,20 20L208,228a20,20 0,0 0,20 -20L228,96A20,20 0,0 0,208 76ZM204,204L52,204L52,100L204,100Z"
android:fillColor="#4e6074"/>
</vector>

View file

@ -278,22 +278,12 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
<include
style="@style/default_text_style"
android:id="@+id/warning_disabled_not_secured"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="5dp"
android:text="@string/conversation_warning_disabled_because_not_secured"
android:textColor="?attr/color_warning_600"
android:textSize="16sp"
android:maxLines="2"
android:ellipsize="end"
android:drawableStart="@drawable/warning_circle"
android:drawableTint="?attr/color_warning_600"
android:drawablePadding="10dp"
layout="@layout/chat_conversation_send_area_disabled_unsecured_warning"
android:visibility="@{viewModel.isDisabledBecauseNotSecured ? View.VISIBLE : View.GONE, default=gone}"
app:layout_constraintBottom_toTopOf="@id/send_area"/>

View file

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="5dp"
android:paddingBottom="10dp">
<ImageView
android:id="@+id/background"
android:layout_width="0dp"
android:layout_height="0dp"
android:contentDescription="@null"
android:background="@drawable/shape_squircle_main2_200_chat_event_border"
app:layout_constraintWidth_max="300dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
<ImageView
android:id="@+id/icon"
android:layout_width="@dimen/small_icon_size"
android:layout_height="0dp"
android:layout_marginEnd="5dp"
android:paddingTop="3dp"
android:adjustViewBounds="true"
android:contentDescription="@null"
android:src="@drawable/lock_simple_open_bold"
app:tint="@color/orange_warning_600"
app:layout_constraintTop_toTopOf="@id/title"
app:layout_constraintBottom_toBottomOf="@id/title"
app:layout_constraintEnd_toStartOf="@id/title"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style_700"
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="@string/conversation_warning_disabled_because_not_secured_title"
android:layout_centerHorizontal="true"
android:layout_alignParentTop="true"
android:textSize="12sp"
android:textColor="@color/orange_warning_600"
app:layout_constraintWidth_max="280dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/subtitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:paddingBottom="5dp"
android:gravity="center"
android:text="@string/conversation_warning_disabled_because_not_secured_subtitle"
android:textColor="?attr/color_grey_400"
android:textSize="12sp"
app:layout_constraintWidth_max="300dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/title"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View file

@ -438,6 +438,8 @@
<string name="conversation_end_to_end_encrypted_bottom_sheet_title">Guaranteed confidentiality</string>
<string name="conversation_end_to_end_encrypted_bottom_sheet_message">Thanks to end-to-end encryption technology in &appName;, messages, calls and meetings confidentiality are guaranteed. No-one can decrypt exchanged data, not even ourselves.</string>
<string name="conversation_end_to_end_encrypted_bottom_sheet_link"><u>https://linphone.org/security</u></string>
<string name="conversation_warning_disabled_because_not_secured_title">This conversation is not encrypted!</string>
<string name="conversation_warning_disabled_because_not_secured_subtitle">This conversation was disabled because it is not encrypted. You can enable it back by switching your account profile mode from Secure to Interoperable.</string>
<string name="conversation_info_participants_list_title">Group members</string>
<string name="conversation_info_add_participants_label">Add participants</string>
@ -448,7 +450,6 @@
<string name="conversation_info_admin_menu_unset_participant_admin">Remove admin rights</string>
<string name="conversation_info_menu_go_to_contact">See contact profile</string>
<string name="conversation_info_menu_add_to_contacts">Add to contacts</string>
<string name="conversation_warning_disabled_because_not_secured">This conversation was disabled because it is not encrypted!</string>
<string name="conversation_event_conference_created">You have joined the group</string>
<string name="conversation_event_conference_destroyed">You have left the group</string>