|
|
|
@ -21,9 +21,17 @@ defmodule BlockScoutWeb.Tokens.Instance.OverviewView do |
|
|
|
|
|
|
|
|
|
def image_src(instance) do |
|
|
|
|
cond do |
|
|
|
|
instance.metadata && instance.metadata["image_url"] -> instance.metadata["image_url"] |
|
|
|
|
instance.metadata && instance.metadata["image"] -> instance.metadata["image"] |
|
|
|
|
true -> image_src(nil) |
|
|
|
|
instance.metadata && instance.metadata["image_url"] -> |
|
|
|
|
instance.metadata["image_url"] |
|
|
|
|
|
|
|
|
|
instance.metadata && instance.metadata["image"] -> |
|
|
|
|
instance.metadata["image"] |
|
|
|
|
|
|
|
|
|
instance.metadata && instance.metadata["properties"]["image"]["description"] -> |
|
|
|
|
instance.metadata["properties"]["image"]["description"] |
|
|
|
|
|
|
|
|
|
true -> |
|
|
|
|
image_src(nil) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|