Download REST API endpoints (#72)

* backend and frontend hotfixes, see message

Improved rendering on the frontend by cutting unecessary useStates.
Backend side, downloads now auto resume even on application kill.

* download rest api endpoints, general code refactor

* download request json mappings
This commit is contained in:
Marco
2023-07-31 08:30:09 +02:00
committed by GitHub
parent 68c829c40e
commit 8327d1e94c
22 changed files with 560 additions and 300 deletions

View File

@@ -1,7 +1,5 @@
package cli
import "fmt"
const (
// FG
Red = "\033[31m"
@@ -12,12 +10,8 @@ const (
Cyan = "\033[36m"
Reset = "\033[0m"
// BG
BgRed = "\033[1;41m"
BgBlue = "\033[1;44m"
BgGreen = "\033[1;42m"
BgRed = "\033[1;41m"
BgBlue = "\033[1;44m"
BgGreen = "\033[1;42m"
BgMagenta = "\033[1;45m"
)
// Formats a message with the specified ascii escape code, then reset.
func Format(message string, code string) string {
return fmt.Sprintf("%s%s%s", code, message, Reset)
}