some strategy selection interface changes

This commit is contained in:
white
2025-10-18 12:20:30 +03:00
parent 94979d2b2e
commit cf38ef7ac2
3 changed files with 8 additions and 1 deletions

View File

@@ -200,7 +200,7 @@ fun StrategySelectionItem(strategy : StrategyCheckResult, prefs : SharedPreferen
elevation = CardDefaults.cardElevation(defaultElevation = 6.dp),
colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceContainer),
onClick = {
if (strategy.status == StrategyTestingStatus.Completed) {
if (strategy.status == StrategyTestingStatus.Completed && strategy.domains.isNotEmpty()) {
expanded = !expanded
}
},
@@ -283,6 +283,11 @@ fun StrategySelectionItem(strategy : StrategyCheckResult, prefs : SharedPreferen
.padding(horizontal = 8.dp)
.fillMaxWidth()
) {
if (strategy.domains.isNotEmpty()){
Text(
text = stringResource(R.string.selection_available_domains)
)
}
LazyColumn(modifier = Modifier.heightIn(max = 300.dp)) {
items(strategy.domains) { item ->
Card(

View File

@@ -116,4 +116,5 @@
<string name="strategy_selection_info_msg">"В этом разделе настроек приложения представлен перебор стратегий\n Подбор проходит среди скачанных стратегий, поэтому заранее скачайте из репозитория или добавьте из файловой системы интересующие вас стратегии для сравнения. \n Перед началом так же выберете один или несколько листов доменов на вкладке \"Листы\", затем нажмите на \"Начать подбор\". Не используйте для перебора списки с большим количеством доменов."</string>
<string name="selection_no_hosts_title">Нет активных листов</string>
<string name="selection_no_hosts_message">Не обнаружено активных списков хостов, включите один или несколько, иначе подбор не сработает</string>
<string name="selection_available_domains">Доступные домены</string>
</resources>

View File

@@ -121,4 +121,5 @@
<string name="strategy_selection_info_msg">This section of the application settings allows you to iterate through strategies.\n The selection is based on downloaded strategies, so download the strategies you\'re interested in from the repository or add them from the file system for comparison.\n Before starting, select one or more domain lists in the \"Lists\" tab, then click \"Start selection\". Avoid using lists with a large number of domains.</string>
<string name="selection_no_hosts_title">No active hosts</string>
<string name="selection_no_hosts_message">No active host lists found, please enable one or more, otherwise the selection will not work</string>
<string name="selection_available_domains">Available domains:</string>
</resources>