feat(single): align author bar follow and reward actions with the site flows

- guests get the sign-in trigger instead of a redirect to the login page,
  for both follow and wallet reward controls
- follow requests swap the label for an inline loader and block a second
  submit; the followed state uses the .actived hook
- follower counts sync through data-follow-count on the user homepage
  (the previous selector matched nothing) and only for the viewed profile
- reward button uses the secondary action colour; the reward template is
  only rendered for signed-in visitors
- drop the unused author-hero aria-disabled rule and stale wording in the
  touched comments

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Fable 5 committed 2026-11-04 13:34:34 +08:00
1 parent 8ad5ef9aff
commit d40906b4a3
13 files changed
+148 -56

No files matched your search

@@ -47,7 +47,7 @@ $result = $follow
<div class="uc-follow-management__identity"><a href="<?php echo esc_url($home_url); ?>"><?php echo esc_html((string) ($item['display_name'] ?? '')); ?></a><span><?php echo esc_html(sprintf(__('关注于 %s', 'jio'), get_date_from_gmt((string) ($item['created_at'] ?? ''), get_option('date_format')))); ?></span></div>
<div class="uc-follow-management__actions">
<a class="btn-ghost btn-sm" href="<?php echo esc_url($home_url); ?>"><?php esc_html_e('主页', 'jio'); ?></a>
<?php if ($active_list === 'following') : ?><button type="button" class="btn-outline btn-sm is-following" data-jio-follow="<?php echo esc_attr((string) $member_id); ?>"><i class="fa fas fa-heart" aria-hidden="true"></i><span data-jio-follow-label><?php esc_html_e('已关注', 'jio'); ?></span></button><?php endif; ?>
<?php if ($active_list === 'following') : ?><button type="button" class="btn-outline btn-sm actived" data-jio-follow="<?php echo esc_attr((string) $member_id); ?>" data-jio-follow-text="<?php esc_attr_e('关注', 'jio'); ?>" data-jio-follow-ok="<?php esc_attr_e('已关注', 'jio'); ?>"><i class="fa fas fa-heart" aria-hidden="true"></i><span data-jio-follow-label><?php esc_html_e('已关注', 'jio'); ?></span></button><?php endif; ?>
</div>
</div>
<?php endforeach; ?>