Merge remote-tracking branch 'origin/main'

This commit is contained in:
v228a 2025-02-19 18:58:41 +03:00
commit 9ea2a7720f
2 changed files with 169 additions and 1 deletions

View File

@ -0,0 +1,168 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout 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:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">
<TextView
android:id="@+id/error"
style="@style/Theme.UiTemplate.TextH5"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:textAlignment="center"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Something wrong. Try later" />
<androidx.constraintlayout.widget.Group
android:id="@+id/showState"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="fullname,photo2,position,lastEntry,scan,admin,entry_list" />
<TextView
android:id="@+id/textView"
style="@style/Theme.UiTemplate.TextH1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/profile_main_textview"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ProgressBar
android:id="@+id/loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.cardview.widget.CardView
android:id="@+id/photo2"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_margin="5dp"
android:elevation="10dp"
app:cardCornerRadius="12dp"
app:layout_constraintBottom_toTopOf="@+id/scan"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/photo"
style="@style/roundedImageView"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_marginBottom="16dp"
android:contentDescription="@null"
app:layout_constraintBottom_toTopOf="@+id/scan"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/avatars" />
</androidx.cardview.widget.CardView>
<TextView
android:id="@+id/fullname"
style="@style/Theme.UiTemplate.TextH3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="6dp"
android:textAlignment="center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/photo2"
tools:text="@tools:sample/full_names" />
<TextView
android:id="@+id/position"
style="@style/Theme.UiTemplate.TextH4"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
app:layout_constraintEnd_toEndOf="@+id/fullname"
app:layout_constraintStart_toStartOf="@+id/fullname"
app:layout_constraintTop_toBottomOf="@+id/fullname"
tools:text="@tools:sample/cities" />
<TextView
android:id="@+id/lastEntry"
style="@style/Theme.UiTemplate.TextH4_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="6dp"
app:layout_constraintEnd_toEndOf="@+id/fullname"
app:layout_constraintStart_toStartOf="@+id/fullname"
app:layout_constraintTop_toBottomOf="@+id/position"
tools:text="@tools:sample/date/hhmm" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/logout"
style="@style/Theme.UiTemplate.FAB.Gray"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/profile_refresh_button"
android:src="@drawable/ic_logout"
android:visibility="visible"
app:elevation="0dp"
app:layout_constraintBottom_toBottomOf="@+id/textView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/scan"
style="@style/Theme.UiTemplate.FAB.AccentColor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/profile_scan_button"
android:src="@drawable/ic_qr_code"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/admin"
style="@style/Theme.UiTemplate.FAB.AccentColor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/profile_admin_button"
android:src="@drawable/ic_admin"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/scan"
app:layout_constraintStart_toEndOf="@+id/entry_list"
app:maxImageSize="40dp"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/entry_list"
style="@style/Theme.UiTemplate.FAB.AccentColor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/profile_list_button"
android:src="@drawable/icon_list"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

View File

@ -16,7 +16,7 @@
<string name="login_login">Войти</string>
<string name="profile_refresh_button">Обновить</string>
<string name="profile_scan_button">Сканировать QR</string>
<string name="profile_main_textview">Домашняя страница</string>
<string name="profile_main_textview">Главная</string>
<string name="profile_admin_button">Страница администратора</string>
<string name="profile_list_button">история входов</string>
<string name="close_button">Закрыть</string>