mirror of
https://github.com/Rudi9719/kbtui.git
synced 2026-03-22 12:07:23 +00:00
Whoops..
This commit is contained in:
7
main.go
7
main.go
@ -195,6 +195,8 @@ func layout(g *gocui.Gui) error {
|
|||||||
fmt.Fprintf(chatView, "Your chats will appear here.\nSupported commands are as follows:\n")
|
fmt.Fprintf(chatView, "Your chats will appear here.\nSupported commands are as follows:\n")
|
||||||
fmt.Fprintln(chatView, "/j $username - Open your chat with $username")
|
fmt.Fprintln(chatView, "/j $username - Open your chat with $username")
|
||||||
fmt.Fprintln(chatView, "/j $team $channel - Open $channel from $team")
|
fmt.Fprintln(chatView, "/j $team $channel - Open $channel from $team")
|
||||||
|
fmt.Fprintln(chatView, "/u $path $title - Uploads file $path with title $title")
|
||||||
|
fmt.Fprintln(chatView, "/d $msgId $downloadName - Downloads file from $msgId to $DownloadPath/$downloadName")
|
||||||
fmt.Fprintln(chatView, "/s - Experimental: View all incoming messages from everywhere.")
|
fmt.Fprintln(chatView, "/s - Experimental: View all incoming messages from everywhere.")
|
||||||
fmt.Fprintln(chatView, " Please note: small teams only have #general")
|
fmt.Fprintln(chatView, " Please note: small teams only have #general")
|
||||||
fmt.Fprintln(chatView, "/q - Exit")
|
fmt.Fprintln(chatView, "/q - Exit")
|
||||||
@ -344,7 +346,7 @@ func handleInput(g *gocui.Gui) error {
|
|||||||
uploadFile(g, filePath, fileName)
|
uploadFile(g, filePath, fileName)
|
||||||
} else if len(command) == 2 {
|
} else if len(command) == 2 {
|
||||||
filePath := command[1]
|
filePath := command[1]
|
||||||
fileName := "kbtui_upload"
|
fileName := ""
|
||||||
uploadFile(g, filePath, fileName)
|
uploadFile(g, filePath, fileName)
|
||||||
} else {
|
} else {
|
||||||
printToView(g, "Feed", "To upload a file, supply full path and optional title (no spaces)")
|
printToView(g, "Feed", "To upload a file, supply full path and optional title (no spaces)")
|
||||||
@ -363,8 +365,7 @@ func handleInput(g *gocui.Gui) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
printToView(g, "Feed", "Invalid message ID")
|
printToView(g, "Feed", "Invalid message ID")
|
||||||
} else {
|
} else {
|
||||||
fileName := command[1]
|
downloadFile(g, messageId, command[1])
|
||||||
downloadFile(g, messageId, fileName)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case "/s":
|
case "/s":
|
||||||
|
|||||||
Reference in New Issue
Block a user