This commit is contained in:
Jeffrey Hardy
2024-09-13 18:28:12 -04:00
parent 3c57c1583e
commit d98f92f0e6
6 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
<% if bubble.due_on.present? %>
<%= form_with model: bubble, data: { controller: "form" } do | form | %>
<%= form_with model: bubble, data: { controller: "form" } do |form| %>
<label class="bubble__bubble bubble__meta bubble__date">
<%= bubble.due_on.strftime("%b <br> %d").html_safe %>
<%= form.date_field :due_on, class: "input input--hidden", data: { action: "change->form#submit click->form#showPicker"} %>
@@ -8,7 +8,7 @@
<% end %>
<% else %>
<div class="bubble__bubble bubble__meta bubble__date bubble__date--new">
<%= form_with model: bubble, data: { controller: "form" } do | form | %>
<%= form_with model: bubble, data: { controller: "form" } do |form| %>
<label class="btn btn--plain" style="--btn-icon-size: 2.5em; margin-inline-end: -0.2em">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="var(--bubble-color)"><path d="M9.569,16.5H2.5A.5.5,0,0,1,2,16V7.5A.5.5,0,0,1,2.5,7H16a.5.5,0,0,1,.5.5V9.57a7.281,7.281,0,0,1,2,0V3a1,1,0,0,0-1-1H15a.25.25,0,0,1-.25-.25v-1a.75.75,0,1,0-1.5,0V4.5a.75.75,0,1,1-1.5,0v-2a.5.5,0,0,0-.5-.5H7a.25.25,0,0,1-.25-.25v-1a.75.75,0,0,0-1.5,0V4.5a.75.75,0,1,1-1.5,0v-2a.5.5,0,0,0-.5-.5H1A1,1,0,0,0,0,3V16.5a2,2,0,0,0,2,2H9.569a7.281,7.281,0,0,1,0-2Z"/><path fill="var(--color-positive)" d="M17.5,11A6.5,6.5,0,1,0,24,17.5,6.508,6.508,0,0,0,17.5,11Zm.75,9a.75.75,0,1,1-1.5,0V18.5a.25.25,0,0,0-.25-.25H15a.75.75,0,0,1,0-1.5h1.5a.25.25,0,0,0,.25-.25V15a.75.75,0,1,1,1.5,0v1.5a.25.25,0,0,0,.25.25H20a.75.75,0,0,1,0,1.5H18.5a.25.25,0,0,0-.25.25Z"/></svg>
<%= form.date_field :due_on, class: "input input--hidden", data: { action: "change->form#submit click->form#showPicker"} %>
+2 -2
View File
@@ -1,4 +1,4 @@
<%= form_with model: bubble, class: "flex flex-column gap full-width" do | form | %>
<%= form_with model: bubble, class: "flex flex-column gap full-width" do |form| %>
<%= form.label :title, class: "flex flex-column justify-start align-start" do %>
<%= form.text_field :title, class: "input full-width", required: true, placeholder: "Name it…" %>
<% end %>
@@ -7,7 +7,7 @@
<legend class="for-screen-reader">Color</legend>
<div class="flex align-center gap">
<% Bubble.colors.keys.each do | color | %>
<% Bubble.colors.keys.each do |color| %>
<label class="btn btn--circle txt-medium" style="--btn-background: <%= color -%>" >
<%= form.radio_button :color, color %>
<%= image_tag "check.svg", aria: { hidden: "true" }, size: 24, class: "checked" %>
+1 -1
View File
@@ -2,7 +2,7 @@
<%= image_tag bubble.image.attached? ? bubble.image : "", data: { upload_preview_target: "image" } %>
</div>
<%= form_with model: bubble, data: { controller: "form" } do | form | %>
<%= form_with model: bubble, data: { controller: "form" } do |form| %>
<div class="bubble__bubble bubble__meta bubble__attachment">
<% if bubble.image.attached? %>
<%= tag.label class: "btn btn--plain", style: "--btn-icon-size: 3em; margin-block-start: -0.5em; margin-inline-end: -0.2em", data: { action: "click->upload-preview#clear click->form#submit", upload_preview_target: "button" } do %>
+1 -1
View File
@@ -1,5 +1,5 @@
<%= turbo_frame_tag @bubble, :edit do %>
<%= form_with model: @bubble, class: "flex flex-column gap full-width", data: { controller: "form" } do | form | %>
<%= form_with model: @bubble, class: "flex flex-column gap full-width", data: { controller: "form" } do |form| %>
<%= form.label :title, class: "flex flex-column justify-center align-center" do %>
<%= form.text_area :title, class: "input input--textara txt-align-center full-width borderless",
required: true, rows: 5, autofocus: true, placeholder: "Name it…",
+1 -1
View File
@@ -1,6 +1,6 @@
<div class="bubble__perma flex justify-center center">
<div class="bubble" style="view-transition-name: bubble-<%= @bubble.id -%>; --bubble-color: <%= @bubble.color %>; <%= bubble_size(@bubble) %> <%= bubble_rotation(@bubble) %>">
<%= form_with model: @bubble, class: "flex flex-column gap full-width" do | form | %>
<%= form_with model: @bubble, class: "flex flex-column gap full-width" do |form| %>
<h1 class="bubble__title">
<%= form.text_area :title, class: "input full-width borderless", required: true, placeholder: "Name it…", rows: 4, autofocus: true %>
</h1>
+1 -1
View File
@@ -6,7 +6,7 @@
<strong><%= Current.user.name %></strong>
</div>
<div class="comment__body txt-align-start margin-block-start-half">
<%= form_with model: Comment.new, url: bubble_comments_path(@bubble), class: "flex flex-column gap full-width" do | form | %>
<%= form_with model: Comment.new, url: bubble_comments_path(@bubble), class: "flex flex-column gap full-width" do |form| %>
<%= form.text_area :body, class: "input", required: true, rows: 4,
placeholder: (@bubble.comments.empty? && @bubble.creator == Current.user) ? "Add some notes…" : "Type your comment…" %>