Link message about how to setup project tracking

This commit is contained in:
Max Wofford
2025-03-19 16:11:06 -04:00
parent 27196e1b03
commit 1bbbf69077
3 changed files with 13 additions and 0 deletions

View File

@@ -41,6 +41,11 @@
<% end %>
<span class="user">
<%= render "shared/user_mention", user: entry.user, show: [:neighborhood] %>
<% if entry.user == current_user && current_user.github_username.blank? %>
<span class="super">
<%= link_to "Link active projects", my_settings_path(anchor: "user_github_account"), target: "_blank" %>
</span>
<% end %>
<% if @active_projects&.dig(entry.user_id).present? %>
<span class="super">
working on <%= link_to @active_projects[entry.user_id].project_name, @active_projects[entry.user_id].repo_url, target: "_blank" %>

View File

@@ -18,6 +18,11 @@
working on <%= link_to active_projects[user.id].project_name, active_projects[user.id].repo_url, target: "_blank" %>
</span>
<% end %>
<% if user == current_user && user.github_username.blank? %>
<span class="super">
<%= link_to "Link active projects", my_settings_path(anchor: "user_github_account"), target: "_blank" %>
</span>
<% end %>
<% end %>
</ul>
</div>

View File

@@ -45,6 +45,9 @@
<div>
<h2 id="user_github_account">GitHub Account</h2>
<p>
This is used to show your active projects on the leaderboard & current hacking activity on the dashboard.
</p>
<% if @user.github_uid.present? %>
<p>Your GitHub account is linked. <%= link_to "@#{@user.github_username}", "https://github.com/#{@user.github_username}", target: "_blank" %></p>
<% else %>