nit: move scaffold related UI components into a separate package

This commit is contained in:
Han Yin 2025-04-21 13:43:52 -07:00
parent 77edad5a01
commit 73330596ae
8 changed files with 23 additions and 23 deletions

View File

@ -29,14 +29,14 @@ import androidx.navigation.navArgument
import com.example.llama.revamp.engine.ModelLoadingMetrics
import com.example.llama.revamp.navigation.AppDestinations
import com.example.llama.revamp.navigation.NavigationActions
import com.example.llama.revamp.ui.components.AnimatedNavHost
import com.example.llama.revamp.ui.components.AppNavigationDrawer
import com.example.llama.revamp.ui.components.AppScaffold
import com.example.llama.revamp.ui.components.BottomBarConfig
import com.example.llama.revamp.ui.components.NavigationIcon
import com.example.llama.revamp.ui.components.ScaffoldConfig
import com.example.llama.revamp.ui.components.ScaffoldEvent
import com.example.llama.revamp.ui.components.TopBarConfig
import com.example.llama.revamp.ui.scaffold.AnimatedNavHost
import com.example.llama.revamp.ui.scaffold.AppNavigationDrawer
import com.example.llama.revamp.ui.scaffold.AppScaffold
import com.example.llama.revamp.ui.scaffold.BottomBarConfig
import com.example.llama.revamp.ui.scaffold.NavigationIcon
import com.example.llama.revamp.ui.scaffold.ScaffoldConfig
import com.example.llama.revamp.ui.scaffold.ScaffoldEvent
import com.example.llama.revamp.ui.scaffold.TopBarConfig
import com.example.llama.revamp.ui.screens.BenchmarkScreen
import com.example.llama.revamp.ui.screens.ConversationScreen
import com.example.llama.revamp.ui.screens.ModelLoadingScreen

View File

@ -1,4 +1,4 @@
package com.example.llama.revamp.ui.components
package com.example.llama.revamp.ui.scaffold
import androidx.compose.animation.AnimatedContentTransitionScope
import androidx.compose.animation.core.LinearOutSlowInEasing

View File

@ -1,4 +1,4 @@
package com.example.llama.revamp.ui.components
package com.example.llama.revamp.ui.scaffold
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.material3.Scaffold

View File

@ -1,4 +1,4 @@
package com.example.llama.revamp.ui.components
package com.example.llama.revamp.ui.scaffold
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
@ -37,7 +37,6 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp
import com.example.llama.R
import com.example.llama.revamp.data.model.ModelInfo
import com.example.llama.revamp.ui.components.BottomBarConfig.ModelsManagement
import com.example.llama.revamp.viewmodel.ModelSortOrder
/**
@ -253,10 +252,10 @@ fun ModelSelectionBottomBar(
@Composable
fun ModelsManagementBottomBar(
sorting: ModelsManagement.SortingConfig,
filtering: ModelsManagement.FilteringConfig,
selection: ModelsManagement.SelectionConfig,
importing: ModelsManagement.ImportConfig
sorting: BottomBarConfig.ModelsManagement.SortingConfig,
filtering: BottomBarConfig.ModelsManagement.FilteringConfig,
selection: BottomBarConfig.ModelsManagement.SelectionConfig,
importing: BottomBarConfig.ModelsManagement.ImportConfig
) {
BottomAppBar(
actions = {

View File

@ -1,4 +1,4 @@
package com.example.llama.revamp.ui.components
package com.example.llama.revamp.ui.scaffold
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.clickable
@ -33,6 +33,7 @@ import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import com.example.llama.revamp.APP_NAME
import com.example.llama.revamp.navigation.AppDestinations
import com.example.llama.revamp.navigation.NavigationActions
import kotlinx.coroutines.launch
@ -132,7 +133,7 @@ private fun DrawerContent(
DrawerNavigationItem(
icon = Icons.Default.Home,
label = "Home",
isSelected = currentRoute == com.example.llama.revamp.navigation.AppDestinations.MODEL_SELECTION_ROUTE,
isSelected = currentRoute == AppDestinations.MODEL_SELECTION_ROUTE,
onClick = { onNavigate { navigationActions.navigateToModelSelection() } }
)
@ -149,14 +150,14 @@ private fun DrawerContent(
DrawerNavigationItem(
icon = Icons.Default.Settings,
label = "General Settings",
isSelected = currentRoute == com.example.llama.revamp.navigation.AppDestinations.SETTINGS_GENERAL_ROUTE,
isSelected = currentRoute == AppDestinations.SETTINGS_GENERAL_ROUTE,
onClick = { onNavigate { navigationActions.navigateToSettingsGeneral() } }
)
DrawerNavigationItem(
icon = Icons.Default.Folder,
label = "Models",
isSelected = currentRoute == com.example.llama.revamp.navigation.AppDestinations.MODELS_MANAGEMENT_ROUTE,
isSelected = currentRoute == AppDestinations.MODELS_MANAGEMENT_ROUTE,
onClick = { onNavigate { navigationActions.navigateToModelsManagement() } }
)
}

View File

@ -1,4 +1,4 @@
package com.example.llama.revamp.ui.components
package com.example.llama.revamp.ui.scaffold
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer

View File

@ -52,7 +52,7 @@ import com.example.llama.revamp.data.model.SystemPrompt
import com.example.llama.revamp.engine.ModelLoadingMetrics
import com.example.llama.revamp.ui.components.ModelCardCoreExpandable
import com.example.llama.revamp.ui.components.ModelUnloadDialogHandler
import com.example.llama.revamp.ui.components.ScaffoldEvent
import com.example.llama.revamp.ui.scaffold.ScaffoldEvent
import com.example.llama.revamp.viewmodel.ModelLoadingViewModel

View File

@ -37,7 +37,7 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.DialogProperties
import com.example.llama.revamp.data.model.ModelInfo
import com.example.llama.revamp.ui.components.ModelCardFullExpandable
import com.example.llama.revamp.ui.components.ScaffoldEvent
import com.example.llama.revamp.ui.scaffold.ScaffoldEvent
import com.example.llama.revamp.util.formatFileByteSize
import com.example.llama.revamp.viewmodel.ModelManagementState
import com.example.llama.revamp.viewmodel.ModelManagementState.Deletion