diff --git a/app/javascript/controllers/bubble_controller.js b/app/javascript/controllers/bubble_controller.js index 1109bd228..53ef43bea 100644 --- a/app/javascript/controllers/bubble_controller.js +++ b/app/javascript/controllers/bubble_controller.js @@ -4,7 +4,7 @@ import { signedDifferenceInDays } from "helpers/date_helpers" const REFRESH_INTERVAL = 3_600_000 // 1 hour (in milliseconds) export default class extends Controller { - static targets = [ "top", "days", "bottom" ] + static targets = [ "bubbleTop", "bubbleDays", "bubbleBottom" ] static values = { entropy: Object } #timer @@ -26,9 +26,9 @@ export default class extends Controller { return } - this.topTarget.innerHTML = closesInDays < 1 ? this.entropyValue.action : `${this.entropyValue.action} in` - this.daysTarget.innerHTML = closesInDays < 1 ? "!" : closesInDays - this.bottomTarget.innerHTML = closesInDays < 1 ? "Today" : (closesInDays === 1 ? "day" : "days") + this.bubbleTopTarget.innerHTML = closesInDays < 1 ? this.entropyValue.action : `${this.entropyValue.action} in` + this.bubbleDaysTarget.innerHTML = closesInDays < 1 ? "!" : closesInDays + this.bubbleBottomTarget.innerHTML = closesInDays < 1 ? "Today" : (closesInDays === 1 ? "day" : "days") this.#show() } diff --git a/app/views/cards/display/preview/_bubble.html.erb b/app/views/cards/display/preview/_bubble.html.erb index 8a6b0e1aa..8c2bad595 100644 --- a/app/views/cards/display/preview/_bubble.html.erb +++ b/app/views/cards/display/preview/_bubble.html.erb @@ -4,20 +4,26 @@ action: "turbo:morph-element->bubble#update", bubble_entropy_value: entropy_bubble_options_for(card).to_json } do %> - - - - - - - +
+ + + + + + + + - - - - - - + + + + + + +
+ +
+
<% end %>