mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-12 03:58:56 +01:00
Minor cleanup/fixes
- Add FAB collapsing in clear database screen (fixes #7935) - Don't allow multiline category names to be entered - Consolidate Downloaded Only / Incognito Mode banner components - Fix see-through migrate screen sticky header
This commit is contained in:
@@ -40,10 +40,9 @@ import eu.kanade.presentation.browse.components.BrowseSourceComfortableGrid
|
||||
import eu.kanade.presentation.browse.components.BrowseSourceCompactGrid
|
||||
import eu.kanade.presentation.browse.components.BrowseSourceList
|
||||
import eu.kanade.presentation.browse.components.BrowseSourceToolbar
|
||||
import eu.kanade.presentation.components.DownloadedOnlyModeBanner
|
||||
import eu.kanade.presentation.components.AppStateBanners
|
||||
import eu.kanade.presentation.components.EmptyScreen
|
||||
import eu.kanade.presentation.components.ExtendedFloatingActionButton
|
||||
import eu.kanade.presentation.components.IncognitoModeBanner
|
||||
import eu.kanade.presentation.components.LoadingScreen
|
||||
import eu.kanade.presentation.components.Scaffold
|
||||
import eu.kanade.tachiyomi.R
|
||||
@@ -90,12 +89,8 @@ fun BrowseSourceScreen(
|
||||
onSearch = { presenter.search() },
|
||||
scrollBehavior = scrollBehavior,
|
||||
)
|
||||
if (downloadedOnlyMode) {
|
||||
DownloadedOnlyModeBanner()
|
||||
}
|
||||
if (incognitoMode) {
|
||||
IncognitoModeBanner()
|
||||
}
|
||||
|
||||
AppStateBanners(downloadedOnlyMode, incognitoMode)
|
||||
}
|
||||
},
|
||||
floatingActionButton = {
|
||||
@@ -140,7 +135,7 @@ fun BrowseSourceScreen(
|
||||
)
|
||||
},
|
||||
label = {
|
||||
Text(text = stringResource(id = R.string.popular))
|
||||
Text(text = stringResource(R.string.popular))
|
||||
},
|
||||
)
|
||||
if (presenter.source?.supportsLatest == true) {
|
||||
@@ -159,7 +154,7 @@ fun BrowseSourceScreen(
|
||||
)
|
||||
},
|
||||
label = {
|
||||
Text(text = stringResource(id = R.string.latest))
|
||||
Text(text = stringResource(R.string.latest))
|
||||
},
|
||||
)
|
||||
}
|
||||
@@ -176,7 +171,7 @@ fun BrowseSourceScreen(
|
||||
)
|
||||
},
|
||||
label = {
|
||||
Text(text = stringResource(id = R.string.action_filter))
|
||||
Text(text = stringResource(R.string.action_filter))
|
||||
},
|
||||
)
|
||||
}
|
||||
@@ -195,7 +190,7 @@ fun BrowseSourceFloatingActionButton(
|
||||
AnimatedVisibility(visible = isVisible) {
|
||||
ExtendedFloatingActionButton(
|
||||
modifier = modifier,
|
||||
text = { Text(text = stringResource(id = R.string.action_filter)) },
|
||||
text = { Text(text = stringResource(R.string.action_filter)) },
|
||||
icon = { Icon(Icons.Outlined.FilterList, contentDescription = "") },
|
||||
onClick = onFabClick,
|
||||
)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package eu.kanade.presentation.browse
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
@@ -84,7 +85,7 @@ fun MigrateSourceList(
|
||||
stickyHeader(key = "header") {
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.animateItemPlacement()
|
||||
.background(MaterialTheme.colorScheme.background)
|
||||
.padding(start = horizontalPadding),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
@@ -109,14 +110,9 @@ fun MigrateSourceList(
|
||||
}
|
||||
}
|
||||
|
||||
item(key = "title") {
|
||||
}
|
||||
|
||||
items(
|
||||
items = list,
|
||||
key = { (source, _) ->
|
||||
source.id
|
||||
},
|
||||
key = { (source, _) -> source.id },
|
||||
) { (source, count) ->
|
||||
MigrateSourceItem(
|
||||
modifier = Modifier.animateItemPlacement(),
|
||||
|
||||
@@ -102,7 +102,7 @@ fun BrowseSourceComfortableGridItem(
|
||||
},
|
||||
badgesStart = {
|
||||
if (manga.favorite) {
|
||||
Badge(text = stringResource(id = R.string.in_library))
|
||||
Badge(text = stringResource(R.string.in_library))
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
@@ -113,7 +113,7 @@ fun BrowseSourceCompactGridItem(
|
||||
},
|
||||
badgesStart = {
|
||||
if (manga.favorite) {
|
||||
Badge(text = stringResource(id = R.string.in_library))
|
||||
Badge(text = stringResource(R.string.in_library))
|
||||
}
|
||||
},
|
||||
content = {
|
||||
|
||||
@@ -18,7 +18,7 @@ fun RemoveMangaDialog(
|
||||
onDismissRequest = onDismissRequest,
|
||||
dismissButton = {
|
||||
TextButton(onClick = onDismissRequest) {
|
||||
Text(text = stringResource(id = android.R.string.cancel))
|
||||
Text(text = stringResource(android.R.string.cancel))
|
||||
}
|
||||
},
|
||||
confirmButton = {
|
||||
@@ -28,11 +28,11 @@ fun RemoveMangaDialog(
|
||||
onConfirm()
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(id = R.string.action_remove))
|
||||
Text(text = stringResource(R.string.action_remove))
|
||||
}
|
||||
},
|
||||
title = {
|
||||
Text(text = stringResource(id = R.string.are_you_sure))
|
||||
Text(text = stringResource(R.string.are_you_sure))
|
||||
},
|
||||
text = {
|
||||
Text(text = stringResource(R.string.remove_manga))
|
||||
|
||||
@@ -91,7 +91,7 @@ fun BrowseSourceListItem(
|
||||
onLongClick = onLongClick,
|
||||
badges = {
|
||||
if (manga.favorite) {
|
||||
Badge(text = stringResource(id = R.string.in_library))
|
||||
Badge(text = stringResource(R.string.in_library))
|
||||
}
|
||||
},
|
||||
content = {
|
||||
|
||||
@@ -85,24 +85,24 @@ fun BrowseSourceRegularToolbar(
|
||||
AppBarActions(
|
||||
actions = listOf(
|
||||
AppBar.Action(
|
||||
title = stringResource(id = R.string.action_search),
|
||||
title = stringResource(R.string.action_search),
|
||||
icon = Icons.Outlined.Search,
|
||||
onClick = onSearchClick,
|
||||
),
|
||||
AppBar.Action(
|
||||
title = stringResource(id = R.string.action_display_mode),
|
||||
title = stringResource(R.string.action_display_mode),
|
||||
icon = Icons.Filled.ViewModule,
|
||||
onClick = { selectingDisplayMode = true },
|
||||
),
|
||||
if (isLocalSource) {
|
||||
AppBar.Action(
|
||||
title = stringResource(id = R.string.label_help),
|
||||
title = stringResource(R.string.label_help),
|
||||
icon = Icons.Outlined.Help,
|
||||
onClick = onHelpClick,
|
||||
)
|
||||
} else {
|
||||
AppBar.Action(
|
||||
title = stringResource(id = R.string.action_web_view),
|
||||
title = stringResource(R.string.action_web_view),
|
||||
icon = Icons.Outlined.Public,
|
||||
onClick = onWebViewClick,
|
||||
)
|
||||
@@ -114,7 +114,7 @@ fun BrowseSourceRegularToolbar(
|
||||
onDismissRequest = { selectingDisplayMode = false },
|
||||
) {
|
||||
DropdownMenuItem(
|
||||
text = { Text(text = stringResource(id = R.string.action_display_comfortable_grid)) },
|
||||
text = { Text(text = stringResource(R.string.action_display_comfortable_grid)) },
|
||||
onClick = { onDisplayModeChange(LibraryDisplayMode.ComfortableGrid) },
|
||||
trailingIcon = {
|
||||
if (displayMode == LibraryDisplayMode.ComfortableGrid) {
|
||||
@@ -126,7 +126,7 @@ fun BrowseSourceRegularToolbar(
|
||||
},
|
||||
)
|
||||
DropdownMenuItem(
|
||||
text = { Text(text = stringResource(id = R.string.action_display_grid)) },
|
||||
text = { Text(text = stringResource(R.string.action_display_grid)) },
|
||||
onClick = { onDisplayModeChange(LibraryDisplayMode.CompactGrid) },
|
||||
trailingIcon = {
|
||||
if (displayMode == LibraryDisplayMode.CompactGrid) {
|
||||
@@ -138,7 +138,7 @@ fun BrowseSourceRegularToolbar(
|
||||
},
|
||||
)
|
||||
DropdownMenuItem(
|
||||
text = { Text(text = stringResource(id = R.string.action_display_list)) },
|
||||
text = { Text(text = stringResource(R.string.action_display_list)) },
|
||||
onClick = { onDisplayModeChange(LibraryDisplayMode.List) },
|
||||
trailingIcon = {
|
||||
if (displayMode == LibraryDisplayMode.List) {
|
||||
|
||||
Reference in New Issue
Block a user