Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filebrowser #3053

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Filebrowser #3053

wants to merge 3 commits into from

Conversation

kasbert
Copy link

@kasbert kasbert commented Jan 8, 2025

Browse container or local files and upload or download selected file or directory.

Pressing 'B' in pod or container view opens a remote file list.
'T' or Space in remote file list downloads the file or directory.
Pressing 'L' in remote file list opens a local file list.
'T' or Space in local file list uploads the file or directory to the previously selected remote directory.

@derailed derailed added the enhancement New feature or request label Jan 19, 2025
Copy link
Owner

@derailed derailed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gerhard Thank you for this Gerhard!! Very nice feature and useful feature!


// It would be better to list files here ?
// No access to view/exec.go, though
txt, ok := ctx.Value(internal.KeyContents).(string)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed! Not keen on stuffing the dir contents into the context. Best if it worked like local list. I think we should have a util call to list out dir content on a pod. If the container is not specified, we can use the main container.

if name == "../" && dir == "/" {
continue
}
//if strings.HasSuffix(name, "/") { // directory
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

return d.transferCmd(evt)
}

/*
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

}

/*
v := NewDirRemote(d.fqn, d.co, d.os, dir, str)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Retries: defaultTxRetries,
Cancel: func() {},
}
dialog.ShowUploads(d.App().Styles.Dialog(), d.App().Content.Pages, opts)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should have a base transfer dialog for this. Based on the context aka loca/remote the Download toggle does not mean much anymore and we already know what kind of action should take place ie remote->download local->upload.
Also not keen on the view titles ie Dirlocal or Dirremote perhaps something like Local File System and Remote File System could be more comprehensible??

@derailed derailed added the needs-tlc Pr needs additional updates label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-tlc Pr needs additional updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants