mirror of
https://github.com/System-End/identity-vault.git
synced 2026-04-19 18:35:13 +00:00
* first srcl pass! * HOLY MFIN KBAR * first last search * put the borders back * button! * oops * toolbar! * lol * bump dreamland, make kbar actually reactive? * shorter timeout lol * identity picker component * nuke that lol * seen_hints * woah * hint sys pt 1 * HINTS * HINTS AND SHORTCUTS * styles, BACKSPACE * nav on home * bananananana * click, starring adam sandler * scrool * lint pass * autoed complete * shut * brake the man * dunno why those got unmerged * path oopsie * backspace on audit logs * whitespace * i thought i told you to shut up * mr. brakeman
23 lines
573 B
Ruby
23 lines
573 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Components::UserMention < Components::Base
|
|
extend Literal::Properties
|
|
|
|
prop :user, _Union(::Backend::User, ::Identity), :positional
|
|
|
|
def view_template
|
|
span class: "user-mention" do
|
|
case @user
|
|
when ::Backend::User
|
|
a(href: backend_user_path(@user)) do
|
|
plain @user.username
|
|
plain " ⚡" if @user.super_admin?
|
|
end
|
|
when ::Identity
|
|
a(href: backend_identity_path(@user)) do
|
|
plain "#{@user.first_name} #{@user.last_name}"
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|