Added tooltips to edit interface images (closes #179)
This commit is contained in:
parent
a2a9af3c1a
commit
7504ae84c3
@ -214,7 +214,7 @@ func renderStringField(b *bytes.Buffer, v *reflect.Value, field reflect.StructFi
|
||||
anime, err := arn.GetAnime(animeID)
|
||||
|
||||
if err == nil {
|
||||
b.WriteString(components.EditFormImagePreview(anime.Link(), anime.ImageLink("small"), true))
|
||||
b.WriteString(components.EditFormImagePreview(anime.Link(), anime.ImageLink("small"), true, anime.Title.ByUser(nil)))
|
||||
}
|
||||
|
||||
case "Character":
|
||||
@ -222,7 +222,7 @@ func renderStringField(b *bytes.Buffer, v *reflect.Value, field reflect.StructFi
|
||||
character, err := arn.GetCharacter(characterID)
|
||||
|
||||
if err == nil {
|
||||
b.WriteString(components.EditFormImagePreview(character.Link(), character.ImageLink("medium"), false))
|
||||
b.WriteString(components.EditFormImagePreview(character.Link(), character.ImageLink("medium"), true, character.Name.ByUser(nil)))
|
||||
}
|
||||
|
||||
case "":
|
||||
|
@ -1,3 +1,3 @@
|
||||
component EditFormImagePreview(link string, imageURL string, webp bool)
|
||||
a(href=link, target="_blank")
|
||||
component EditFormImagePreview(link string, imageURL string, webp bool, title string)
|
||||
a.tip(href=link, target="_blank", aria-label=title)
|
||||
img.lazy(data-src=imageURL, alt="Preview", data-webp=webp)
|
Loading…
Reference in New Issue
Block a user