Refactor casting dialog and add thumbnails (#184)
This commit is contained in:
1 parent
f58137b326
commit
af1fa0b401
17 files changed
+525
-393
No files matched your search
@@ -0,0 +1,28 @@
|
||||
<script lang="ts">
|
||||
export let author: string | undefined = undefined;
|
||||
export let authorThumbnails: any[] | undefined = undefined;
|
||||
|
||||
let thumbnailUrl;
|
||||
|
||||
$: {
|
||||
if (authorThumbnails && authorThumbnails.length > 0) {
|
||||
const authorThumbnail = authorThumbnails[authorThumbnails.length - 1];
|
||||
let url = authorThumbnail.url;
|
||||
if (url.startsWith("//")) {
|
||||
url = "https:" + url;
|
||||
}
|
||||
thumbnailUrl = url;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<figure class="relative">
|
||||
<img
|
||||
class="w-44 rounded-full aspect-square object-cover"
|
||||
loading="lazy"
|
||||
width="176"
|
||||
height="176"
|
||||
src={thumbnailUrl}
|
||||
alt={author}
|
||||
/>
|
||||
</figure>
|
||||
Reference in new issue
Block a user