From 66f44a9d26c7d8b429ad069c27d0df230c01a28f Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 27 Apr 2020 21:28:37 -0600 Subject: [PATCH] Update RemoteProfile.vue component, add warning for empty profiles and last_fetched_at --- .../assets/js/components/RemoteProfile.vue | 38 +++++++++++++++++-- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/resources/assets/js/components/RemoteProfile.vue b/resources/assets/js/components/RemoteProfile.vue index dc425050..a0eb9f86 100644 --- a/resources/assets/js/components/RemoteProfile.vue +++ b/resources/assets/js/components/RemoteProfile.vue @@ -33,8 +33,7 @@

{{profile.display_name}}

-

{{profile.acct}}

-

+

{{profile.acct}}

{{profile.statuses_count}} @@ -49,8 +48,10 @@ Followers

+

+

Last updated:

@@ -110,9 +111,18 @@
- + @@ -191,6 +201,8 @@ warning: false, ctxMenuStatus: false, ctxMenuRelationship: false, + fetchingRemotePosts: false, + showMutualFollowers: false } }, @@ -451,6 +463,24 @@ swal('Error', 'Something went wrong. Please try again later.', 'error'); }); }, + + manuallyFetchRemotePosts($event) { + this.fetchingRemotePosts = true; + event.target.blur(); + swal( + 'Fetching Remote Posts', + 'Check back in a few minutes!', + 'info' + ); + }, + + timeAgo(ts, suffix = false) { + if(ts == null) { + return 'never'; + } + suffix = suffix ? ' ' + suffix : ''; + return App.util.format.timeAgo(ts) + suffix; + }, } }