forked from Elara6331/itd
Add rewritten infinitime abstraction and integrate it into ITD
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/cheggaaa/pb/v3"
|
||||
"github.com/urfave/cli/v2"
|
||||
"go.elara.ws/infinitime"
|
||||
"go.elara.ws/itd/infinitime"
|
||||
)
|
||||
|
||||
func resourcesLoad(c *cli.Context) error {
|
||||
@@ -39,7 +39,7 @@ func resLoad(ctx context.Context, args []string) error {
|
||||
return evt.Err
|
||||
}
|
||||
|
||||
if evt.Operation == infinitime.ResourceOperationRemoveObsolete {
|
||||
if evt.Operation == infinitime.ResourceRemove {
|
||||
bar.SetTemplateString(rmTmpl)
|
||||
bar.Set("filename", evt.Name)
|
||||
} else {
|
||||
|
||||
@@ -11,8 +11,8 @@ import (
|
||||
"fyne.io/fyne/v2/storage"
|
||||
"fyne.io/fyne/v2/theme"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
"go.elara.ws/infinitime"
|
||||
"go.elara.ws/itd/api"
|
||||
"go.elara.ws/itd/infinitime"
|
||||
)
|
||||
|
||||
func fsTab(ctx context.Context, client *api.Client, w fyne.Window, opened chan struct{}) fyne.CanvasObject {
|
||||
@@ -77,9 +77,9 @@ func fsTab(ctx context.Context, client *api.Client, w fyne.Window, opened chan s
|
||||
|
||||
for evt := range progCh {
|
||||
switch evt.Operation {
|
||||
case infinitime.ResourceOperationRemoveObsolete:
|
||||
case infinitime.ResourceRemove:
|
||||
progressDlg.SetText("Removing " + evt.Name)
|
||||
case infinitime.ResourceOperationUpload:
|
||||
case infinitime.ResourceUpload:
|
||||
progressDlg.SetText("Uploading " + evt.Name)
|
||||
progressDlg.SetTotal(float64(evt.Total))
|
||||
progressDlg.SetValue(float64(evt.Sent))
|
||||
|
||||
Reference in New Issue
Block a user