Skip to content

Commit fc8ef33

Browse files
flavorjonesclaude
andcommitted
Show unverified status on user profile page
Display "Unverified" with an explanation instead of the email address for users who haven't confirmed their identity. Hide the card links and activity timeline since unverified users won't have any activity. Co-Authored-By: Claude <[email protected]>
1 parent 1ad52d2 commit fc8ef33

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

app/views/users/show.html.erb

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,25 @@
1818
<div class="flex flex-column gap-half margin-block-end">
1919
<h1 class="txt-x-large margin-none"><%= @user.name %></h1>
2020
<div class="txt-medium">
21-
<% if @user.active? %>
22-
<%= mail_to @user.identity.email_address %>
23-
<% else %>
21+
<% if !@user.active? %>
2422
<%= @user.name %> is no longer on this account
23+
<% elsif !@user.verified? %>
24+
Unverified
25+
<div class="txt-small txt-tinted">A sign-in code has been sent to this email address, but the user has not yet logged in to confirm their identity.</div>
26+
<% else %>
27+
<%= mail_to @user.identity.email_address %>
2528
<% end %>
2629
</div>
2730
</div>
2831

29-
<div class="flex-inline center justify-center flex-wrap gap">
30-
<%= link_to "Which cards are assigned to #{me_or_you}?",
31-
cards_path(assignee_ids: [ @user.id ], sorted_by: "newest"), class: "btn", data: { turbo_frame: "_top" } %>
32-
<%= link_to "Which cards were added by #{me_or_you}?",
33-
cards_path(creator_ids: [ @user.id ], sorted_by: "newest"), class: "btn", data: { turbo_frame: "_top" } %>
34-
</div>
32+
<% if @user.verified? %>
33+
<div class="flex-inline center justify-center flex-wrap gap">
34+
<%= link_to "Which cards are assigned to #{me_or_you}?",
35+
cards_path(assignee_ids: [ @user.id ], sorted_by: "newest"), class: "btn", data: { turbo_frame: "_top" } %>
36+
<%= link_to "Which cards were added by #{me_or_you}?",
37+
cards_path(creator_ids: [ @user.id ], sorted_by: "newest"), class: "btn", data: { turbo_frame: "_top" } %>
38+
</div>
39+
<% end %>
3540
</div>
3641
</section>
3742

@@ -48,4 +53,6 @@
4853
<% end %>
4954
</div>
5055

51-
<%= turbo_frame_tag "user_events", src: user_events_path(@user) %>
56+
<% if @user.verified? %>
57+
<%= turbo_frame_tag "user_events", src: user_events_path(@user) %>
58+
<% end %>

0 commit comments

Comments
 (0)