This commit is contained in:
5 files changed
+55
No files matched your search
@@ -40,6 +40,7 @@ import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
import com.m57.hermescontrol.ui.common.EmptyState
|
||||
import com.m57.hermescontrol.ui.common.ErrorState
|
||||
import com.m57.hermescontrol.ui.common.HermesScaffold
|
||||
import com.m57.hermescontrol.ui.common.LoadingState
|
||||
@@ -84,6 +85,16 @@ fun KeysScreen(
|
||||
)
|
||||
}
|
||||
|
||||
state.envVars.isEmpty() -> {
|
||||
EmptyState(
|
||||
title = "No environment keys reported",
|
||||
subtitle = "Verify configuration or retry",
|
||||
onAction = { viewModel.loadKeys() },
|
||||
actionLabel = "Refresh",
|
||||
modifier = Modifier.padding(paddingValues),
|
||||
)
|
||||
}
|
||||
|
||||
else -> {
|
||||
Box(Modifier.fillMaxSize()) {
|
||||
if (state.isLoading) {
|
||||
|
||||
@@ -39,6 +39,7 @@ import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
import com.m57.hermescontrol.ui.common.EmptyState
|
||||
import com.m57.hermescontrol.ui.common.ErrorState
|
||||
import com.m57.hermescontrol.ui.common.HermesScaffold
|
||||
import com.m57.hermescontrol.ui.common.LoadingState
|
||||
@@ -84,6 +85,16 @@ fun ModelScreen(
|
||||
)
|
||||
}
|
||||
|
||||
state.providers.isEmpty() -> {
|
||||
EmptyState(
|
||||
title = "No model providers reported",
|
||||
subtitle = "Verify configuration or retry",
|
||||
onAction = { viewModel.loadModelOptions() },
|
||||
actionLabel = "Refresh",
|
||||
modifier = Modifier.padding(paddingValues),
|
||||
)
|
||||
}
|
||||
|
||||
else -> {
|
||||
Box(Modifier.fillMaxSize()) {
|
||||
if (state.isLoading && state.providers.isEmpty()) {
|
||||
|
||||
@@ -31,6 +31,7 @@ import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
import com.m57.hermescontrol.ui.common.EmptyState
|
||||
import com.m57.hermescontrol.ui.common.ErrorState
|
||||
import com.m57.hermescontrol.ui.common.HermesScaffold
|
||||
import com.m57.hermescontrol.ui.common.LoadingState
|
||||
@@ -75,6 +76,16 @@ fun PluginsScreen(
|
||||
)
|
||||
}
|
||||
|
||||
state.plugins.isEmpty() -> {
|
||||
EmptyState(
|
||||
title = "No plugins found",
|
||||
subtitle = "Verify configuration or retry",
|
||||
onAction = { viewModel.loadPlugins() },
|
||||
actionLabel = "Refresh",
|
||||
modifier = Modifier.padding(paddingValues),
|
||||
)
|
||||
}
|
||||
|
||||
else -> {
|
||||
Box(Modifier.fillMaxSize()) {
|
||||
if (state.isLoading) {
|
||||
|
||||
@@ -39,6 +39,7 @@ import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
import com.m57.hermescontrol.ui.common.EmptyState
|
||||
import com.m57.hermescontrol.ui.common.ErrorState
|
||||
import com.m57.hermescontrol.ui.common.HermesScaffold
|
||||
import com.m57.hermescontrol.ui.common.LoadingState
|
||||
@@ -88,6 +89,16 @@ fun ProfilesScreen(
|
||||
)
|
||||
}
|
||||
|
||||
state.profiles.isEmpty() -> {
|
||||
EmptyState(
|
||||
title = "No profiles available",
|
||||
subtitle = "Verify configuration or retry",
|
||||
onAction = { viewModel.loadProfiles() },
|
||||
actionLabel = "Refresh",
|
||||
modifier = Modifier.padding(paddingValues),
|
||||
)
|
||||
}
|
||||
|
||||
else -> {
|
||||
Box(Modifier.fillMaxSize()) {
|
||||
if (state.isLoading && state.profiles.isEmpty()) {
|
||||
|
||||
@@ -36,6 +36,7 @@ import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
import com.m57.hermescontrol.ui.common.EmptyState
|
||||
import com.m57.hermescontrol.ui.common.ErrorState
|
||||
import com.m57.hermescontrol.ui.common.HermesScaffold
|
||||
import com.m57.hermescontrol.ui.common.LoadingState
|
||||
@@ -80,6 +81,16 @@ fun ToolsetsScreen(
|
||||
)
|
||||
}
|
||||
|
||||
state.toolsets.isEmpty() -> {
|
||||
EmptyState(
|
||||
title = "No toolsets reported",
|
||||
subtitle = "Verify configuration or retry",
|
||||
onAction = { viewModel.loadToolsets() },
|
||||
actionLabel = "Refresh",
|
||||
modifier = Modifier.padding(paddingValues),
|
||||
)
|
||||
}
|
||||
|
||||
else -> {
|
||||
Box(Modifier.fillMaxSize()) {
|
||||
if (state.isLoading && state.toolsets.isEmpty()) {
|
||||
|
||||
Reference in new issue
Block a user