mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-07 16:56:40 +08:00
feat: Update user storage options in FileBrowserView
This commit is contained in:
@@ -96,7 +96,7 @@ function loadingChanged(loading: number) {
|
|||||||
// 存储切换
|
// 存储切换
|
||||||
async function storageChanged(storage: string) {
|
async function storageChanged(storage: string) {
|
||||||
activeStorage.value = storage
|
activeStorage.value = storage
|
||||||
emit('pathchanged', { path: '/', fileid: 'root' })
|
emit('pathchanged', { storage: storage, path: '/', fileid: 'root' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 路径变化
|
// 路径变化
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ const endpoints = {
|
|||||||
const user_level = store.state.auth.level
|
const user_level = store.state.auth.level
|
||||||
|
|
||||||
// 用户存储
|
// 用户存储
|
||||||
const userStorage = user_level > 1 ? 'local,aliyun,u115' : 'local'
|
const userStorage = user_level > 1 ? 'local,alipan,u115' : 'local'
|
||||||
|
|
||||||
// 当前文件项
|
// 当前文件项
|
||||||
const operItem = ref<FileItem>({
|
const operItem = ref<FileItem>({
|
||||||
@@ -127,6 +127,18 @@ async function loadDownloadDirectories() {
|
|||||||
// 目录变化
|
// 目录变化
|
||||||
function pathChanged(item: FileItem) {
|
function pathChanged(item: FileItem) {
|
||||||
operItem.value = item
|
operItem.value = item
|
||||||
|
if (item.path == '/') {
|
||||||
|
itemstack.value = [
|
||||||
|
{
|
||||||
|
storage: item.storage,
|
||||||
|
type: 'dir',
|
||||||
|
name: '/',
|
||||||
|
path: '/',
|
||||||
|
fileid: item.fileid || 'root',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
return
|
||||||
|
}
|
||||||
const index = itemstack.value.findIndex(i => i.path === item.path)
|
const index = itemstack.value.findIndex(i => i.path === item.path)
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
itemstack.value = itemstack.value.slice(0, index + 1)
|
itemstack.value = itemstack.value.slice(0, index + 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user