Improve migration error display
This commit is contained in:
parent
8b57decea6
commit
49924957d2
@ -99,7 +99,8 @@ fun MigrationListScreen(
|
||||
MigrationItem(
|
||||
modifier = Modifier
|
||||
.padding(top = 8.dp)
|
||||
.weight(1f),
|
||||
.weight(1f)
|
||||
.align(Alignment.Top),
|
||||
manga = migrationItem.manga,
|
||||
sourcesString = migrationItem.sourcesString,
|
||||
chapterInfo = migrationItem.chapterInfo,
|
||||
@ -115,7 +116,8 @@ fun MigrationListScreen(
|
||||
MigrationItemResult(
|
||||
modifier = Modifier
|
||||
.padding(top = 8.dp)
|
||||
.weight(1f),
|
||||
.weight(1f)
|
||||
.align(Alignment.Top),
|
||||
migrationItem = migrationItem,
|
||||
result = result,
|
||||
getManga = getManga,
|
||||
|
@ -2,11 +2,15 @@ package eu.kanade.presentation.browse.components
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.aspectRatio
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.widthIn
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.CircularProgressIndicator
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.produceState
|
||||
@ -14,6 +18,7 @@ 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.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import eu.kanade.domain.manga.model.Manga
|
||||
import eu.kanade.presentation.components.MangaCover
|
||||
@ -43,14 +48,26 @@ fun MigrationItemResult(
|
||||
) {
|
||||
CircularProgressIndicator()
|
||||
}
|
||||
MigratingManga.SearchResult.NotFound -> Image(
|
||||
painter = rememberResourceBitmapPainter(id = R.drawable.cover_error),
|
||||
contentDescription = null,
|
||||
modifier = Modifier
|
||||
.matchParentSize()
|
||||
.clip(RoundedCornerShape(4.dp)),
|
||||
contentScale = ContentScale.Crop,
|
||||
)
|
||||
MigratingManga.SearchResult.NotFound -> Column(
|
||||
Modifier.widthIn(max = 150.dp)
|
||||
.fillMaxWidth()
|
||||
.padding(4.dp),
|
||||
) {
|
||||
Image(
|
||||
painter = rememberResourceBitmapPainter(id = R.drawable.cover_error),
|
||||
contentDescription = null,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.aspectRatio(MangaCover.Book.ratio)
|
||||
.clip(RoundedCornerShape(4.dp)),
|
||||
contentScale = ContentScale.Crop,
|
||||
)
|
||||
Text(
|
||||
text = stringResource(R.string.no_alternatives_found),
|
||||
modifier = Modifier.padding(top = 4.dp, bottom = 1.dp, start = 8.dp),
|
||||
style = MaterialTheme.typography.titleSmall,
|
||||
)
|
||||
}
|
||||
is MigratingManga.SearchResult.Result -> {
|
||||
val item by produceState<Triple<Manga, MigratingManga.ChapterInfo, String>?>(
|
||||
initialValue = null,
|
||||
|
@ -280,6 +280,7 @@
|
||||
<string name="match_pinned_sources">Faire correspondre les sources épinglées</string>
|
||||
<string name="match_enabled_sources">Faire correspondre les sources activées</string>
|
||||
<string name="no_chapters_found_for_migration">Aucun chapitre trouvé, ce manga ne peut pas être utilisé pour la migration</string>
|
||||
<string name="no_alternatives_found">Aucune alternative trouvée</string>
|
||||
<string name="stop_migrating">Arrêter la migration?</string>
|
||||
<plurals name="migrate_entry">
|
||||
<item quantity="one">Migrer %1$d%2$s manga?</item>
|
||||
|
@ -385,6 +385,7 @@
|
||||
<string name="match_pinned_sources">Gunakan sumber yang disematkan</string>
|
||||
<string name="match_enabled_sources">Gunakan sumber yang diaktifkan</string>
|
||||
<string name="no_chapters_found_for_migration">Bab tak ditemukan, manga ini tak bisa dipindahkan ke sini</string>
|
||||
<string name="no_alternatives_found">Tidak Ditemukan</string>
|
||||
<string name="stop_migrating">Hentikan migrasi?</string>
|
||||
<plurals name="migrate_entry">
|
||||
<item quantity="one">Pindahkan %1$d%2$s manga?</item>
|
||||
|
@ -355,6 +355,7 @@
|
||||
<string name="match_pinned_sources">Combinar com fontes fixadas</string>
|
||||
<string name="match_enabled_sources">Combinar com fontes ativadas</string>
|
||||
<string name="no_chapters_found_for_migration">Sem capítulos encontrados, este mangá não pode ser usado para migração</string>
|
||||
<string name="no_alternatives_found">Sem alternativas encontradas</string>
|
||||
<string name="stop_migrating">Parar migração?</string>
|
||||
<plurals name="migrate_entry">
|
||||
<item quantity="one">Migrar %1$d%2$s mangá?</item>
|
||||
|
@ -419,6 +419,7 @@
|
||||
<string name="match_pinned_sources">Соответствие закреплённых источников</string>
|
||||
<string name="match_enabled_sources">Соответствие включённых источников</string>
|
||||
<string name="no_chapters_found_for_migration">Глав не найдено. Эта запись не может быть использована для переноса</string>
|
||||
<string name="no_alternatives_found">Альтернатив не найдено</string>
|
||||
<string name="stop_migrating">Остановить перенос?</string>
|
||||
<plurals name="migrate_entry">
|
||||
<item quantity="one">Перенести %1$d%2$s запись?</item>
|
||||
|
@ -400,6 +400,7 @@
|
||||
<string name="match_pinned_sources">匹配置顶的来源</string>
|
||||
<string name="match_enabled_sources">匹配启用的来源</string>
|
||||
<string name="no_chapters_found_for_migration">未找到章节,该漫画无法用于迁移</string>
|
||||
<string name="no_alternatives_found">未找到替代方案</string>
|
||||
<string name="stop_migrating">停止迁移?</string>
|
||||
<plurals name="migrate_entry">
|
||||
<item quantity="other">迁移 %1$d%2$s 漫画?</item>
|
||||
|
@ -421,6 +421,7 @@
|
||||
<string name="match_pinned_sources">Match pinned sources</string>
|
||||
<string name="match_enabled_sources">Match enabled sources</string>
|
||||
<string name="no_chapters_found_for_migration">No chapters found, this entry cannot be used for migration</string>
|
||||
<string name="no_alternatives_found">No Alternatives Found</string>
|
||||
<string name="stop_migrating">Stop migrating?</string>
|
||||
<plurals name="migrate_entry">
|
||||
<item quantity="one">Migrate %1$d%2$s entry?</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user