|
@ -1,5 +1,17 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div v-html="generateIdenticon()" class="h-full w-full object-contain"></div> |
|
|
<a |
|
|
|
|
|
v-if="linkToFull && imageUrl" |
|
|
|
|
|
:href="imageUrl" |
|
|
|
|
|
target="_blank" |
|
|
|
|
|
class="h-full w-full object-contain" |
|
|
|
|
|
> |
|
|
|
|
|
<div v-html="generateIdenticon()" class="h-full w-full object-contain" /> |
|
|
|
|
|
</a> |
|
|
|
|
|
<div |
|
|
|
|
|
v-else |
|
|
|
|
|
v-html="generateIdenticon()" |
|
|
|
|
|
class="h-full w-full object-contain" |
|
|
|
|
|
/> |
|
|
</template> |
|
|
</template> |
|
|
<script lang="ts"> |
|
|
<script lang="ts"> |
|
|
import { toSvg } from "jdenticon"; |
|
|
import { toSvg } from "jdenticon"; |
|
@ -22,6 +34,7 @@ export default class ProjectIcon extends Vue { |
|
|
@Prop entityId = ""; |
|
|
@Prop entityId = ""; |
|
|
@Prop iconSize = 0; |
|
|
@Prop iconSize = 0; |
|
|
@Prop imageUrl = ""; |
|
|
@Prop imageUrl = ""; |
|
|
|
|
|
@Prop linkToFull = false; |
|
|
|
|
|
|
|
|
generateIdenticon() { |
|
|
generateIdenticon() { |
|
|
if (this.imageUrl) { |
|
|
if (this.imageUrl) { |
|
|