V1 (#106)
This commit is contained in:
parent
83c94e94db
commit
0fc26d096f
52 changed files with 6684 additions and 3120 deletions
|
|
@ -23,7 +23,7 @@ function imgSizeFit(img, maxWidth = 1024, maxHeight = 768) {
|
|||
maxWidth / img.naturalWidth,
|
||||
maxHeight / img.naturalHeight
|
||||
)
|
||||
return { width: img.naturalWidth * ratio, height: img.naturalHeight * ratio }
|
||||
return {width: img.naturalWidth * ratio, height: img.naturalHeight * ratio}
|
||||
}
|
||||
|
||||
async function hash(string) {
|
||||
|
|
@ -125,7 +125,7 @@ function isValidImageUrl(string) {
|
|||
function isValidKey(key, prefix = 'n') {
|
||||
try {
|
||||
if (key && key.startsWith(prefix)) {
|
||||
let { _, data } = NostrTools.nip19.decode(key)
|
||||
let {_, data} = NostrTools.nip19.decode(key)
|
||||
key = data
|
||||
}
|
||||
return isValidKeyHex(key)
|
||||
|
|
@ -143,4 +143,4 @@ function formatCurrency(value, currency) {
|
|||
style: 'currency',
|
||||
currency: currency
|
||||
}).format(value)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue