fun DtReloadStatusItem()

in hot-reload-devtools/src/main/kotlin/org/jetbrains/compose/devtools/sidecar/DtReloadStatusItem.kt [51:92]


fun DtReloadStatusItem() {
    val reloadState = ReloadUIState.composeValue()

    when (reloadState) {
        is ReloadUIState.Reloading -> DtSidecarStatusItem(
            symbol = {
                CircularProgressIndicator(
                    strokeWidth = 2.dp, color = DtColors.statusColorOrange2,
                    modifier = Modifier.tag(Tag.ReloadStatusSymbol)
                        .progressSemantics()
                )
            },
            content = {
                val buildSystem = BuildSystemUIState.composeValue()?.buildSystem
                if (buildSystem != null) {
                    DtBuildSystemLogo(buildSystem, modifier = Modifier.padding(DtPadding.tiny))
                }
                DtText("Reloading...", Modifier.tag(Tag.ReloadStatusText))
            }
        )
        is ReloadUIState.Ok -> DtSidecarStatusItem(
            symbol = {
                DtImage(
                    DtImages.Image.GREEN_CHECKMARK_ICON,
                    contentDescription = "Success",
                    modifier = Modifier.tag(Tag.ReloadStatusSymbol)
                )
            },
            content = { ResultContent(reloadState) }
        )
        is ReloadUIState.Failed -> DtSidecarStatusItem(
            symbol = {
                DtImage(
                    DtImages.Image.ERROR_ICON,
                    contentDescription = "Error",
                    modifier = Modifier.tag(Tag.ReloadStatusSymbol)
                )
            },
            content = { ResultContent(reloadState) }
        )
    }
}