mirror of
https://github.com/Myzel394/Alibi.git
synced 2025-06-18 23:05:26 +02:00
Merge branch 'master' into fix-71-improve-landscape
This commit is contained in:
commit
2de62d0d29
@ -19,10 +19,10 @@ import androidx.compose.foundation.layout.width
|
|||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
|
import androidx.compose.material.icons.automirrored.filled.InsertDriveFile
|
||||||
import androidx.compose.material.icons.filled.CameraAlt
|
import androidx.compose.material.icons.filled.CameraAlt
|
||||||
import androidx.compose.material.icons.filled.Cancel
|
import androidx.compose.material.icons.filled.Cancel
|
||||||
import androidx.compose.material.icons.filled.Folder
|
import androidx.compose.material.icons.filled.Folder
|
||||||
import androidx.compose.material.icons.filled.InsertDriveFile
|
|
||||||
import androidx.compose.material.icons.filled.Lock
|
import androidx.compose.material.icons.filled.Lock
|
||||||
import androidx.compose.material.icons.filled.Mic
|
import androidx.compose.material.icons.filled.Mic
|
||||||
import androidx.compose.material.icons.filled.PermMedia
|
import androidx.compose.material.icons.filled.PermMedia
|
||||||
@ -145,19 +145,29 @@ fun SaveFolderTile(
|
|||||||
var showDCIMFolderHelpSheet by remember { mutableStateOf(false) }
|
var showDCIMFolderHelpSheet by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
if (showDCIMFolderHelpSheet) {
|
if (showDCIMFolderHelpSheet) {
|
||||||
MediaFoldersExplanationDialog(
|
DCIMFolderExplanationDialog(
|
||||||
onDismiss = {
|
onDismiss = {
|
||||||
showDCIMFolderHelpSheet = false
|
showDCIMFolderHelpSheet = false
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var showExplanationDialog by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
|
if (showExplanationDialog) {
|
||||||
|
InternalFolderExplanationDialog(
|
||||||
|
onDismiss = {
|
||||||
|
showExplanationDialog = false
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
SettingsTile(
|
SettingsTile(
|
||||||
title = stringResource(R.string.ui_settings_option_saveFolder_title),
|
title = stringResource(R.string.ui_settings_option_saveFolder_title),
|
||||||
description = stringResource(R.string.ui_settings_option_saveFolder_explanation),
|
description = stringResource(R.string.ui_settings_option_saveFolder_explanation),
|
||||||
leading = {
|
leading = {
|
||||||
Icon(
|
Icon(
|
||||||
Icons.Default.InsertDriveFile,
|
Icons.AutoMirrored.Filled.InsertDriveFile,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
@ -203,7 +213,25 @@ fun SaveFolderTile(
|
|||||||
val openFolder = rememberOpenUri()
|
val openFolder = rememberOpenUri()
|
||||||
|
|
||||||
when (settings.saveFolder) {
|
when (settings.saveFolder) {
|
||||||
null -> {}
|
null -> {
|
||||||
|
Button(
|
||||||
|
onClick = {
|
||||||
|
showExplanationDialog = true
|
||||||
|
},
|
||||||
|
shape = MaterialTheme.shapes.small,
|
||||||
|
contentPadding = ButtonDefaults.TextButtonContentPadding,
|
||||||
|
colors = ButtonDefaults.filledTonalButtonColors(
|
||||||
|
contentColor = MaterialTheme.colorScheme.onTertiaryContainer,
|
||||||
|
containerColor = MaterialTheme.colorScheme.tertiaryContainer,
|
||||||
|
),
|
||||||
|
) {
|
||||||
|
Text(
|
||||||
|
stringResource(R.string.ui_settings_option_saveFolder_explainMediaFolder_label),
|
||||||
|
fontSize = MaterialTheme.typography.bodySmall.fontSize,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
RECORDER_MEDIA_SELECTED_VALUE -> {
|
RECORDER_MEDIA_SELECTED_VALUE -> {
|
||||||
Button(
|
Button(
|
||||||
onClick = {
|
onClick = {
|
||||||
@ -256,12 +284,9 @@ fun SaveFolderTile(
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun MediaFoldersExplanationDialog(
|
fun DCIMFolderExplanationDialog(
|
||||||
onDismiss: () -> Unit,
|
onDismiss: () -> Unit,
|
||||||
) {
|
) {
|
||||||
val context = LocalContext.current
|
|
||||||
val openFolder = rememberOpenUri()
|
|
||||||
|
|
||||||
AlertDialog(
|
AlertDialog(
|
||||||
onDismissRequest = onDismiss,
|
onDismissRequest = onDismiss,
|
||||||
icon = {
|
icon = {
|
||||||
@ -363,6 +388,42 @@ fun MediaFoldersExplanationDialog(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun InternalFolderExplanationDialog(
|
||||||
|
onDismiss: () -> Unit,
|
||||||
|
) {
|
||||||
|
AlertDialog(
|
||||||
|
onDismissRequest = onDismiss,
|
||||||
|
icon = {
|
||||||
|
Icon(
|
||||||
|
Icons.Default.Lock,
|
||||||
|
contentDescription = null,
|
||||||
|
)
|
||||||
|
},
|
||||||
|
title = {
|
||||||
|
Text(stringResource(R.string.ui_settings_option_saveFolder_explainMediaFolder_label))
|
||||||
|
},
|
||||||
|
confirmButton = {
|
||||||
|
Button(onClick = onDismiss) {
|
||||||
|
Text(stringResource(R.string.dialog_close_neutral_label))
|
||||||
|
}
|
||||||
|
},
|
||||||
|
text = {
|
||||||
|
Column(
|
||||||
|
modifier = Modifier.fillMaxWidth(),
|
||||||
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
|
verticalArrangement = Arrangement.spacedBy(32.dp),
|
||||||
|
) {
|
||||||
|
Text(
|
||||||
|
stringResource(R.string.ui_settings_option_saveFolder_explainInternalFolder_explanation),
|
||||||
|
style = MaterialTheme.typography.bodySmall,
|
||||||
|
color = MaterialTheme.colorScheme.onSurface,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun SelectionSheet(
|
fun SelectionSheet(
|
||||||
|
@ -182,10 +182,11 @@
|
|||||||
<string name="ui_severeError_fileSaverUnavailable_title">File Manager app not found</string>
|
<string name="ui_severeError_fileSaverUnavailable_title">File Manager app not found</string>
|
||||||
<string name="ui_severeError_fileSaverUnavailable_text">Alibi couldn\'t find a file manager app on your phone. Please install a file manager app and try again. If this message still appears, you can try using a custom batches folder in the advanced settings section. Alibi may not fully work on your device.</string>
|
<string name="ui_severeError_fileSaverUnavailable_text">Alibi couldn\'t find a file manager app on your phone. Please install a file manager app and try again. If this message still appears, you can try using a custom batches folder in the advanced settings section. Alibi may not fully work on your device.</string>
|
||||||
<string name="ui_videoRecorder_state_recording_title">Recording Video</string>
|
<string name="ui_videoRecorder_state_recording_title">Recording Video</string>
|
||||||
<string name="ui_settings_option_saveFolder_openFolder_label">Open Folder in Files</string>
|
<string name="ui_settings_option_saveFolder_openFolder_label">Open selected folder in file manager</string>
|
||||||
<string name="ui_settings_option_saveFolder_explainMediaFolder_label">Where are my batches stored?</string>
|
<string name="ui_settings_option_saveFolder_explainMediaFolder_label">Where are my batches stored?</string>
|
||||||
<string name="ui_settings_option_saveFolder_explainMediaFolder_generalExplanation">To view your batches, open the Files app, go to the internal storage and then you will find your batches in following folders:</string>
|
<string name="ui_settings_option_saveFolder_explainMediaFolder_generalExplanation">To view your batches, open the Files app, go to the internal storage and then you will find your batches in following folders:</string>
|
||||||
<string name="ui_settings_option_saveFolder_explainMediaFolder_subfoldersExplanation">The final merged recordings will be saved in those folders. Each recording creates a subfolder to store the short batches in (\"%s\" for audio recordings, \"%s\" for video recordings). To view the individual batches, you may need to enable hidden files in the Files app.</string>
|
<string name="ui_settings_option_saveFolder_explainMediaFolder_subfoldersExplanation">The final merged recordings will be saved in those folders. Each recording creates a subfolder to store the short batches in (\"%s\" for audio recordings, \"%s\" for video recordings). To view the individual batches, you may need to enable hidden files in the Files app.</string>
|
||||||
<string name="ui_settings_option_saveFolder_explainMediaFolder_openFolderExplanation">Tap on a folder to open it in the Files app</string>
|
<string name="ui_settings_option_saveFolder_explainMediaFolder_openFolderExplanation">Tap on a folder to open it in the Files app</string>
|
||||||
<string name="ui_videoRecorder_action_start_settings_cameraLens_unknown_label">Unknown</string>
|
<string name="ui_videoRecorder_action_start_settings_cameraLens_unknown_label">Unknown</string>
|
||||||
|
<string name="ui_settings_option_saveFolder_explainInternalFolder_explanation">To protect your privacy, Alibi stores its batches into its own private, encrypted storage. This storage is only accessible by Alibi and can\'t be accessed by other apps or by a possible intruder. Once you save the recording, you will be asked where you want to save the recording to.</string>
|
||||||
</resources>
|
</resources>
|
Loading…
x
Reference in New Issue
Block a user