-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
problem: can't see who created problem
- Loading branch information
1 parent
8fd077b
commit a0bdd44
Showing
4 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<script lang="ts"> | ||
import { profiles } from "$lib/stores/hot_resources/profiles"; | ||
import { | ||
AspectRatio, | ||
Column, | ||
Row, | ||
Tile | ||
} from "carbon-components-svelte"; | ||
import CommentUser from "../comments/CommentUser.svelte"; | ||
export let pubkey: string; | ||
let blankAvatar = | ||
"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxITEhUQEBASFhUQFRUVFRUXFRUVFRcQFRUWFxUVFRUYHSggGBolGxUVITEhJSkrLi4uFx8zODMsNygtLisBCgoKBQUFDgUFDisZExkrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrK//AABEIANgA6QMBIgACEQEDEQH/xAAaAAACAwEBAAAAAAAAAAAAAAAAAQIDBQQG/8QAORAAAgECBAMFBwMDAwUAAAAAAAECAxEEITFBBRJRYXGRobETIjKBwdHwBhThI0JiUoLxFWNyosL/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQ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Ko4RsC39zYP3ZJYAf7EDZJIiNASAAAAAkkAJFkKbei+ZOFO2cvD7lOKrytbRdAJNwXxyfcvuzswvEaayhC3bv4nnal2deFpO12BuSk5Z6I5alFM5Z4m2g/3V0BGrFL7nHUrJaFteqzNrVALfa2le5p4DE88unaYV2a/Cab12A6cddPXLTUzKr3RocQgr95nv8uBWpslGlckodC+jECqNIOQ6lEpqpX1AqlEqky2b7yrmARCRK47doEYRudFKJVAuTA6YxRLkRTGRPn/MgJjAAGhgAFuHoOTy+bO2GHSyXiAAU4qaXeZkm5OwwAvpYdLUVaeyAAOfkuWuFtAACib/AOdjkq2WwAByzld5Hp8HTcKalbJryGAHHi5t/mxxyWYABOC3zOmIABGT32/NiqrLpuAAVMrf5sAAReRFsYANFiYABZBkuYAA/9k="; | ||
function getAvatar(pubkeyString: string) { | ||
let p = $profiles.get(pubkeyString); | ||
console.log(p?.npub); | ||
if (p) { | ||
if (p.profile) { | ||
if (p.profile.image) { | ||
if (p.profile.image.length > 0) { | ||
return p.profile.image; | ||
} | ||
} | ||
} | ||
} | ||
return blankAvatar; | ||
} | ||
</script> | ||
|
||
<Tile | ||
light | ||
style="max-width:120px; height:100%;overflow:hidden;margin:0;padding:0;" | ||
> | ||
<Row> | ||
<Column> | ||
<AspectRatio ratio="1x1" style="width:100%;"> | ||
<div style="margin:0;"> | ||
<img width="100%" height="auto" src={getAvatar(pubkey)} /> | ||
</div> | ||
</AspectRatio> | ||
<div style="text-align:center;overflow:hidden;"> | ||
<CommentUser {pubkey} /> | ||
</div> | ||
</Column> | ||
</Row> | ||
</Tile> |