|
|
@ -109,20 +109,24 @@ private fun FileItemIcon(modifier: Modifier, model: FileTree.Item) = Box(modifie |
|
|
|
when (val type = model.type) { |
|
|
|
when (val type = model.type) { |
|
|
|
is FileTree.ItemType.Folder -> when { |
|
|
|
is FileTree.ItemType.Folder -> when { |
|
|
|
!type.canExpand -> Unit |
|
|
|
!type.canExpand -> Unit |
|
|
|
type.isExpanded -> Icon(Icons.Default.KeyboardArrowDown, tint = AmbientContentColor.current) |
|
|
|
type.isExpanded -> Icon( |
|
|
|
else -> Icon(Icons.Default.KeyboardArrowRight, tint = AmbientContentColor.current) |
|
|
|
Icons.Default.KeyboardArrowDown, contentDescription = null, tint = AmbientContentColor.current |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
else -> Icon( |
|
|
|
|
|
|
|
Icons.Default.KeyboardArrowRight, contentDescription = null, tint = AmbientContentColor.current |
|
|
|
|
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
is FileTree.ItemType.File -> when (type.ext) { |
|
|
|
is FileTree.ItemType.File -> when (type.ext) { |
|
|
|
"kt" -> Icon(Icons.Default.Code, tint = Color(0xFF3E86A0)) |
|
|
|
"kt" -> Icon(Icons.Default.Code, contentDescription = null, tint = Color(0xFF3E86A0)) |
|
|
|
"xml" -> Icon(Icons.Default.Code, tint = Color(0xFFC19C5F)) |
|
|
|
"xml" -> Icon(Icons.Default.Code, contentDescription = null, tint = Color(0xFFC19C5F)) |
|
|
|
"txt" -> Icon(Icons.Default.Description, tint = Color(0xFF87939A)) |
|
|
|
"txt" -> Icon(Icons.Default.Description, contentDescription = null, tint = Color(0xFF87939A)) |
|
|
|
"md" -> Icon(Icons.Default.Description, tint = Color(0xFF87939A)) |
|
|
|
"md" -> Icon(Icons.Default.Description, contentDescription = null, tint = Color(0xFF87939A)) |
|
|
|
"gitignore" -> Icon(Icons.Default.BrokenImage, tint = Color(0xFF87939A)) |
|
|
|
"gitignore" -> Icon(Icons.Default.BrokenImage, contentDescription = null, tint = Color(0xFF87939A)) |
|
|
|
"gradle" -> Icon(Icons.Default.Build, tint = Color(0xFF87939A)) |
|
|
|
"gradle" -> Icon(Icons.Default.Build, contentDescription = null, tint = Color(0xFF87939A)) |
|
|
|
"kts" -> Icon(Icons.Default.Build, tint = Color(0xFF3E86A0)) |
|
|
|
"kts" -> Icon(Icons.Default.Build, contentDescription = null, tint = Color(0xFF3E86A0)) |
|
|
|
"properties" -> Icon(Icons.Default.Settings, tint = Color(0xFF62B543)) |
|
|
|
"properties" -> Icon(Icons.Default.Settings, contentDescription = null, tint = Color(0xFF62B543)) |
|
|
|
"bat" -> Icon(Icons.Default.Launch, tint = Color(0xFF87939A)) |
|
|
|
"bat" -> Icon(Icons.Default.Launch, contentDescription = null, tint = Color(0xFF87939A)) |
|
|
|
else -> Icon(Icons.Default.TextSnippet, tint = Color(0xFF87939A)) |
|
|
|
else -> Icon(Icons.Default.TextSnippet, contentDescription = null, tint = Color(0xFF87939A)) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |