add UI for member index v2 actions (#17739)

This commit is contained in:
Suzanne Aitchison 2022-05-23 14:55:28 +01:00 committed by GitHub
parent 799031f23b
commit 5f12358040
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 1 deletions

View file

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="m2.636 1.575 14.32 14.319-1.062 1.061-1.51-1.511a4.488 4.488 0 0 1-1.634.306h-7.5a4.5 4.5 0 0 1-1.494-8.746 5.244 5.244 0 0 1 .265-1.922L1.575 2.636l1.061-1.061ZM12.75 6.75a4.503 4.503 0 0 1 3.903 6.742l-6.146-6.145a4.483 4.483 0 0 1 2.243-.597ZM9 1.5a5.252 5.252 0 0 1 5.074 3.896 6.02 6.02 0 0 0-4.655.863L5.77 2.61A5.227 5.227 0 0 1 9 1.5Z"/>
</svg>

After

Width:  |  Height:  |  Size: 462 B

View file

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path clip-rule="evenodd" d="M19 22H5a3 3 0 0 1-3-3V3a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v12h4v4a3 3 0 0 1-3 3Zm-1-5v2a1 1 0 0 0 2 0v-2h-2ZM14 7H6v2h8V7Zm0 4H6v2h8v-2Zm-8 4h5v2H6v-2Z"/>
</svg>

After

Width:  |  Height:  |  Size: 288 B

View file

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11 19V9H4v10h7Zm0-12V4a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h8Zm2-2v14h7V5h-7Z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M13 5h7v14h-7V5ZM4 9h7v10H4V9Zm15 1h-5v2h5v-2Zm-5 3h5v2h-5v-2Zm-4 3H5v2h5v-2Zm9 0h-5v2h5v-2ZM5 13h5v2H5v-2Z" fill="#08090A"/>
</svg>

After

Width:  |  Height:  |  Size: 419 B

View file

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path clip-rule="evenodd" d="M1.5 9a7.5 7.5 0 1 1 15 0 7.5 7.5 0 0 1-15 0Zm6.75 2.25v1.5h1.5v-1.5h-1.5Zm0-6v4.5h1.5v-4.5h-1.5Z"/>
</svg>

After

Width:  |  Height:  |  Size: 237 B

View file

@ -4,6 +4,19 @@
<%= crayons_icon_tag("overflow-vertical", aria_hidden: true) %>
</button>
<div id="<%= id %>-action-dropdown" class="crayons-dropdown right-0">
<button data-copy-email="<%= user.email %>" type="button" class="c-btn w-100 align-left"> <%= crayons_icon_tag("copy", aria_hidden: true) %>Copy email address</button>
<ul class="list-none">
<% if FeatureFlag.enabled?(:member_index_view) %>
<li><button class="c-btn align-left w-100 c-btn--icon-left"><%= crayons_icon_tag("badge", aria_hidden: true, class: "c-btn__icon") %>Assign role</button></li>
<li><button class="c-btn align-left w-100 c-btn--icon-left"><%= crayons_icon_tag("organization2", aria_hidden: true, class: "c-btn__icon") %>Add organization</button></li>
<li><button class="c-btn align-left w-100 c-btn--icon-left"><%= crayons_icon_tag("wallet", aria_hidden: true, class: "c-btn__icon") %>Adjust credit balance</button><hr /></li>
<% end %>
<li><button data-copy-email="<%= user.email %>" type="button" class="c-btn w-100 align-left c-btn--icon-left"> <%= crayons_icon_tag("copy", aria_hidden: true, class: "c-btn__icon") %>Copy email address</button></li>
<% if FeatureFlag.enabled?(:member_index_view) %>
<li><button class="c-btn align-left w-100 c-btn--icon-left"><%= crayons_icon_tag("email", aria_hidden: true, class: "c-btn__icon") %>Send an email</button></li>
<li><button class="c-btn align-left w-100 c-btn--icon-left"><%= crayons_icon_tag("note", aria_hidden: true, class: "c-btn__icon") %>Write a note</button><hr /></li>
<li><button class="c-btn align-left w-100 c-btn--icon-left"><%= crayons_icon_tag("cloud-off", aria_hidden: true, class: "c-btn__icon") %>Unpublish all posts</button></li>
<li><button class="c-btn align-left w-100 c-btn--icon-left"><%= crayons_icon_tag("warning", aria_hidden: true, class: "c-btn__icon") %>Banish user</button></li>
<% end %>
</ul>
</div>
</div>