feat: 完成了 新建桶; 上传文件(基本功能)
todo: 上传 rename, 上传 public 权限选择 bug: 首次加载 conns list; 上传的时候前缀过滤失败
This commit is contained in:
@@ -54,11 +54,19 @@ const useStyles = makeStyles({
|
||||
export function Path() {
|
||||
const styles = useStyles()
|
||||
const {conn_active} = useStoreConnection()
|
||||
const {bucket_active} = useStoreBucket()
|
||||
const {bucket_active, bucket_get, bucket_set} = useStoreBucket()
|
||||
const {prefix, files_get} = useStoreFile()
|
||||
|
||||
async function handleClickUp() {
|
||||
const dirs = prefix.split('/').filter((item => item))
|
||||
if (dirs.length > 0) {
|
||||
dirs.pop()
|
||||
files_get(conn_active!, bucket_active!, dirs.join("/"))
|
||||
return
|
||||
}
|
||||
|
||||
bucket_get(conn_active!, false)
|
||||
bucket_set(null)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user