diff --git a/app/src/main/java/com/aurora/store/view/ui/about/AboutDialog.kt b/app/src/main/java/com/aurora/store/view/ui/about/AboutDialog.kt new file mode 100644 index 000000000..041d8a93d --- /dev/null +++ b/app/src/main/java/com/aurora/store/view/ui/about/AboutDialog.kt @@ -0,0 +1,21 @@ +package com.aurora.store.view.ui.about + +import android.app.Dialog +import android.os.Bundle +import androidx.fragment.app.DialogFragment +import com.aurora.store.R +import com.google.android.material.dialog.MaterialAlertDialogBuilder +import dagger.hilt.android.AndroidEntryPoint + +@AndroidEntryPoint +class AboutDialog: DialogFragment() { + + override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { + return MaterialAlertDialogBuilder(requireContext()) + .setIcon(R.mipmap.ic_launcher) + .setTitle(R.string.about_aurora_store_title) + .setMessage(R.string.about_aurora_store_summary) + .setPositiveButton(getString(android.R.string.ok)) { _, _ -> dialog?.dismiss() } + .create() + } +} diff --git a/app/src/main/java/com/aurora/store/view/ui/about/AboutFragment.kt b/app/src/main/java/com/aurora/store/view/ui/about/AboutFragment.kt index 4bc63966c..12eeccc34 100644 --- a/app/src/main/java/com/aurora/store/view/ui/about/AboutFragment.kt +++ b/app/src/main/java/com/aurora/store/view/ui/about/AboutFragment.kt @@ -77,6 +77,7 @@ class AboutFragment : Fragment(R.layout.fragment_about) { val linkSummary = resources.getStringArray(R.array.link_subtitle) val linkIcons = intArrayOf( + R.drawable.ic_menu_about, R.drawable.ic_help, R.drawable.ic_xda, R.drawable.ic_telegram, @@ -103,7 +104,13 @@ class AboutFragment : Fragment(R.layout.fragment_about) { LinkViewModel_() .id(i) .link(link) - .click { _ -> processUrl(link.url) } + .click { _ -> + if (link.id == 0) { + findNavController().navigate(R.id.aboutDialog) + } else { + processUrl(link.url) + } + } ) } } diff --git a/app/src/main/java/com/aurora/store/view/ui/onboarding/WelcomeFragment.kt b/app/src/main/java/com/aurora/store/view/ui/onboarding/WelcomeFragment.kt index a09dcfbea..8d62ef86a 100644 --- a/app/src/main/java/com/aurora/store/view/ui/onboarding/WelcomeFragment.kt +++ b/app/src/main/java/com/aurora/store/view/ui/onboarding/WelcomeFragment.kt @@ -21,6 +21,7 @@ package com.aurora.store.view.ui.onboarding import android.os.Bundle import android.view.View +import androidx.navigation.fragment.findNavController import com.aurora.extensions.browse import com.aurora.store.R import com.aurora.store.data.model.Dash @@ -47,7 +48,13 @@ class WelcomeFragment : BaseFragment(R.layout.fragment_onboarding_welcome) { DashViewModel_() .id(it.id) .dash(it) - .click { _ -> requireContext().browse(it.url) } + .click { _ -> + if (it.id == 0) { + findNavController().navigate(R.id.aboutDialog) + } else { + requireContext().browse(it.url) + } + } ) } } @@ -57,34 +64,41 @@ class WelcomeFragment : BaseFragment(R.layout.fragment_onboarding_welcome) { return listOf( Dash( id = 0, + title = requireContext().getString(R.string.title_about), + subtitle = requireContext().getString(R.string.about_aurora_store_subtitle), + icon = R.drawable.ic_menu_about, + url = "https://auroraoss.com/" + ), + Dash( + id = 1, title = requireContext().getString(R.string.faqs_title), subtitle = requireContext().getString(R.string.faqs_subtitle), icon = R.drawable.ic_faq, url = "https://gitlab.com/AuroraOSS/AuroraStore/-/wikis/Frequently%20Asked%20Questions" ), Dash( - id = 1, + id = 2, title = requireContext().getString(R.string.source_code_title), subtitle = requireContext().getString(R.string.source_code_subtitle), icon = R.drawable.ic_code, url = "https://gitlab.com/AuroraOSS/AuroraStore/" ), Dash( - id = 2, + id = 3, title = requireContext().getString(R.string.menu_license), subtitle = requireContext().getString(R.string.license_subtitle), icon = R.drawable.ic_license, url = "https://gitlab.com/AuroraOSS/AuroraStore/-/blob/master/LICENSE" ), Dash( - id = 3, + id = 4, title = requireContext().getString(R.string.privacy_policy_title), subtitle = requireContext().getString(R.string.privacy_policy_subtitle), icon = R.drawable.ic_privacy, url = "https://gitlab.com/AuroraOSS/AuroraStore/-/blob/master/POLICY.md" ), Dash( - id = 4, + id = 5, title = requireContext().getString(R.string.menu_disclaimer), subtitle = requireContext().getString(R.string.disclaimer_subtitle), icon = R.drawable.ic_disclaimer, diff --git a/app/src/main/res/drawable/ic_menu_about.xml b/app/src/main/res/drawable/ic_menu_about.xml index 706d5f319..8ccc1f658 100644 --- a/app/src/main/res/drawable/ic_menu_about.xml +++ b/app/src/main/res/drawable/ic_menu_about.xml @@ -22,7 +22,7 @@ android:height="24dp" android:viewportWidth="960" android:viewportHeight="960" - android:tint="?attr/colorControlNormal"> + android:tint="@color/colorAccent"> diff --git a/app/src/main/res/navigation/mobile_navigation.xml b/app/src/main/res/navigation/mobile_navigation.xml index a41f2198d..29acdf1b6 100644 --- a/app/src/main/res/navigation/mobile_navigation.xml +++ b/app/src/main/res/navigation/mobile_navigation.xml @@ -492,4 +492,8 @@ + diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 21d04fbba..4087ec5fd 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -123,6 +123,7 @@ + https://auroraoss.com/ https://gitlab.com/AuroraOSS/AuroraStore/-/wikis/home "https://xdaforums.com/t/app-5-0-aurora-store-open-source-google-play-client.3739733/" "https://t.me/AuroraSupport" @@ -137,6 +138,7 @@ + @string/title_about @string/about_wiki_title @string/about_xda @string/about_telegram @@ -151,6 +153,7 @@ + @string/about_aurora_store_subtitle @string/about_wiki_summary @string/about_xda_summary @string/about_telegram_summary diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index daf936f19..1a954f653 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -426,6 +426,9 @@ v%1$s (%2$d) + About Aurora Store + Learn more about Aurora Store + Aurora Store enables you to search and download apps from the official Google Play store. You can check app descriptions, screenshots, updates, other users\' comments, and download the APK directly from Google Play to your device. To use Aurora Store, you need to have a Google Play account, and log in to your Google Play account when you first open and configure Aurora Store.\n\nUnlike a traditional app store, Aurora Store does not own, license or distribute any apps. All the apps, app descriptions, screenshots and other content in Aurora Store are directly accessed, downloaded and/or displayed from Google Play. Aurora Store works exactly like a door or a browser, allowing you to log in to your Google Play account and find the apps from Google Play.\n\nPlease note that Aurora Store does not have any approval, sponsorship or authorization from Google, Google Play, any apps downloaded through Aurora Store or any app developers; neither does Aurora Store have any affiliation, cooperation or connection with them. More