1
0
Fork 1
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:
daniel 2019-04-29 21:00:25 -06:00 committed by GitHub
commit 4b05aa8946
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 12 deletions

View file

@ -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

Binary file not shown.

Binary file not shown.

View file

@ -70,7 +70,9 @@
},
mounted() {
this.fetchNotifications();
if(window.outerWidth > 767) {
this.fetchNotifications();
}
},
updated() {

View file

@ -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 => {
});
},