(Update) Add Torrent List Setting

- Torrents Layout Setting
- You can now set your default torrents layout. Then when you visit
torrents icon in side nav it will automatically goto your preferred
torrents layout. You can find this new setting on your Account Settings
page.
- The default is the original Torrent List Layout.
- requires `php artisan migrate`
- - requires `php artisan clear:all`
This commit is contained in:
HDVinnie
2018-05-20 22:57:39 -04:00
parent 6c63272b1d
commit 04b8a3e1fd
5 changed files with 59 additions and 5 deletions
+2 -1
View File
@@ -104,7 +104,7 @@ class UserController extends Controller
$user = auth()->user();
// Avatar
$max_upload = config('image.max_upload_size');
if ($request->hasFile('image')) {
if ($request->hasFile('image') && $request->file('image')->getError() == 0) {
$image = $request->file('image');
if (in_array($image->getClientOriginalExtension(), ['jpg', 'JPG', 'jpeg', 'bmp', 'png', 'PNG', 'tiff', 'gif']) && preg_match('#image/*#', $image->getMimeType())) {
if ($max_upload >= $image->getSize()) {
@@ -183,6 +183,7 @@ class UserController extends Controller
$user->peer_hidden = $request->input('peer_hidden');
// Torrent Settings
$user->torrent_layout = (int)$request->input('torrent_layout');
$user->show_poster = $request->input('show_poster');
$user->ratings = $request->input('ratings');