Skip to content

Commit

Permalink
feat: SFTP command icon
Browse files Browse the repository at this point in the history
  • Loading branch information
hstyi committed Feb 16, 2025
1 parent 3829dcd commit 621185d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/kotlin/app/termora/Icons.kt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ object Icons {
val import by lazy { DynamicIcon("icons/import.svg", "icons/import_dark.svg") }
val export by lazy { DynamicIcon("icons/export.svg", "icons/export_dark.svg") }
val terminal by lazy { DynamicIcon("icons/terminal.svg", "icons/terminal_dark.svg") }
val fileFormat by lazy { DynamicIcon("icons/fileFormat.svg", "icons/fileFormat_dark.svg") }
val azure by lazy { DynamicIcon("icons/azure.svg", "icons/azure_dark.svg") }
val revert by lazy { DynamicIcon("icons/revert.svg", "icons/revert_dark.svg") }
val edit by lazy { DynamicIcon("icons/edit.svg", "icons/edit_dark.svg") }
Expand Down
5 changes: 5 additions & 0 deletions src/main/kotlin/app/termora/SFTPPtyTerminalTab.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import java.io.File
import java.nio.charset.StandardCharsets
import java.nio.file.Files
import java.nio.file.Path
import javax.swing.Icon
import javax.swing.SwingUtilities

class SFTPPtyTerminalTab(windowScope: WindowScope, host: Host) : PtyHostTerminalTab(windowScope, host) {
Expand Down Expand Up @@ -162,6 +163,10 @@ class SFTPPtyTerminalTab(windowScope: WindowScope, host: Host) : PtyHostTerminal
super.stop()
}

override fun getIcon(): Icon {
return Icons.fileFormat
}

private inner class PasswordReporterDataListener(private val host: Host) : DataListener {
override fun onChanged(key: DataKey<*>, data: Any) {
if (key == VisualTerminal.Written && data is String) {
Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/icons/fileFormat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/main/resources/icons/fileFormat_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 621185d

Please sign in to comment.