compose: accounts: Initial migration

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2025-09-17 17:18:12 +05:30
parent ea9827c6df
commit b993700f8f
15 changed files with 296 additions and 426 deletions

View File

@@ -1,28 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Aurora Store
~ Copyright (C) 2021, Rahul Kumar Patel <whyorean@gmail.com>
~
~ Aurora Store is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 2 of the License, or
~ (at your option) any later version.
~
~ Aurora Store is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with Aurora Store. If not, see <http://www.gnu.org/licenses/>.
~
~ SPDX-FileCopyrightText: Material Design Authors / Google LLC
~ SPDX-License-Identifier: Apache-2.0
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:fillColor="@android:color/white"
android:pathData="M4,18h2v2h12L18,4L6,4v2L4,6L4,3a1,1 0,0 1,1 -1h14a1,1 0,0 1,1 1v18a1,1 0,0 1,-1 1L5,22a1,1 0,0 1,-1 -1v-3zM6,11h7v2L6,13v3l-5,-4 5,-4v3z" />
</vector>

View File

@@ -1,147 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Aurora Store
~ Copyright (C) 2021, Rahul Kumar Patel <whyorean@gmail.com>
~
~ Aurora Store is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 2 of the License, or
~ (at your option) any later version.
~
~ Aurora Store is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with Aurora Store. If not, see <http://www.gnu.org/licenses/>.
~
-->
<LinearLayout 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:orientation="vertical"
tools:context=".view.ui.account.AccountFragment">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
app:navigationIcon="@drawable/ic_arrow_back"
app:title="@string/title_account_manager" />
<HorizontalScrollView
android:id="@+id/chip_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:paddingStart="@dimen/margin_small"
android:paddingTop="@dimen/margin_normal"
android:paddingEnd="@dimen/margin_small"
android:paddingBottom="@dimen/margin_small"
android:scrollbars="none">
<com.google.android.material.chip.ChipGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<com.google.android.material.chip.Chip
android:id="@+id/chip_tos"
style="@style/Widget.MaterialComponents.Chip.Action"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/menu_terms" />
<com.google.android.material.chip.Chip
android:id="@+id/chip_disclaimer"
style="@style/Widget.MaterialComponents.Chip.Action"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/menu_disclaimer" />
<com.google.android.material.chip.Chip
android:id="@+id/chip_license"
style="@style/Widget.MaterialComponents.Chip.Action"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/menu_license" />
</com.google.android.material.chip.ChipGroup>
</HorizontalScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:orientation="horizontal"
android:weightSum="2">
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/img_avatar"
android:layout_width="@dimen/icon_size_avatar"
android:layout_height="@dimen/icon_size_avatar"
android:layout_centerHorizontal="true"
app:srcCompat="@drawable/bg_placeholder" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/txt_name"
style="@style/TextAppearance.Aurora.Title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/img_avatar"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/margin_normal"
android:layout_marginBottom="@dimen/margin_small"
android:textAlignment="center"
tools:text="Aurora" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/txt_email"
style="@style/TextAppearance.Aurora.Line1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/txt_name"
android:layout_centerHorizontal="true"
android:textAlignment="center"
tools:text="auroraoss@gmail.com" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_horizontal|center_vertical"
android:orientation="vertical"
android:padding="@dimen/padding_large">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/txt_logout_action"
style="@style/AuroraTextStyle.Line1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/btn_logout"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/margin_normal"
android:text="@string/account_logout"
android:textAlignment="center" />
<com.aurora.store.view.custom.layouts.button.StateButton
android:id="@+id/btn_logout"
android:layout_width="@dimen/width_button"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
app:btnStateIcon="@drawable/ic_logout"
app:btnStateText="@string/action_logout" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>

View File

@@ -1,138 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Aurora Store
~ Copyright (C) 2021, Rahul Kumar Patel <whyorean@gmail.com>
~
~ Aurora Store is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 2 of the License, or
~ (at your option) any later version.
~
~ Aurora Store is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with Aurora Store. If not, see <http://www.gnu.org/licenses/>.
~
-->
<LinearLayout 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:orientation="vertical"
android:weightSum="2"
tools:context=".view.ui.account.AccountFragment">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
app:navigationIcon="@drawable/ic_arrow_back"
app:title="@string/title_account_manager" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<HorizontalScrollView
android:id="@+id/chip_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:paddingStart="@dimen/margin_small"
android:paddingEnd="@dimen/margin_small"
android:scrollbars="none">
<com.google.android.material.chip.ChipGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<com.google.android.material.chip.Chip
android:id="@+id/chip_tos"
style="@style/Widget.MaterialComponents.Chip.Action"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/menu_terms" />
<com.google.android.material.chip.Chip
android:id="@+id/chip_disclaimer"
style="@style/Widget.MaterialComponents.Chip.Action"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/menu_disclaimer" />
<com.google.android.material.chip.Chip
android:id="@+id/chip_license"
style="@style/Widget.MaterialComponents.Chip.Action"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/menu_license" />
</com.google.android.material.chip.ChipGroup>
</HorizontalScrollView>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/img_avatar"
android:layout_width="@dimen/icon_size_avatar"
android:layout_height="@dimen/icon_size_avatar"
android:layout_centerInParent="true"
app:srcCompat="@drawable/bg_placeholder" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/txt_name"
style="@style/TextAppearance.Aurora.Title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/img_avatar"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/margin_normal"
android:layout_marginBottom="@dimen/margin_small"
android:textAlignment="center"
tools:text="Aurora" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/txt_email"
style="@style/TextAppearance.Aurora.Line1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/txt_name"
android:layout_centerHorizontal="true"
android:textAlignment="center"
tools:text="auroraoss@gmail.com" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center_horizontal|center_vertical"
android:orientation="vertical"
android:padding="@dimen/padding_large">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/txt_logout_action"
style="@style/AuroraTextStyle.Line1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/btn_logout"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/margin_normal"
android:text="@string/account_logout"
android:textAlignment="center" />
<com.aurora.store.view.custom.layouts.button.StateButton
android:id="@+id/btn_logout"
android:layout_width="@dimen/width_button"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
app:btnStateIcon="@drawable/ic_logout"
app:btnStateText="@string/action_logout" />
</RelativeLayout>
</LinearLayout>

View File

@@ -76,11 +76,6 @@
android:name="com.aurora.store.view.ui.commons.FavouriteFragment"
android:label="@string/title_favourites_manager"
tools:layout="@layout/fragment_generic_with_toolbar" />
<fragment
android:id="@+id/accountFragment"
android:name="com.aurora.store.view.ui.account.AccountFragment"
android:label="@string/title_account_manager"
tools:layout="@layout/fragment_account" />
<fragment
android:id="@+id/settingsFragment"
android:name="com.aurora.store.view.ui.preferences.SettingsFragment"
@@ -306,17 +301,6 @@
android:id="@+id/aboutDialog"
android:name="com.aurora.store.view.ui.about.AboutDialog"
android:label="@string/title_about" />
<dialog
android:id="@+id/logoutDialog"
android:name="com.aurora.store.view.ui.account.LogoutDialog"
android:label="@string/action_logout">
<action
android:id="@+id/action_logoutDialog_to_splashFragment"
app:destination="@id/splashFragment"
app:launchSingleTop="true"
app:popUpTo="@id/mobile_navigation"
app:popUpToInclusive="true" />
</dialog>
<dialog
android:id="@+id/proxyURLDialog"
android:name="com.aurora.store.view.ui.preferences.network.ProxyURLDialog"