mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
- spotlight refactoring
- subscription widget fix in admin
This commit is contained in:
@@ -898,18 +898,7 @@ export default {
|
||||
params: { query: value },
|
||||
})
|
||||
.then((response) => {
|
||||
// Show user result
|
||||
if (this.activeFilter === 'users') {
|
||||
this.results = response.data
|
||||
}
|
||||
|
||||
// Show file result
|
||||
if (!this.activeFilter) {
|
||||
let files = response.data.files
|
||||
let folders = response.data.folders
|
||||
|
||||
this.results = folders.concat(files)
|
||||
}
|
||||
this.results = response.data.data
|
||||
})
|
||||
.catch(() => this.$isSomethingWrong())
|
||||
.finally(() => (this.isLoading = false))
|
||||
|
||||
@@ -73,7 +73,7 @@ export default {
|
||||
|
||||
this.limitations.push({
|
||||
message: payload.message[key],
|
||||
isVisibleBar: item.total === -1,
|
||||
isVisibleBar: item.total !== -1 && item.total !== 0,
|
||||
distribution: [
|
||||
{
|
||||
progress: item.percentage,
|
||||
|
||||
@@ -96,10 +96,14 @@ class SpotlightSearchController
|
||||
->get()
|
||||
->take(3);
|
||||
|
||||
$entries = collect([
|
||||
$folders ? json_decode((new FolderCollection($folders))->toJson(), true) : null,
|
||||
$files ? json_decode((new FilesCollection($files))->toJson(), true) : null,
|
||||
])->collapse();
|
||||
|
||||
// Collect folders and files to single array
|
||||
return response()->json([
|
||||
'folders' => new FolderCollection($folders),
|
||||
'files' => new FilesCollection($files),
|
||||
'data' => $entries,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user