mirror of
https://github.com/TermoraDev/termora.git
synced 2026-01-16 02:12:58 +08:00
feat: support SMB
This commit is contained in:
@@ -2,7 +2,7 @@ package app.termora
|
||||
|
||||
import com.formdev.flatlaf.extras.FlatSVGIcon
|
||||
|
||||
open class DynamicIcon(name: String, private val darkName: String, val allowColorFilter: Boolean = true) :
|
||||
open class DynamicIcon(name: String, private val darkName: String = name, val allowColorFilter: Boolean = true) :
|
||||
FlatSVGIcon(name) {
|
||||
constructor(name: String) : this(name, name)
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@ object Icons {
|
||||
val ssh by lazy { DynamicIcon("icons/ssh.svg", "icons/ssh_dark.svg") }
|
||||
val ftp by lazy { DynamicIcon("icons/ftp.svg", "icons/ftp_dark.svg") }
|
||||
val minio by lazy { DynamicIcon("icons/minio.svg", "icons/minio_dark.svg") }
|
||||
val windows7 by lazy { DynamicIcon("icons/windows7.svg", allowColorFilter = false) }
|
||||
val powershell by lazy { DynamicIcon("icons/powershell.svg", "icons/powershell_dark.svg") }
|
||||
val serial by lazy { DynamicIcon("icons/serial.svg", "icons/serial_dark.svg") }
|
||||
val fileFormat by lazy { DynamicIcon("icons/fileFormat.svg", "icons/fileFormat_dark.svg") }
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.formdev.flatlaf.extras.components.FlatTextField
|
||||
import com.formdev.flatlaf.extras.components.FlatToolBar
|
||||
import com.formdev.flatlaf.ui.FlatLineBorder
|
||||
import com.formdev.flatlaf.util.SystemInfo
|
||||
import org.apache.commons.io.FilenameUtils
|
||||
import org.apache.commons.lang3.StringUtils
|
||||
import org.apache.commons.lang3.SystemUtils
|
||||
import org.apache.commons.lang3.exception.ExceptionUtils
|
||||
@@ -205,7 +206,7 @@ class TransportNavigationPanel(
|
||||
if (path.fileSystem.isWindowsFileSystem() && path.pathString == path.fileSystem.separator) {
|
||||
textField.text = StringUtils.EMPTY
|
||||
} else {
|
||||
textField.text = path.absolutePathString()
|
||||
textField.text = FilenameUtils.separatorsToUnix(path.absolutePathString())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
1
src/main/resources/icons/windows7.svg
Normal file
1
src/main/resources/icons/windows7.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 9.8 KiB |
Reference in New Issue
Block a user