From f8ef0f143b148a207defc443549c29696d63418c Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 6 Jan 2024 13:33:56 -0500 Subject: [PATCH] Add link to storage guide during onboarding step --- .../presentation/more/onboarding/GuidesStep.kt | 1 + .../presentation/more/onboarding/StorageStep.kt | 17 +++++++++++++++++ .../commonMain/resources/MR/base/strings.xml | 2 ++ 3 files changed, 20 insertions(+) diff --git a/app/src/main/java/eu/kanade/presentation/more/onboarding/GuidesStep.kt b/app/src/main/java/eu/kanade/presentation/more/onboarding/GuidesStep.kt index 3f44f51aa..ca4485966 100644 --- a/app/src/main/java/eu/kanade/presentation/more/onboarding/GuidesStep.kt +++ b/app/src/main/java/eu/kanade/presentation/more/onboarding/GuidesStep.kt @@ -41,6 +41,7 @@ internal class GuidesStep( } HorizontalDivider( + modifier = Modifier.padding(vertical = 8.dp), color = MaterialTheme.colorScheme.onPrimaryContainer, ) diff --git a/app/src/main/java/eu/kanade/presentation/more/onboarding/StorageStep.kt b/app/src/main/java/eu/kanade/presentation/more/onboarding/StorageStep.kt index cb91daab5..fa1e73fe4 100644 --- a/app/src/main/java/eu/kanade/presentation/more/onboarding/StorageStep.kt +++ b/app/src/main/java/eu/kanade/presentation/more/onboarding/StorageStep.kt @@ -5,6 +5,7 @@ import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable @@ -14,6 +15,7 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.platform.LocalUriHandler import androidx.compose.ui.unit.dp import eu.kanade.presentation.more.settings.screen.SettingsDataScreen import eu.kanade.tachiyomi.util.system.toast @@ -38,6 +40,8 @@ internal class StorageStep : OnboardingStep { @Composable override fun Content() { val context = LocalContext.current + val handler = LocalUriHandler.current + val pickStorageLocation = SettingsDataScreen.storageLocationPicker(storagePref) Column( @@ -64,6 +68,19 @@ internal class StorageStep : OnboardingStep { ) { Text(stringResource(MR.strings.onboarding_storage_action_select)) } + + HorizontalDivider( + modifier = Modifier.padding(vertical = 8.dp), + color = MaterialTheme.colorScheme.onPrimaryContainer, + ) + + Text(stringResource(MR.strings.onboarding_storage_help_info, stringResource(MR.strings.app_name))) + Button( + modifier = Modifier.fillMaxWidth(), + onClick = { handler.openUri("https://tachiyomi.org/docs/faq/storage") }, + ) { + Text(stringResource(MR.strings.onboarding_storage_help_action)) + } } LaunchedEffect(Unit) { diff --git a/i18n/src/commonMain/resources/MR/base/strings.xml b/i18n/src/commonMain/resources/MR/base/strings.xml index fcd7b3896..342c51d78 100644 --- a/i18n/src/commonMain/resources/MR/base/strings.xml +++ b/i18n/src/commonMain/resources/MR/base/strings.xml @@ -182,6 +182,8 @@ Select a folder where %1$s will store chapter downloads, backups, and more.\n\nA dedicated folder is recommended.\n\nSelected folder: %2$s Select a folder A folder must be selected + Updating from an older version and not sure what to select? Refer to the storage guide for more information. + Storage guide Install apps permission To install source extensions. Notification permission