feat: profile page

This commit is contained in:
Jannat Patel
2024-04-10 11:53:00 +05:30
parent ccb8721674
commit 13d0621881
13 changed files with 600 additions and 2072 deletions

View File

@@ -85,6 +85,17 @@ export function showToast(title, text, icon) {
})
}
export function getImgDimensions(imgSrc) {
return new Promise((resolve) => {
let img = new Image()
img.onload = function () {
let { width, height } = img
resolve({ width, height, ratio: width / height })
}
img.src = imgSrc
})
}
export function updateDocumentTitle(meta) {
watch(
() => meta,