mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-25 17:26:43 +00:00
Merge pull request #1226 from pixelfed/frontend-ui-refactor
Frontend ui refactor
This commit is contained in:
commit
4b05aa8946
5 changed files with 9 additions and 12 deletions
|
@ -44,15 +44,6 @@ class BaseApiController extends Controller
|
|||
$this->fractal->setSerializer(new ArraySerializer());
|
||||
}
|
||||
|
||||
public function notification(Request $request, $id)
|
||||
{
|
||||
$notification = Notification::findOrFail($id);
|
||||
$resource = new Fractal\Resource\Item($notification, new NotificationTransformer());
|
||||
$res = $this->fractal->createData($resource)->toArray();
|
||||
|
||||
return response()->json($res);
|
||||
}
|
||||
|
||||
public function notifications(Request $request)
|
||||
{
|
||||
$pid = Auth::user()->profile->id;
|
||||
|
|
BIN
public/js/timeline.js
vendored
BIN
public/js/timeline.js
vendored
Binary file not shown.
Binary file not shown.
|
@ -70,7 +70,9 @@
|
|||
},
|
||||
|
||||
mounted() {
|
||||
this.fetchNotifications();
|
||||
if(window.outerWidth > 767) {
|
||||
this.fetchNotifications();
|
||||
}
|
||||
},
|
||||
|
||||
updated() {
|
||||
|
|
|
@ -397,7 +397,9 @@
|
|||
.then(res => {
|
||||
this.config = res.data;
|
||||
this.fetchTimelineApi();
|
||||
this.fetchProfile();
|
||||
if(window.outerWidth > 767) {
|
||||
this.fetchProfile();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -459,7 +461,9 @@
|
|||
this.max_id = Math.min(...ids);
|
||||
$('.timeline .pagination').removeClass('d-none');
|
||||
this.loading = false;
|
||||
this.expRec();
|
||||
if(window.outerWidth > 767) {
|
||||
this.expRec();
|
||||
}
|
||||
}).catch(err => {
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue