93 lines
4.2 KiB
Plaintext
93 lines
4.2 KiB
Plaintext
<% @page_title = @bubble.title %>
|
|
|
|
<% content_for :header do %>
|
|
<nav class="align-start">
|
|
<%= link_to "#", class: "btn flex-item-justify-start", data: { controller: "hotkey back-navigation", action: "keydown.esc@document->hotkey#click", back_navigation_fallback_destination_value: bubbles_path(bucket_id: @bucket) } do %>
|
|
<%= image_tag "arrow-left.svg", aria: { hidden: true }, size: 24 %>
|
|
<span class="for-screen-reader">Back</span>
|
|
<% end %>
|
|
|
|
<header class="txt-align-center">
|
|
<h1 class="txt-large flex align-center gap-half">
|
|
<%= link_to @bucket.name, bubbles_path(bucket_ids: [ @bucket ]), class: "txt-ink txt-undecorated upad" %>
|
|
</h1>
|
|
</header>
|
|
|
|
<span class="btn btn--placeholder flex-item-justify-end"></span>
|
|
</nav>
|
|
<% end %>
|
|
|
|
<aside class="flex align-start justify-end" style="--bubble-color: <%= @bubble.color %>">
|
|
<div class="flex flex-column" style="row-gap: 3px;">
|
|
<%= render "bubbles/color", bubble: @bubble %>
|
|
|
|
<%= form_with model: @bubble, url: bucket_bubble_path(@bubble.bucket, @bubble), data: { controller: "form" } do |form| %>
|
|
<label class="btn full-width justify-start borderless">
|
|
<%= image_tag "calendar-add.svg", aria: { hidden: true }, size: 24 %>
|
|
<span><%= @bubble.due_on.present? ? "Change" : "Add a" %> date</span>
|
|
<%= form.date_field :due_on, class: "input input--hidden", data: { action: "change->form#submit click->form#showPicker" } %>
|
|
</label>
|
|
<% end %>
|
|
|
|
<%= render "bubbles/sidebar/assignment", bubble: @bubble, users: @bucket.users.active %>
|
|
<%= render "bubbles/sidebar/tag", bubble: @bubble, tags: Current.account.tags %>
|
|
|
|
<% if @bubble.image.attached? %>
|
|
<%= button_to bucket_bubble_image_path(@bubble.bucket, @bubble), method: :delete, class: "btn full-width justify-start borderless" do %>
|
|
<%= image_tag "picture-add.svg", aria: { hidden: true }, size: 24 %>
|
|
<span>Clear background image</span>
|
|
<% end %>
|
|
<% else %>
|
|
<%= form_with model: @bubble, url: bucket_bubble_path(@bubble.bucket, @bubble), data: { controller: "form" } do |form| %>
|
|
<label class="btn full-width justify-start borderless">
|
|
<%= image_tag "picture-add.svg", aria: { hidden: true }, size: 24 %>
|
|
<span>Add an image</span>
|
|
<%= form.file_field :image, class: "input",
|
|
accept: "image/png, image/jpeg, image/jpg, image/webp",
|
|
data: { action: "upload-preview#previewImage form#submit", upload_preview_target: "input" },
|
|
hidden: true %>
|
|
</label>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<%= button_to bucket_bubble_boosts_path(@bubble.bucket, @bubble), class: "btn full-width justify-start borderless", data: { turbo_frame: dom_id(@bubble, :boosts) } do %>
|
|
<%= image_tag "thumb-up.svg", aria: { hidden: true }, size: 24 %>
|
|
<span>Boost this</span>
|
|
<% end %>
|
|
|
|
<hr class="separator--horizontal full-width" style="--border-color: var(--color-subtle);" />
|
|
<% if @bubble.drafted? %>
|
|
<%= render "bubbles/publish", bubble: @bubble %>
|
|
<% else %>
|
|
<%= render "bubbles/pop_toggle", bubble: @bubble %>
|
|
<button class="btn full-width justify-start borderless">
|
|
<%= image_tag "picture-double.svg", aria: { hidden: true }, size: 24 %>
|
|
<span>I've seen this</span>
|
|
</button>
|
|
<% end %>
|
|
|
|
|
|
<%= button_to bucket_bubble_path(@bubble.bucket, @bubble),
|
|
method: :delete,
|
|
class: "btn full-width justify-start borderless",
|
|
data: { turbo_confirm: "Are you sure you want to delete this bubble?" } do %>
|
|
<%= image_tag "trash.svg", aria: { hidden: true }, size: 24 %>
|
|
<span>Delete bubble</span>
|
|
<% end %>
|
|
</div>
|
|
</aside>
|
|
|
|
<div class="bubble__container" data-controller="beacon" data-beacon-url-value="<%= bucket_bubble_readings_url(@bubble.bucket, @bubble) %>">
|
|
<div class="bubble__perma flex justify-center center margin-block-end-double">
|
|
<%= render "bubbles/bubble", bubble: @bubble, editing: params[:editing] %>
|
|
</div>
|
|
|
|
<%= render "bubbles/messages", bubble: @bubble %>
|
|
</div>
|
|
|
|
<div class="flex align-start justify-start">
|
|
<%= turbo_frame_tag dom_id(@bubble, :stage_picker), src: new_bucket_bubble_stage_picker_path(@bubble.bucket, @bubble) %>
|
|
</div>
|
|
|
|
<%= render "notifications/tray" %>
|