feat: support SMB

This commit is contained in:
hstyi
2025-06-30 17:16:39 +08:00
committed by hstyi
parent eee016c643
commit 036a04b0b3
22 changed files with 641 additions and 3 deletions

View File

@@ -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)

View File

@@ -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") }

View File

@@ -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())
}
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.8 KiB