DApps hub: open Music at music.dks.news

Every app in the hub now has an address, so the dimmed, inert state for an app
without one is gone along with its string.
This commit is contained in:
Satoshi Qazi Muhammed committed 2026-10-18 07:26:09 +04:00
1 parent 6bc4e79936
commit 72df344563
6 files changed
+7 -19

No files matched your search

@@ -2837,5 +2837,4 @@
<string name="dks_hub_app_music">Muzîk</string>
<string name="dks_hub_app_rewshenbir">Rewşenbîr</string>
<string name="dks_hub_app_referral">Referans</string>
<string name="dks_hub_app_coming_soon">%s, dê zû bê</string>
</resources>
@@ -2125,5 +2125,4 @@ Referral kısmına bu adresi yapıştır:
<string name="dks_hub_app_music">Müzik</string>
<string name="dks_hub_app_rewshenbir">Rewshenbir</string>
<string name="dks_hub_app_referral">Davet</string>
<string name="dks_hub_app_coming_soon">%s, yakında</string>
</resources>
-1
View File
@@ -2853,5 +2853,4 @@
<string name="dks_hub_app_music">Music</string>
<string name="dks_hub_app_rewshenbir">Rewshenbir</string>
<string name="dks_hub_app_referral">Referral</string>
<string name="dks_hub_app_coming_soon">%s, coming soon</string>
</resources>
@@ -104,8 +104,7 @@ class MainDAppViewModel(
}
fun dksHubAppClicked(app: DksHubApp) {
val url = app.url ?: return
router.openDAppBrowser(DAppBrowserPayload.Address(url))
router.openDAppBrowser(DAppBrowserPayload.Address(app.url))
}
fun closeDksHub() {
@@ -9,18 +9,15 @@ import io.novafoundation.nova.feature_dapp_impl.R
* in the DApps tab, before choosing where to go. Four sections, each a grid of apps.
*
* Every app opens in the DApp browser. Most are pages of the web app at app.pezkuwichain.io,
* the same routes its own mobile home links to; the rest are their own sites. An app with
* no address yet is shown dimmed and does nothing when tapped.
* the same routes its own mobile home links to; the rest are their own sites.
*/
data class DksHubApp(
val id: String,
val emoji: String,
@StringRes val title: Int,
val url: String?,
) {
val isAvailable: Boolean get() = url != null
}
val url: String,
)
data class DksHubSection(
val id: String,
@@ -107,7 +104,7 @@ object DksHub {
DksHubApp("kurdmedia", "📺", R.string.dks_hub_app_kurdmedia, web("/social/kurdmedia")),
DksHubApp("kurdai", "🎙️", R.string.dks_hub_app_kurdai, "https://kurdishtts.dks.news"),
DksHubApp("games", "🎮", R.string.dks_hub_app_games, "https://games.pex.mom"),
DksHubApp("music", "🎵", R.string.dks_hub_app_music, null),
DksHubApp("music", "🎵", R.string.dks_hub_app_music, "https://music.dks.news"),
DksHubApp("rewshenbir", "🦅", R.string.dks_hub_app_rewshenbir, "https://rewshenbir.pezkiwi.app"),
DksHubApp("referral", "👥", R.string.dks_hub_app_referral, web("/dashboard")),
)
@@ -221,13 +221,8 @@ class DksHubView @JvmOverloads constructor(
gravity = Gravity.CENTER_HORIZONTAL
setPadding(dp(2), dp(6), dp(2), dp(8))
background = ripple(Color.TRANSPARENT, radius = dp(14).toFloat(), rippleColor = ColorUtils.setAlphaComponent(color, 0x55))
if (app.isAvailable) {
contentDescription = context.getString(app.title)
setOnClickListener { hubHandler?.onHubAppClicked(app) }
} else {
contentDescription = context.getString(R.string.dks_hub_app_coming_soon, context.getString(app.title))
alpha = 0.45f
}
contentDescription = context.getString(app.title)
setOnClickListener { hubHandler?.onHubAppClicked(app) }
}
// The icon sits on a soft disc of the section's colour, lit from its centre.
val icon = TextView(context).apply {