diff --git a/LICENSES/CC0-1.0.txt b/LICENSES/CC0-1.0.txt new file mode 100644 index 000000000..0e259d42c --- /dev/null +++ b/LICENSES/CC0-1.0.txt @@ -0,0 +1,121 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. diff --git a/app/src/main/java/com/aurora/store/compose/composables/LinkComposable.kt b/app/src/main/java/com/aurora/store/compose/composables/LinkComposable.kt index d33185dfd..72a045381 100644 --- a/app/src/main/java/com/aurora/store/compose/composables/LinkComposable.kt +++ b/app/src/main/java/com/aurora/store/compose/composables/LinkComposable.kt @@ -12,7 +12,10 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.requiredSize +import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.CircleShape import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text @@ -20,11 +23,16 @@ import androidx.compose.material3.VerticalDivider import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.res.painterResource import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.Preview +import coil3.compose.AsyncImage +import coil3.request.ImageRequest +import coil3.request.crossfade import com.aurora.store.R import com.aurora.store.data.model.Link @@ -40,13 +48,19 @@ fun LinkComposable(modifier: Modifier = Modifier, link: Link, onClick: () -> Uni modifier = modifier .fillMaxWidth() .clickable(onClick = onClick) - .padding(dimensionResource(R.dimen.padding_small)), + .padding(dimensionResource(R.dimen.padding_medium)), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(dimensionResource(R.dimen.margin_medium)) ) { - Icon( - painter = painterResource(link.icon), - contentDescription = null + AsyncImage( + model = ImageRequest.Builder(LocalContext.current) + .data(link.icon) + .build(), + contentDescription = null, + contentScale = ContentScale.Crop, + modifier = Modifier + .requiredSize(dimensionResource(R.dimen.icon_size_default)) + .clip(CircleShape) ) VerticalDivider( modifier = Modifier @@ -64,7 +78,7 @@ fun LinkComposable(modifier: Modifier = Modifier, link: Link, onClick: () -> Uni Text( text = link.subtitle, style = MaterialTheme.typography.bodySmall, - maxLines = 1, + maxLines = 2, overflow = TextOverflow.Ellipsis ) } diff --git a/app/src/main/java/com/aurora/store/compose/navigation/NavDisplay.kt b/app/src/main/java/com/aurora/store/compose/navigation/NavDisplay.kt index 5e6976a7f..cda586310 100644 --- a/app/src/main/java/com/aurora/store/compose/navigation/NavDisplay.kt +++ b/app/src/main/java/com/aurora/store/compose/navigation/NavDisplay.kt @@ -20,6 +20,7 @@ import androidx.navigation3.ui.NavDisplay import androidx.navigation3.ui.rememberSceneSetupNavEntryDecorator import com.aurora.store.MainActivity import com.aurora.store.R +import com.aurora.store.compose.ui.about.AboutScreen import com.aurora.store.compose.ui.accounts.AccountsScreen import com.aurora.store.compose.ui.blacklist.BlacklistScreen import com.aurora.store.compose.ui.details.AppDetailsScreen @@ -109,6 +110,10 @@ fun NavDisplay(startDestination: NavKey) { onNavigateToSplash = { activity?.startActivity(splashIntent) } ) } + + entry { + AboutScreen(onNavigateUp = { onNavigateUp() }) + } } ) } diff --git a/app/src/main/java/com/aurora/store/compose/navigation/Screen.kt b/app/src/main/java/com/aurora/store/compose/navigation/Screen.kt index e927638c7..91a2ec41a 100644 --- a/app/src/main/java/com/aurora/store/compose/navigation/Screen.kt +++ b/app/src/main/java/com/aurora/store/compose/navigation/Screen.kt @@ -44,4 +44,7 @@ sealed class Screen : NavKey, Parcelable { @Serializable data object Accounts : Screen() + + @Serializable + data object About : Screen() } diff --git a/app/src/main/java/com/aurora/store/compose/ui/about/AboutDialog.kt b/app/src/main/java/com/aurora/store/compose/ui/about/AboutDialog.kt new file mode 100644 index 000000000..a41250c5c --- /dev/null +++ b/app/src/main/java/com/aurora/store/compose/ui/about/AboutDialog.kt @@ -0,0 +1,40 @@ +/* + * SPDX-FileCopyrightText: 2025 The Calyx Institute + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +package com.aurora.store.compose.ui.about + +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import com.aurora.store.R + +/** + * Dialog for displaying information about Aurora Store + * @param onDismiss Callback on dismiss + */ +@Composable +fun AboutDialog(onDismiss: () -> Unit = {}) { + AlertDialog( + title = { Text(text = stringResource(R.string.about_aurora_store_title)) }, + text = { + Text(text = stringResource(R.string.about_aurora_store_summary)) + }, + onDismissRequest = onDismiss, + confirmButton = { + TextButton(onClick = onDismiss) { + Text(text = stringResource(android.R.string.ok)) + } + } + ) +} + +@Preview +@Composable +private fun AboutDialogPreview() { + AboutDialog() +} diff --git a/app/src/main/java/com/aurora/store/compose/ui/about/AboutScreen.kt b/app/src/main/java/com/aurora/store/compose/ui/about/AboutScreen.kt new file mode 100644 index 000000000..f1cd69286 --- /dev/null +++ b/app/src/main/java/com/aurora/store/compose/ui/about/AboutScreen.kt @@ -0,0 +1,172 @@ +/* + * SPDX-FileCopyrightText: 2025 The Calyx Institute + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +package com.aurora.store.compose.ui.about + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.requiredSize +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.res.stringArrayResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.tooling.preview.Preview +import coil3.compose.AsyncImage +import coil3.request.ImageRequest +import com.aurora.extensions.browse +import com.aurora.store.BuildConfig.VERSION_CODE +import com.aurora.store.BuildConfig.VERSION_NAME +import com.aurora.store.R +import com.aurora.store.compose.composables.LinkComposable +import com.aurora.store.compose.composables.TopAppBarComposable +import com.aurora.store.compose.ui.accounts.LogoutDialog +import com.aurora.store.data.model.Link +import com.aurora.store.data.providers.AccountProvider + +@Composable +fun AboutScreen(onNavigateUp: () -> Unit) { + var shouldShowAboutDialog by rememberSaveable { mutableStateOf(false) } + + if (shouldShowAboutDialog) { + AboutDialog(onDismiss = { shouldShowAboutDialog = false }) + } + + ScreenContent( + onNavigateUp = onNavigateUp, + onAboutAurora = { shouldShowAboutDialog = true } + ) +} + +@Composable +private fun ScreenContent(onNavigateUp: () -> Unit = {}, onAboutAurora: () -> Unit = {}) { + val context = LocalContext.current + + val linkURLS = stringArrayResource(R.array.link_urls) + val linkTitles = stringArrayResource(R.array.link_titles) + val linkSummary = stringArrayResource(R.array.link_subtitle) + val linkIcons = intArrayOf( + R.drawable.ic_about, + R.drawable.ic_help, + R.drawable.ic_xda, + R.drawable.ic_telegram, + R.drawable.ic_gitlab, + R.drawable.ic_fdroid, + R.drawable.ic_bitcoin_btc, + R.drawable.ic_bitcoin_bch, + R.drawable.ic_ethereum_eth, + R.drawable.ic_bhim, + R.drawable.ic_paypal, + R.drawable.ic_libera_pay, + ) + + val links = linkURLS.mapIndexed { index, url -> + Link( + id = index, + title = linkTitles[index], + subtitle = linkSummary[index], + url = url, + icon = linkIcons[index] + ) + } + + Scaffold( + topBar = { + TopAppBarComposable( + title = stringResource(R.string.title_about), + onNavigateUp = onNavigateUp + ) + } + ) { paddingValues -> + LazyColumn( + modifier = Modifier + .fillMaxSize() + .padding(paddingValues), + verticalArrangement = Arrangement.spacedBy(dimensionResource(R.dimen.margin_xxsmall)) + ) { + stickyHeader { + Surface(modifier = Modifier.fillMaxWidth()) { + BrandHeader() + } + } + items(items = links, key = { item -> item.id }) { link -> + LinkComposable( + link = link, + onClick = { + when (link.id) { + 0 -> onAboutAurora() + else -> context.browse(link.url) + } + } + ) + } + } + } +} + +@Composable +private fun BrandHeader() { + Column( + modifier = Modifier + .fillMaxWidth() + .padding(dimensionResource(R.dimen.margin_medium)), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.spacedBy(dimensionResource(R.dimen.margin_xxsmall)) + ) { + AsyncImage( + model = ImageRequest.Builder(LocalContext.current) + .data(R.mipmap.ic_launcher) + .build(), + contentDescription = null, + contentScale = ContentScale.Crop, + modifier = Modifier + .requiredSize(dimensionResource(R.dimen.icon_size)) + .clip(CircleShape) + ) + Text( + text = stringResource(R.string.app_name), + style = MaterialTheme.typography.titleLarge, + maxLines = 1, + overflow = TextOverflow.Ellipsis + ) + Text( + text = stringResource(R.string.version, VERSION_NAME, VERSION_CODE), + style = MaterialTheme.typography.bodyMedium, + maxLines = 1, + overflow = TextOverflow.Ellipsis + ) + Text( + text = stringResource(R.string.made_with_love, String(Character.toChars(0x2764))), + style = MaterialTheme.typography.bodyMedium, + maxLines = 1, + overflow = TextOverflow.Ellipsis + ) + } +} + +@Preview +@Composable +private fun AboutScreenPreview() { + ScreenContent() +} diff --git a/app/src/main/java/com/aurora/store/compose/ui/accounts/LogoutDialog.kt b/app/src/main/java/com/aurora/store/compose/ui/accounts/LogoutDialog.kt index 1ad8c603a..41bc9af42 100644 --- a/app/src/main/java/com/aurora/store/compose/ui/accounts/LogoutDialog.kt +++ b/app/src/main/java/com/aurora/store/compose/ui/accounts/LogoutDialog.kt @@ -15,8 +15,8 @@ import com.aurora.store.R /** * Dialog for confirming log out - * @param onConfirm Callback when the token has been entered - * @param onDismiss Callback when the dialog has been dismissed + * @param onConfirm Callback on confirmation + * @param onDismiss Callback on dismiss */ @Composable fun LogoutDialog(onConfirm: () -> Unit = {}, onDismiss: () -> Unit = {}) { diff --git a/app/src/main/java/com/aurora/store/view/epoxy/views/preference/LinkView.kt b/app/src/main/java/com/aurora/store/view/epoxy/views/preference/LinkView.kt deleted file mode 100644 index 2c5319b58..000000000 --- a/app/src/main/java/com/aurora/store/view/epoxy/views/preference/LinkView.kt +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Aurora Store - * Copyright (C) 2021, Rahul Kumar Patel - * - * 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 . - * - */ - -package com.aurora.store.view.epoxy.views.preference - -import android.content.Context -import android.util.AttributeSet -import coil3.load -import com.airbnb.epoxy.CallbackProp -import com.airbnb.epoxy.ModelProp -import com.airbnb.epoxy.ModelView -import com.aurora.extensions.hide -import com.aurora.extensions.show -import com.aurora.store.data.model.Link -import com.aurora.store.databinding.ViewLinkBinding -import com.aurora.store.view.epoxy.views.BaseModel -import com.aurora.store.view.epoxy.views.BaseView - -@ModelView( - autoLayout = ModelView.Size.MATCH_WIDTH_WRAP_HEIGHT, - baseModelClass = BaseModel::class -) -class LinkView @JvmOverloads constructor( - context: Context?, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : BaseView(context, attrs, defStyleAttr) { - - @ModelProp - fun link(link: Link) { - binding.line1.text = link.title - binding.line2.text = link.subtitle - - if (link.url.startsWith("http") || link.url.startsWith("upi")) { - binding.line3.hide() - } else { - binding.line3.show() - binding.line3.text = link.url - } - - binding.imgIcon.load(link.icon) - } - - @CallbackProp - fun click(onClickListener: OnClickListener?) { - binding.root.setOnClickListener(onClickListener) - } -} 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 deleted file mode 100644 index b089165d8..000000000 --- a/app/src/main/java/com/aurora/store/view/ui/about/AboutFragment.kt +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Aurora Store - * Copyright (C) 2021, Rahul Kumar Patel - * - * 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 . - * - */ - -package com.aurora.store.view.ui.about - -import android.os.Bundle -import android.view.View -import androidx.navigation.fragment.findNavController -import androidx.recyclerview.widget.LinearLayoutManager -import androidx.recyclerview.widget.RecyclerView -import coil3.load -import com.aurora.extensions.browse -import com.aurora.extensions.copyToClipBoard -import com.aurora.store.BuildConfig -import com.aurora.store.R -import com.aurora.store.data.model.Link -import com.aurora.store.databinding.FragmentAboutBinding -import com.aurora.store.view.epoxy.views.preference.LinkViewModel_ -import com.aurora.store.view.ui.commons.BaseFragment -import dagger.hilt.android.AndroidEntryPoint - -@AndroidEntryPoint -class AboutFragment : BaseFragment() { - - override fun onViewCreated(view: View, savedInstanceState: Bundle?) { - super.onViewCreated(view, savedInstanceState) - - // Toolbar - binding.toolbar.setNavigationOnClickListener { findNavController().navigateUp() } - - // About Details - binding.imgIcon.load(R.mipmap.ic_launcher) - binding.line2.text = view.context.getString( - R.string.version, - BuildConfig.VERSION_NAME, - BuildConfig.VERSION_CODE - ) - binding.line3.text = getString(R.string.made_with_love, String(Character.toChars(0x2764))) - - binding.epoxyRecycler.layoutManager = - LinearLayoutManager(view.context, RecyclerView.VERTICAL, false) - - updateController() - } - - private fun updateController() { - val linkURLS = resources.getStringArray(R.array.link_urls) - val linkTitles = resources.getStringArray(R.array.link_titles) - 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, - R.drawable.ic_gitlab, - R.drawable.ic_fdroid, - R.drawable.ic_bitcoin_btc, - R.drawable.ic_bitcoin_bch, - R.drawable.ic_ethereum_eth, - R.drawable.ic_bhim, - R.drawable.ic_paypal, - R.drawable.ic_libera_pay, - ) - - binding.epoxyRecycler.withModels { - for (i in linkURLS.indices) { - val link = Link( - id = i, - title = linkTitles[i], - subtitle = linkSummary[i], - url = linkURLS[i], - icon = linkIcons[i] - ) - add( - LinkViewModel_() - .id(i) - .link(link) - .click { _ -> - if (link.id == 0) { - findNavController().navigate(R.id.aboutDialog) - } else { - processUrl(link.url) - } - } - ) - } - } - } - - private fun processUrl(url: String) { - when { - url.startsWith("http") -> context?.browse(url) - url.startsWith("upi") -> context?.browse(url) - else -> context?.copyToClipBoard(url) - } - } -} diff --git a/app/src/main/java/com/aurora/store/view/ui/commons/MoreDialogFragment.kt b/app/src/main/java/com/aurora/store/view/ui/commons/MoreDialogFragment.kt index 90103d966..a5b107ba0 100644 --- a/app/src/main/java/com/aurora/store/view/ui/commons/MoreDialogFragment.kt +++ b/app/src/main/java/com/aurora/store/view/ui/commons/MoreDialogFragment.kt @@ -453,10 +453,10 @@ class MoreDialogFragment : DialogFragment() { icon = R.drawable.ic_menu_settings, destinationID = R.id.settingsFragment ), - ViewOption( + ComposeOption( title = R.string.title_about, icon = R.drawable.ic_menu_about, - destinationID = R.id.aboutFragment + screen = Screen.About ) ) } diff --git a/app/src/main/java/com/aurora/store/view/ui/splash/BaseFlavouredSplashFragment.kt b/app/src/main/java/com/aurora/store/view/ui/splash/BaseFlavouredSplashFragment.kt index 8c10fcfc7..d2f4b1d8a 100644 --- a/app/src/main/java/com/aurora/store/view/ui/splash/BaseFlavouredSplashFragment.kt +++ b/app/src/main/java/com/aurora/store/view/ui/splash/BaseFlavouredSplashFragment.kt @@ -92,7 +92,7 @@ abstract class BaseFlavouredSplashFragment : BaseFragment findNavController().navigate(R.id.settingsFragment) } - R.id.menu_about -> findNavController().navigate(R.id.aboutFragment) + R.id.menu_about -> requireContext().navigate(Screen.About) } true } diff --git a/app/src/main/res/drawable/ic_about.xml b/app/src/main/res/drawable/ic_about.xml new file mode 100644 index 000000000..541a61072 --- /dev/null +++ b/app/src/main/res/drawable/ic_about.xml @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/app/src/main/res/drawable/ic_help.xml b/app/src/main/res/drawable/ic_help.xml index f07e0d2bb..09e4af325 100644 --- a/app/src/main/res/drawable/ic_help.xml +++ b/app/src/main/res/drawable/ic_help.xml @@ -1,12 +1,24 @@ + + android:width="200dp" + android:height="200dp" + android:viewportWidth="1024" + android:viewportHeight="1024"> + + android:pathData="M768,938.7H170.7V170.7h426.7l170.7,170.7z" + android:fillColor="#42A5F5"/> + + + diff --git a/app/src/main/res/layout-land/fragment_about.xml b/app/src/main/res/layout-land/fragment_about.xml deleted file mode 100644 index 96b974ce6..000000000 --- a/app/src/main/res/layout-land/fragment_about.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml deleted file mode 100644 index d06e9945a..000000000 --- a/app/src/main/res/layout/fragment_about.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/view_link.xml b/app/src/main/res/layout/view_link.xml deleted file mode 100644 index 8161870aa..000000000 --- a/app/src/main/res/layout/view_link.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/navigation/mobile_navigation.xml b/app/src/main/res/navigation/mobile_navigation.xml index e9a47dc2e..2e118ffe2 100644 --- a/app/src/main/res/navigation/mobile_navigation.xml +++ b/app/src/main/res/navigation/mobile_navigation.xml @@ -56,11 +56,6 @@ android:name="com.aurora.store.view.ui.updates.UpdatesFragment" android:label="@string/title_updates" tools:layout="@layout/fragment_updates" /> -