mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-09 13:50:44 +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());
|
$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)
|
public function notifications(Request $request)
|
||||||
{
|
{
|
||||||
$pid = Auth::user()->profile->id;
|
$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() {
|
mounted() {
|
||||||
this.fetchNotifications();
|
if(window.outerWidth > 767) {
|
||||||
|
this.fetchNotifications();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
updated() {
|
updated() {
|
||||||
|
|
|
@ -397,7 +397,9 @@
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.config = res.data;
|
this.config = res.data;
|
||||||
this.fetchTimelineApi();
|
this.fetchTimelineApi();
|
||||||
this.fetchProfile();
|
if(window.outerWidth > 767) {
|
||||||
|
this.fetchProfile();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -459,7 +461,9 @@
|
||||||
this.max_id = Math.min(...ids);
|
this.max_id = Math.min(...ids);
|
||||||
$('.timeline .pagination').removeClass('d-none');
|
$('.timeline .pagination').removeClass('d-none');
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.expRec();
|
if(window.outerWidth > 767) {
|
||||||
|
this.expRec();
|
||||||
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue