2024-06-12 22:37:13 +00:00
|
|
|
package cli
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
2024-08-20 14:28:49 +00:00
|
|
|
"io"
|
2024-06-12 22:37:13 +00:00
|
|
|
"sevenkeys/database"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
selectedCardPrintingSearchLine string
|
|
|
|
|
|
|
|
copiesInserted int
|
|
|
|
)
|
|
|
|
|
|
|
|
func getInfoDisplay(info string) string {
|
|
|
|
if info == "" {
|
|
|
|
return "[EMPTY]"
|
|
|
|
}
|
|
|
|
|
|
|
|
return info
|
|
|
|
}
|
|
|
|
|
2024-08-20 14:28:49 +00:00
|
|
|
func showStorageInfo(w io.Writer, area database.StorageArea) {
|
|
|
|
fmt.Fprint(w, "Selected Storage Area: ")
|
2024-09-05 09:53:14 +00:00
|
|
|
if area.Name == "" { // TODO: Add a struct method to determine whether it is unset?
|
2024-08-20 14:28:49 +00:00
|
|
|
fmt.Fprint(w, "[None]\n")
|
|
|
|
return
|
|
|
|
}
|
2024-06-12 22:37:13 +00:00
|
|
|
|
2024-08-20 17:50:38 +00:00
|
|
|
fmt.Fprintf(w, "%s (%s)\n", area.Name, area.StorageType)
|
2024-08-20 14:28:49 +00:00
|
|
|
return
|
2024-06-12 22:37:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func showCopiesInserted() {
|
|
|
|
fmt.Println("Copies inserted:", copiesInserted)
|
|
|
|
}
|