mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 13:26:02 +00:00
itch.io browse: use itch's own sort, price and platform paths
The sort and price chips now cover everything itch's browse page offers, with the paths copied from its links: new-and-popular, top-sellers, top-rated and newest for sorts; free, on-sale, store, 5-dollars-or-less and 15-dollars-or-less for prices; platform-windows, -osx, -linux, -android, -ios, -web and -mobile-web. The guessed alternative spelling of the free filter is gone, so a query is one address. The tests assert the addresses itch itself uses. New and reworded strings in all 33 locales.
This commit is contained in:
37 files changed
+244
-106
No files matched your search
@@ -90,9 +90,10 @@ private fun BrowseChip(label: String, selected: Boolean, onClick: () -> Unit) {
|
||||
@Composable
|
||||
private fun sortLabel(sort: String): String = stringResource(
|
||||
when (sort) {
|
||||
ItchBrowse.SORT_NEW -> R.string.stores_itch_sort_new
|
||||
ItchBrowse.SORT_TOP_RATED -> R.string.stores_itch_sort_top_rated
|
||||
ItchBrowse.SORT_NEW_POPULAR -> R.string.stores_itch_sort_new_popular
|
||||
ItchBrowse.SORT_TOP_SELLERS -> R.string.stores_itch_sort_top_sellers
|
||||
ItchBrowse.SORT_TOP_RATED -> R.string.stores_itch_sort_top_rated
|
||||
ItchBrowse.SORT_NEWEST -> R.string.stores_itch_sort_new
|
||||
else -> R.string.stores_itch_sort_popular
|
||||
},
|
||||
)
|
||||
@@ -102,6 +103,9 @@ private fun priceLabel(price: String): String = stringResource(
|
||||
when (price) {
|
||||
ItchBrowse.PRICE_FREE -> R.string.stores_itch_price_free
|
||||
ItchBrowse.PRICE_SALE -> R.string.stores_itch_price_sale
|
||||
ItchBrowse.PRICE_PAID -> R.string.stores_itch_price_paid
|
||||
ItchBrowse.PRICE_UNDER_5 -> R.string.stores_itch_price_under_5
|
||||
ItchBrowse.PRICE_UNDER_15 -> R.string.stores_itch_price_under_15
|
||||
else -> R.string.stores_itch_price_any
|
||||
},
|
||||
)
|
||||
Reference in new issue
Block a user