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 11 additions and 14 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;

File diff suppressed because one or more lines are too long

View file

@ -11,5 +11,5 @@
"/js/profile.js": "/js/profile.js?id=2043c303330c48d1fb55",
"/js/search.js": "/js/search.js?id=0d3d080dc05f4f49b204",
"/js/status.js": "/js/status.js?id=0b11c2129b9ebdb0eddf",
"/js/timeline.js": "/js/timeline.js?id=8851cf4695b3bb2d1a03"
"/js/timeline.js": "/js/timeline.js?id=4cc8011487b7b60bd26d"
}

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