migrate to daisy UI v3.0.3

This commit is contained in:
Alex Turchyn
2023-06-04 21:30:50 +03:00
parent f5c00ada31
commit 0c7ac32935
10 changed files with 115 additions and 156 deletions
@@ -1,17 +1,15 @@
<% if resource.errors.any? %>
<div id="error_explanation" data-turbo-cache="false">
<div class="alert">
<svg xmlns="http://www.w3.org/2000/svg" class="stroke-current shrink-0 h-6 w-6" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
<div>
<svg xmlns="http://www.w3.org/2000/svg" class="stroke-current shrink-0 h-6 w-6" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
<div>
<h3 class="font-bold">
<%= I18n.t('errors.messages.not_saved',
<h3 class="font-bold">
<%= I18n.t('errors.messages.not_saved',
count: resource.errors.count,
resource: resource.class.model_name.human.downcase) %></h3>
<% resource.errors.full_messages.each do |message| %>
<p class="text-sm"><%= message %></p>
<% end %>
</div>
<% resource.errors.full_messages.each do |message| %>
<p class="text-sm"><%= message %></p>
<% end %>
</div>
</div>
</div>
+4 -4
View File
@@ -18,11 +18,11 @@
<div id="flash" class="absolute top-0 w-full h-0">
<div class="max-w-xl mx-auto mt-1.5">
<div class="alert py-3">
<div class="flex w-full justify-between">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-info flex-shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
<span class="w-full"><%= flash[:notice] || flash[:alert] %></span>
<a href="#" onclick="[event.preventDefault(), window.flash.remove()]">&times;</a>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-info flex-shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
<div>
<span><%= flash[:notice] || flash[:alert] %></span>
</div>
<a href="#" class="w-6 h-6 rounded-lg text-center hover:bg-base-300" onclick="[event.preventDefault(), window.flash.remove()]">&times;</a>
</div>
</div>
</div>
+3 -3
View File
@@ -6,15 +6,15 @@
<% if signed_in? %>
<div class="space-x-6">
<%= link_to 'Settings', settings_storage_index_path, class: 'font-medium text-lg' %>
<div class="dropdown dropdown-end">
<div class="dropdown dropdown-end z-50">
<label tabindex="0" class="cursor-pointer bg-neutral-focus text-neutral-content rounded-full w-8 p-2">
<span class="text-sm align-text-top"><%= current_user.initials %></span>
</label>
<ul tabindex="0" class="dropdown-content p-2 mt-2 shadow menu bg-base-100 rounded-box whitespace-nowrap">
<li class>
<li>
<%= link_to 'Profile', settings_profile_index_path, class: 'text-right' %>
</li>
<li class>
<li>
<%= link_to 'Sign out', destroy_user_session_path, data: { turbo_method: :delete } %>
</li>
</ul>
+2 -2
View File
@@ -1,7 +1,7 @@
<menu-active class="block w-full md:w-52">
<div class="-ml-3.5">
<ul class="menu menu-compact px-2 space-y-1">
<li class="menu-title"><span>Settings</span></li>
<ul class="menu menu-compact px-2 py-0 space-y-1">
<li class="menu-title !pt-0"><span>Settings</span></li>
<li></li>
<li>
<%= link_to 'Profile', settings_profile_index_path, class: "text-base hover:bg-base-300" %>
@@ -2,15 +2,13 @@
<%= ff.hidden_field :service, value: 'disk' %>
<% end %>
<div class="alert my-4">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-current flex-shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
<div>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-current flex-shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
<div>
<h3 class="font-bold">Store all files on disk</h3>
<p class="text-gray-700">
No configs are needed but make sure your disk is persistent
<br>
<i>(not suitable for Heroku and other PaaS)</i>
</p>
</div>
<h3 class="font-bold">Store all files on disk</h3>
<p class="text-gray-700">
No configs are needed but make sure your disk is persistent
<br>
<i>(not suitable for Heroku and other PaaS)</i>
</p>
</div>
</div>
+17 -25
View File
@@ -1,29 +1,21 @@
<div class="card card-compact bg-primary mb-12 md:card-normal">
<div class="card card-compact bg-primary mb-12 md:card-normal">
<div class="card-body">
<h2 class="card-title text-4xl flex justify-between">
<%= @template.name %>
<%= link_to 'Edit', template_path(@template), class: 'btn btn-outline btn-sm' %>
</h2>
<div class="form-control">
<label class="label">
<span class="label-text text-opacity-70">Send this link your clients who must sign this document</span>
</label>
<label class="input-group input-group-lg">
<input id="share-link-input" autocomplete="off" type="text" class="input input-bordered w-full" value="<%= start_form_url(slug: @template.slug) %>" disabled>
<clipboard-copy class="btn btn-square text-white bg-neutral font-bold swap hover:bg-opacity-70 active:bg-opacity-90" for="share-link-input">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 swap-off" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<path d="M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2" />
<path d="M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 swap-on" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<path d="M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2" />
<path d="M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z" />
<path d="M9 14l2 2l4 -4" />
</svg>
</clipboard-copy>
</label>
<div class="join w-full">
<buttun class="btn bg-neutral btn-disabled text-white join-item">
Share link
</buttun>
<input id="share-link-input" autocomplete="off" type="text" class="input input-bordered w-full join-item" value="<%= start_form_url(slug: @template.slug) %>" disabled>
<clipboard-copy class="btn btn-neutral btn-square join-item text-white font-bold" for="share-link-input">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<path d="M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2" />
<path d="M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z" />
</svg>
</clipboard-copy>
</div>
</div>
</div>
@@ -40,9 +32,9 @@
</div>
<div class="overflow-x-auto">
<%- if @submissions.any? %>
<table class="table w-full">
<thead>
<tr>
<table class="table w-full table-lg rounded-t-2xl overflow-hidden">
<thead class="bg-base-200">
<tr class="text-neutral uppercase">
<th>
Email
</th>
@@ -60,7 +52,7 @@
<%= submission.email %>
</td>
<td>
<span class="badge badge-accent">
<span class="badge badge-info badge-outline">
<%= submission.status.humanize %>
</span>
</td>
+63 -64
View File
@@ -1,67 +1,66 @@
<div class="flex flex-wrap space-y-4 md:flex-nowrap md:space-y-0 md:space-x-2">
<%= render 'shared/settings_nav' %>
<div class="flex-grow">
<div class="flex justify-between mb-4">
<h1 class="text-4xl font-bold">Team</h1>
<%= link_to new_user_path, class: 'btn btn-primary btn-md gap-2', data: { turbo_frame: 'modal' } do %>
<svg class="w-6 h-6" xmlns="http://www.w3.org/2000/svg" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<line x1="12" y1="5" x2="12" y2="19" />
<line x1="5" y1="12" x2="19" y2="12" />
</svg>
<span>New User</span>
<% end %>
</div>
<div class="overflow-x-auto">
<table class="table w-full">
<thead>
<tr>
<th scope="col">
Name
</th>
<th scope="col">
Email
</th>
<th scope="col">
Role
</th>
<th scope="col">
Last session
</th>
<th scope="col" class="text-right" width="1px">
</th>
<div class="flex flex-wrap space-y-4 md:flex-nowrap md:space-y-0 md:space-x-2">
<%= render 'shared/settings_nav' %>
<div class="flex-grow">
<div class="flex justify-between mb-4">
<h1 class="text-4xl font-bold">Team</h1>
<%= link_to new_user_path, class: 'btn btn-primary btn-md gap-2', data: { turbo_frame: 'modal' } do %>
<svg class="w-6 h-6" xmlns="http://www.w3.org/2000/svg" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<line x1="12" y1="5" x2="12" y2="19" />
<line x1="5" y1="12" x2="19" y2="12" />
</svg>
<span>New User</span>
<% end %>
</div>
<div class="overflow-x-auto">
<table class="table w-full table-lg rounded-t-2xl overflow-hidden">
<thead class="bg-base-200">
<tr class="text-neutral uppercase">
<th>
Name
</th>
<th>
Email
</th>
<th>
Role
</th>
<th>
Last session
</th>
<th class="text-right" width="1px">
</th>
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<tr scope="row">
<td>
<%= user.full_name %>
</td>
<td>
<%= user.email %>
</td>
<td>
<span class="badge badge-success badge-outline">
<%= user.role %>
</span>
</td>
<td>
<%= user.last_sign_in_at ? l(user.last_sign_in_at, format: :short) : '-' %>
</td>
<td class="flex items-center space-x-2 justify-end">
<%= link_to edit_user_path(user), class: 'btn btn-outline btn-xs', title: 'Edit', data: { turbo_frame: 'modal' } do %>
Edit
<% end %>
<%= link_to user_path(user), class: 'btn btn-outline btn-error btn-xs', title: 'Delete', data: { turbo_method: :delete, turbo_confirm: 'Are you sure?' } do %>
Remove
<% end %>
</td>
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<tr scope="row">
<td>
<%= user.full_name %>
</td>
<td>
<%= user.email %>
</td>
<td>
<span class="badge badge-success badge-outline">
<%= user.role %>
</span>
</td>
<td>
<%= user.last_sign_in_at ? l(user.last_sign_in_at, format: :short) : '-' %>
</td>
<td class="flex items-center space-x-2 justify-end">
<%= link_to edit_user_path(user), class: 'btn btn-outline btn-xs', title: 'Edit', data: { turbo_frame: 'modal' } do %>
Edit
<% end %>
<%= link_to user_path(user), class: 'btn btn-outline btn-error btn-xs', title: 'Delete', data: { turbo_method: :delete, turbo_confirm: 'Are you sure?' } do %>
Remove
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
<% end %>
</tbody>
</table>
</div>
</div>
</div>