Skip to content

A self-hosted media server and file management system

Merge branch 'extended-history' into category-indexing-fix

Amin Nausin71a861a31c9b
diff --cc app/Http/Resources/RecordResource.php
index 713ec66b,db7d1334..9086d733
--- a/app/Http/Resources/RecordResource.php
+++ b/app/Http/Resources/RecordResource.php
@@@ -24,10 -23,11 +24,11 @@@ class RecordResource extends JsonResour
'relationships' => [
'user_id' => (string)$this->user->id,
'user_name' => $this->user->name,
- 'video_id' => (string)$this->video->id,
- 'video_name' => $this->video->name,
- 'folder_id' => $this->video->folder_id,
- 'folder_name' => $this->video->folder->name,
- 'category_name' => $this->video->folder->category->name
+ 'video_id' => $this->video ? (string)$this->video->id : null,
+ 'video_name' => $this->video ? $this->video->name : $this->name,
+ 'folder_id' => $this->video ? $this->video->folder_id : null,
- 'folder_name' => $this->video ? $this->video->folder->name : 'Deleted'
++ 'folder_name' => $this->video ? $this->video->folder->name : 'Deleted',
++ 'category_name' => $this->video ? $this->video->folder->category->name : null
]
];
}
diff --cc resources/views/home.blade.php
index 3ca7b227,814c674c..9bb1f58e
--- a/resources/views/home.blade.php
+++ b/resources/views/home.blade.php
@@@ -79,9 -79,8 +79,9 @@@
<button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem">Account settings</button>
<button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem">Collections</button>
<button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem">Dashboard</button>
- <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem">Full History</button>
+ <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem" onclick="window.location.href = '/history' ">Full History</button>
<button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem"><a href="/jobs/indexFiles" class="w-full h-full">Index Files</a></button>
+ <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem"><a href="/jobs/syncFiles" class="w-full h-full">Sync Files</a></button>
<span role="menuitem" tabindex="-1" class="flex justify-between w-full px-4 py-2 text-sm leading-5 text-left text-gray-700 cursor-not-allowed opacity-50" aria-disabled="true">New feature (soon)</span>
</section>
<section class="py-1">
diff --cc routes/web.php
index e3fabcfb,9b04ddc9..8a495557
--- a/routes/web.php
+++ b/routes/web.php
@@@ -31,8 -31,8 +31,9 @@@ Route::get('/error', function () {retur
Route::middleware('auth')->group(function () {
Route::post('/logout', [AuthController::class, 'destroy'])->name('logout');
Route::get('/jobs/indexFiles', [DirectoryController::class, 'indexFiles']);
+ Route::get('/jobs/syncFiles', [DirectoryController::class, 'syncFiles']);
Route::get('/welcome', function () { return view('welcome'); });
+ Route::get('/history', function () { return view('profile/history'); });
// Route::get('/legacy', [DirectoryController::class, 'showDirectory'])->defaults('dir', 'legacy')->defaults('folder_name', 'Unsorted');
// Route::get('/legacy/{folder_name}', [DirectoryController::class, 'showDirectory'])->defaults('dir', 'legacy')->defaults('folder_name', 'Unsorted');
});