Fix profile edit stop

This commit is contained in:
Jon Staab
2024-10-03 12:27:41 -07:00
parent d63b556b24
commit 979cb36060
3 changed files with 16 additions and 9 deletions
+2 -2
View File
@@ -14,12 +14,12 @@
<p class="text-center text-2xl">Thanks for using</p>
<h1 class="mb-4 text-center text-5xl font-bold uppercase">Flotilla</h1>
<div class="grid grid-cols-1 gap-8 lg:grid-cols-2">
<div class="card2 flex flex-col gap-2 text-center shadow-2xl">
<div class="card2 bg-alt flex flex-col gap-2 text-center shadow-2xl">
<h3 class="text-2xl sm:h-12">Support development</h3>
<p class="sm:h-16">Funds will be used to support development.</p>
<Button class="btn btn-primary">Zap the Developer</Button>
</div>
<div class="card2 flex flex-col gap-2 text-center shadow-2xl">
<div class="card2 bg-alt flex flex-col gap-2 text-center shadow-2xl">
<h3 class="text-2xl sm:h-12">Get in touch</h3>
<p class="sm:h-16">Having problems? Let us know by filing an issue.</p>
<Link class="btn btn-primary" href="/home/97c70a44366a6535c145b333f973ea86dfdc2d7a99da618c40c64705ad98e322">
+8 -2
View File
@@ -20,13 +20,19 @@
const displayNip05 = (nip05: string) =>
nip05?.startsWith("_@") ? last(nip05.split("@")) : nip05
const cloneProfile = () => ({...(getProfile($pubkey!) || makeProfile())})
const toggleEdit = () => {
editing = !editing
if (!editing) {
profile = cloneProfile()
}
}
const stopEdit = () => {
editing = false
profile = getProfile($pubkey!) || makeProfile()
profile = cloneProfile()
}
const saveEdit = () => {
@@ -41,7 +47,7 @@
let file: File
let editing = false
let profile = getProfile($pubkey!) || makeProfile()
let profile = cloneProfile()
</script>
<div class="content column gap-4">