fix: image path regression
- probably lost during rebase
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -35,8 +35,7 @@ components_elixir-*.tar
|
|||||||
npm-debug.log
|
npm-debug.log
|
||||||
/assets/node_modules/
|
/assets/node_modules/
|
||||||
|
|
||||||
# Ignore all user-generated content (uploads, QR codes, etc.)
|
# Ignore all dynamicly uploaded files.
|
||||||
/priv/static/user_generated/
|
|
||||||
/uploads/
|
/uploads/
|
||||||
|
|
||||||
# Ignore customized Docker Compose file.
|
# Ignore customized Docker Compose file.
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ defmodule ComponentsElixirWeb do
|
|||||||
those modules here.
|
those modules here.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def static_paths, do: ~w(assets fonts images user_generated apriltags favicon.ico robots.txt)
|
def static_paths, do: ~w(assets fonts images apriltags favicon.ico robots.txt)
|
||||||
|
|
||||||
def router do
|
def router do
|
||||||
quote do
|
quote do
|
||||||
|
|||||||
@@ -906,11 +906,11 @@ defmodule ComponentsElixirWeb.ComponentsLive do
|
|||||||
<%= if component.image_filename do %>
|
<%= if component.image_filename do %>
|
||||||
<button
|
<button
|
||||||
phx-click="show_image"
|
phx-click="show_image"
|
||||||
phx-value-url={"/user_generated/uploads/images/#{component.image_filename}"}
|
phx-value-url={"/uploads/images/#{component.image_filename}"}
|
||||||
class="hover:opacity-75 transition-opacity block"
|
class="hover:opacity-75 transition-opacity block"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
src={"/user_generated/uploads/images/#{component.image_filename}"}
|
src={"/uploads/images/#{component.image_filename}"}
|
||||||
alt={component.name}
|
alt={component.name}
|
||||||
class="h-48 w-48 rounded-lg object-contain cursor-pointer border border-base-300"
|
class="h-48 w-48 rounded-lg object-contain cursor-pointer border border-base-300"
|
||||||
/>
|
/>
|
||||||
@@ -1035,11 +1035,11 @@ defmodule ComponentsElixirWeb.ComponentsLive do
|
|||||||
<%= if component.image_filename do %>
|
<%= if component.image_filename do %>
|
||||||
<button
|
<button
|
||||||
phx-click="show_image"
|
phx-click="show_image"
|
||||||
phx-value-url={"/user_generated/uploads/images/#{component.image_filename}"}
|
phx-value-url={"/uploads/images/#{component.image_filename}"}
|
||||||
class="hover:opacity-75 transition-opacity block"
|
class="hover:opacity-75 transition-opacity block"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
src={"/user_generated/uploads/images/#{component.image_filename}"}
|
src={"/uploads/images/#{component.image_filename}"}
|
||||||
alt={component.name}
|
alt={component.name}
|
||||||
class="max-h-20 max-w-20 rounded-md object-contain cursor-pointer block"
|
class="max-h-20 max-w-20 rounded-md object-contain cursor-pointer block"
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user