songtianlun
87e0c2eec6
- Implement theme switching functionality with a new ThemeController - Add ToastController for displaying notifications - Update various views for improved layout and styling - Introduce animations for toast notifications These changes enhance the user experience by allowing users to switch between light and dark themes and receive feedback through toast notifications. The UI has been improved for better accessibility and aesthetics.
24 lines
1.1 KiB
Plaintext
24 lines
1.1 KiB
Plaintext
<div class="card card-compact bg-base-100 shadow-lg hover:shadow-xl transition-shadow">
|
|
<div class="card-body flex-row items-center justify-between">
|
|
<!-- 用户基本信息 -->
|
|
<div class="flex items-center gap-4">
|
|
<%= gravatar_for user, size: 50, class: "rounded-full" %>
|
|
<%= link_to user.name, user,
|
|
class: "link link-hover text-lg font-medium" %>
|
|
</div>
|
|
|
|
<!-- 管理员操作按钮 -->
|
|
<% if current_user.admin? && !current_user?(user) %>
|
|
<%= link_to user,
|
|
data: {
|
|
turbo_method: :delete,
|
|
turbo_confirm: "Are you sure you want to delete this user?"
|
|
},
|
|
class: "btn btn-ghost btn-sm text-error hover:bg-error hover:text-white" do %>
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
|
|
</svg>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
</div> |