|
|
@@ -36,6 +36,7 @@ import io.legado.app.ui.widget.components.AppTextField
|
|
|
import io.legado.app.ui.widget.components.alert.AppAlertDialog
|
|
|
import io.legado.app.ui.widget.components.button.series.SmallTonalButton
|
|
|
import io.legado.app.ui.widget.components.filePicker.FilePickerSheet
|
|
|
+import io.legado.app.ui.widget.components.importComponents.BatchImportDialog
|
|
|
import io.legado.app.ui.widget.components.importComponents.SourceInputDialog
|
|
|
import io.legado.app.ui.widget.components.menuItem.RoundDropdownMenu
|
|
|
import io.legado.app.ui.widget.components.menuItem.RoundDropdownMenuItem
|
|
|
@@ -199,6 +200,19 @@ fun SpeakEngineConfigSheet(
|
|
|
},
|
|
|
allowExtensions = arrayOf("json", "txt"),
|
|
|
)
|
|
|
+ BatchImportDialog(
|
|
|
+ title = stringResource(R.string.import_tts),
|
|
|
+ importState = state.httpTtsImportState,
|
|
|
+ onDismissRequest = { onIntent(ReadBookIntent.CancelHttpTtsImport) },
|
|
|
+ onToggleItem = { onIntent(ReadBookIntent.ToggleHttpTtsImportSelection(it)) },
|
|
|
+ onToggleAll = { onIntent(ReadBookIntent.ToggleHttpTtsImportAll(it)) },
|
|
|
+ onUpdateItem = { index, httpTTS ->
|
|
|
+ onIntent(ReadBookIntent.UpdateHttpTtsImportItem(index, httpTTS))
|
|
|
+ },
|
|
|
+ onConfirm = { onIntent(ReadBookIntent.SaveImportedHttpTts) },
|
|
|
+ itemTitle = { it.name },
|
|
|
+ itemSubtitle = { it.url },
|
|
|
+ )
|
|
|
|
|
|
AppModalBottomSheet(
|
|
|
show = show,
|
|
|
@@ -232,6 +246,13 @@ fun SpeakEngineConfigSheet(
|
|
|
onIntent(ReadBookIntent.ExportAllHttpTts)
|
|
|
},
|
|
|
)
|
|
|
+ RoundDropdownMenuItem(
|
|
|
+ text = stringResource(R.string.copy_url),
|
|
|
+ onClick = {
|
|
|
+ expanded = false
|
|
|
+ onIntent(ReadBookIntent.ExportAllHttpTtsAsUrl)
|
|
|
+ },
|
|
|
+ )
|
|
|
RoundDropdownMenuItem(
|
|
|
text = stringResource(R.string.clear_cache),
|
|
|
onClick = {
|