toddsundsted / ktistec

Single user ActivityPub (https://www.w3.org/TR/activitypub/) server.
GNU Affero General Public License v3.0
360 stars 20 forks source link

How to see all posts by a user from the followers. #35

Closed vrthra closed 1 year ago

vrthra commented 1 year ago

If I click the username from the front page, Ktitstec takes me to the /remote/actors page which lets me see all posts. Is there a way I can do this from the Following/Followers page? Currently clicking on their names takes me to their server.

JayVii commented 1 year ago

I'd also argue, clicking on an actor, be it in your timeline or in the followers list, should always bring you to the local actors page of your instance. On that local actors page could be an Option for their remote home profile.

I would like to suggest to also expand this to posts. I.e. posts and threads could have a small icon to open that post on the author's instance. Because sometimes it is helpful to share the URL to someone's post, which currently does not work in ktistec

toddsundsted commented 1 year ago

i generally agree with these suggestions. is there an existing example (maybe mastodon) that does this well? i don't recall an specific links to link out (though i might have simply missed them).

vrthra commented 1 year ago

This does what I want; Would there be interest in incorporating something like this upstream?

diff --git a/src/views/partials/actor-card.html.slang b/src/views/partials/actor-card.html.slang
index 8bf103b..2f35ced 100644
--- a/src/views/partials/actor-card.html.slang
+++ b/src/views/partials/actor-card.html.slang
@@ -14,8 +14,10 @@
       .extra.content
         p == s summary
   .extra.content
-    a.left.floated href=actor.iri
+    a.left.floated href=("/remote/actors/" + actor.id.to_s)
       .meta= actor.display_name
+    br
+    a.left.floated href=actor.iri
       .meta= actor.account_uri
     - if (_account = env.account?) && _account.actor != actor
       - if env.request.path =~ /followers$/ && actor.follows?(_account.actor, confirmed: false) && (_follow = ActivityPub::Activity::Follow.follows?(actor, _account.actor))
vrthra commented 1 year ago

This is also helpful --- adds a link to local actor page from search results

diff --git a/src/views/partials/actor-panel.html.slang b/src/views/partials/actor-panel.html.slang
index ec813f6..e008dce 100644
--- a/src/views/partials/actor-panel.html.slang
+++ b/src/views/partials/actor-panel.html.slang
@@ -13,7 +13,7 @@
       - else
         i.user.icon
     .ui.segment
-      = actor.display_name
+      a href=("/remote/actors/" + actor.id.to_s) = actor.display_name
       br: a href=actor.display_link = actor.account_uri
       - if (summary = actor.summary.presence)
         br: == s summary
toddsundsted commented 1 year ago

yes, this would be great and i'd love a PR. if you create a PR, my only suggestion would be to use remote_actor_path(actor) in place of "/remote/actors/" + actor.id.to_s). otherwise this is perfect!