diff --git a/app/assets/images/camera.svg b/app/assets/images/camera.svg new file mode 100644 index 000000000..cc14f950f --- /dev/null +++ b/app/assets/images/camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/stylesheets/bubble.css b/app/assets/stylesheets/bubble.css index 83f380174..256f233a1 100644 --- a/app/assets/stylesheets/bubble.css +++ b/app/assets/stylesheets/bubble.css @@ -67,7 +67,7 @@ .bubble__bubble { background-color: var(--color-bg); - border: 0.3em solid var(--bubble-color); + border: max(3px, 0.3em) solid var(--bubble-color); border-radius: 50%; position: absolute; z-index: -1; @@ -114,6 +114,19 @@ } } + &.bubble__attachment { + aspect-ratio: 1; + inset: -4cqi 24cqi auto auto; + + .btn { + font-size: 4cqi; + } + + .windshield & { + display: none; + } + } + &.bubble__date { aspect-ratio: 1; inset: 2cqi 2cqi auto auto; @@ -138,7 +151,7 @@ white-space: nowrap; z-index: 1; - &:has(.input) { + &:has(.input:not([type="file"])) { border-radius: 2em; padding: 0.2em 0.5em; diff --git a/app/javascript/controllers/form_controller.js b/app/javascript/controllers/form_controller.js new file mode 100644 index 000000000..80b2727ab --- /dev/null +++ b/app/javascript/controllers/form_controller.js @@ -0,0 +1,17 @@ +import { Controller } from "@hotwired/stimulus" + +export default class extends Controller { + static targets = [ "cancel" ] + + submit() { + this.element.requestSubmit() + } + + cancel() { + this.cancelTarget?.click() + } + + preventAttachment(event) { + event.preventDefault() + } +} diff --git a/app/views/bubbles/_bubble.html.erb b/app/views/bubbles/_bubble.html.erb index 490a8aaab..1eba1ab7b 100644 --- a/app/views/bubbles/_bubble.html.erb +++ b/app/views/bubbles/_bubble.html.erb @@ -1,4 +1,4 @@ -