forked from coracle/flotilla
Compare commits
10 Commits
32a31045ef
...
7a915eb71c
| Author | SHA1 | Date | |
|---|---|---|---|
| 7a915eb71c | |||
| 976ccdabd4 | |||
| 99b26680b6 | |||
| c5be477855 | |||
| 32c1501e9c | |||
| 463837e7d4 | |||
| d74f142cdd | |||
| 53954aae89 | |||
| 24aa62a503 | |||
| 2618bb9c63 |
@@ -85,6 +85,7 @@
|
|||||||
"date-picker-svelte": "^2.17.0",
|
"date-picker-svelte": "^2.17.0",
|
||||||
"dotenv": "^16.6.1",
|
"dotenv": "^16.6.1",
|
||||||
"emoji-picker-element": "^1.28.1",
|
"emoji-picker-element": "^1.28.1",
|
||||||
|
"emoji-picker-element-data": "^1.8.0",
|
||||||
"fuse.js": "^7.1.0",
|
"fuse.js": "^7.1.0",
|
||||||
"husky": "^9.1.7",
|
"husky": "^9.1.7",
|
||||||
"idb": "^8.0.3",
|
"idb": "^8.0.3",
|
||||||
|
|||||||
Generated
+8
@@ -137,6 +137,9 @@ importers:
|
|||||||
emoji-picker-element:
|
emoji-picker-element:
|
||||||
specifier: ^1.28.1
|
specifier: ^1.28.1
|
||||||
version: 1.28.1
|
version: 1.28.1
|
||||||
|
emoji-picker-element-data:
|
||||||
|
specifier: ^1.8.0
|
||||||
|
version: 1.8.0
|
||||||
fuse.js:
|
fuse.js:
|
||||||
specifier: ^7.1.0
|
specifier: ^7.1.0
|
||||||
version: 7.1.0
|
version: 7.1.0
|
||||||
@@ -2824,6 +2827,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-wkgGT6kugeQk/P6VZ/f4T+4HB41BVgNBq5CDIZVbQ02nvTVqAiVTbskxxu3eA/X96lMlfYOwnLQpN2v5E1zDEg==}
|
resolution: {integrity: sha512-wkgGT6kugeQk/P6VZ/f4T+4HB41BVgNBq5CDIZVbQ02nvTVqAiVTbskxxu3eA/X96lMlfYOwnLQpN2v5E1zDEg==}
|
||||||
engines: {node: '>= 0.4.0'}
|
engines: {node: '>= 0.4.0'}
|
||||||
|
|
||||||
|
emoji-picker-element-data@1.8.0:
|
||||||
|
resolution: {integrity: sha512-VfRuRJNEDLS1JKlNS4olaqhjX5S1nnZ+ZHG73b/dV8QeZyi0yPruTPEE72EmF6XO3k/9hj3lybMIYMOYXb/57A==}
|
||||||
|
|
||||||
emoji-picker-element@1.28.1:
|
emoji-picker-element@1.28.1:
|
||||||
resolution: {integrity: sha512-8c64IPish2PWoV9oYCo2pvuPHwIv+uK9bO0dfpPyMupDAvaWL9ZvYhWNTAR+2sx7BhfRjciImqP6CIUgNX+DMg==}
|
resolution: {integrity: sha512-8c64IPish2PWoV9oYCo2pvuPHwIv+uK9bO0dfpPyMupDAvaWL9ZvYhWNTAR+2sx7BhfRjciImqP6CIUgNX+DMg==}
|
||||||
|
|
||||||
@@ -8028,6 +8034,8 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
sax: 1.1.4
|
sax: 1.1.4
|
||||||
|
|
||||||
|
emoji-picker-element-data@1.8.0: {}
|
||||||
|
|
||||||
emoji-picker-element@1.28.1: {}
|
emoji-picker-element@1.28.1: {}
|
||||||
|
|
||||||
emoji-regex@8.0.0: {}
|
emoji-regex@8.0.0: {}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||||
import ModalTitle from "@lib/components/ModalTitle.svelte"
|
import ModalTitle from "@lib/components/ModalTitle.svelte"
|
||||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||||
|
import ProgressBar from "@app/components/ProgressBar.svelte"
|
||||||
import {pushToast} from "@app/util/toast"
|
import {pushToast} from "@app/util/toast"
|
||||||
import {PLATFORM_NAME} from "@app/core/state"
|
import {PLATFORM_NAME} from "@app/core/state"
|
||||||
|
|
||||||
@@ -22,9 +23,11 @@
|
|||||||
secret: string
|
secret: string
|
||||||
next: () => unknown
|
next: () => unknown
|
||||||
submitText?: string
|
submitText?: string
|
||||||
|
step?: number
|
||||||
|
totalSteps?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
const {secret, next, submitText = "Continue"}: Props = $props()
|
const {secret, next, submitText = "Continue", step, totalSteps}: Props = $props()
|
||||||
|
|
||||||
const back = () => history.back()
|
const back = () => history.back()
|
||||||
|
|
||||||
@@ -150,6 +153,9 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
|
{#if step && totalSteps}
|
||||||
|
<ProgressBar current={step} total={totalSteps} />
|
||||||
|
{/if}
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button class="btn btn-link" onclick={back}>
|
<Button class="btn btn-link" onclick={back}>
|
||||||
<Icon icon={AltArrowLeft} />
|
<Icon icon={AltArrowLeft} />
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
import LogInOTP from "@app/components/LogInOTP.svelte"
|
import LogInOTP from "@app/components/LogInOTP.svelte"
|
||||||
import LogInSelect from "@app/components/LogInSelect.svelte"
|
import LogInSelect from "@app/components/LogInSelect.svelte"
|
||||||
import {deleteDeactivatedPomadeSessions, loginWithPomade} from "@app/util/pomade"
|
import {deleteDeactivatedPomadeSessions, loginWithPomade} from "@app/util/pomade"
|
||||||
|
import {getPomadeLoginFailureMessage, POMADE_NETWORK_ERROR_MESSAGE} from "@app/util/pomadeErrors"
|
||||||
import {pushModal, clearModals} from "@app/util/modal"
|
import {pushModal, clearModals} from "@app/util/modal"
|
||||||
import {setChecked} from "@app/util/notifications"
|
import {setChecked} from "@app/util/notifications"
|
||||||
import {pushToast} from "@app/util/toast"
|
import {pushToast} from "@app/util/toast"
|
||||||
@@ -44,7 +45,7 @@
|
|||||||
|
|
||||||
return pushToast({
|
return pushToast({
|
||||||
theme: "error",
|
theme: "error",
|
||||||
message: "Sorry, we were unable to log you in.",
|
message: getPomadeLoginFailureMessage(messages),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,10 +65,17 @@
|
|||||||
|
|
||||||
pushToast({
|
pushToast({
|
||||||
theme: "error",
|
theme: "error",
|
||||||
message: "Sorry, we were unable to log you in.",
|
message: getPomadeLoginFailureMessage(res.messages),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Login error:", error)
|
||||||
|
|
||||||
|
pushToast({
|
||||||
|
theme: "error",
|
||||||
|
message: POMADE_NETWORK_ERROR_MESSAGE,
|
||||||
|
})
|
||||||
} finally {
|
} finally {
|
||||||
loading = false
|
loading = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
import ModalSubtitle from "@lib/components/ModalSubtitle.svelte"
|
import ModalSubtitle from "@lib/components/ModalSubtitle.svelte"
|
||||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||||
import LogInOTPConfirm from "@app/components/LogInOTPConfirm.svelte"
|
import LogInOTPConfirm from "@app/components/LogInOTPConfirm.svelte"
|
||||||
|
import {POMADE_NETWORK_ERROR_MESSAGE} from "@app/util/pomadeErrors"
|
||||||
import {pushModal} from "@app/util/modal"
|
import {pushModal} from "@app/util/modal"
|
||||||
import {pushToast} from "@app/util/toast"
|
import {pushToast} from "@app/util/toast"
|
||||||
|
|
||||||
@@ -35,11 +36,20 @@
|
|||||||
if (ok) {
|
if (ok) {
|
||||||
pushModal(LogInOTPConfirm, {email, peersByPrefix})
|
pushModal(LogInOTPConfirm, {email, peersByPrefix})
|
||||||
} else {
|
} else {
|
||||||
|
console.error("Pomade challenge request failed during OTP login")
|
||||||
|
|
||||||
pushToast({
|
pushToast({
|
||||||
theme: "error",
|
theme: "error",
|
||||||
message: "Sorry, we were unable to request a login code.",
|
message: POMADE_NETWORK_ERROR_MESSAGE,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
|
||||||
|
pushToast({
|
||||||
|
theme: "error",
|
||||||
|
message: POMADE_NETWORK_ERROR_MESSAGE,
|
||||||
|
})
|
||||||
} finally {
|
} finally {
|
||||||
loading = false
|
loading = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,10 +15,11 @@
|
|||||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||||
import StringMultiInput from "@lib/components/StringMultiInput.svelte"
|
import StringMultiInput from "@lib/components/StringMultiInput.svelte"
|
||||||
import LogInSelect from "@app/components/LogInSelect.svelte"
|
import LogInSelect from "@app/components/LogInSelect.svelte"
|
||||||
import {pushToast} from "@app/util/toast"
|
|
||||||
import {setChecked} from "@app/util/notifications"
|
|
||||||
import {pushModal, clearModals} from "@app/util/modal"
|
import {pushModal, clearModals} from "@app/util/modal"
|
||||||
|
import {setChecked} from "@app/util/notifications"
|
||||||
import {deleteDeactivatedPomadeSessions, loginWithPomade} from "@app/util/pomade"
|
import {deleteDeactivatedPomadeSessions, loginWithPomade} from "@app/util/pomade"
|
||||||
|
import {getPomadeLoginFailureMessage, POMADE_NETWORK_ERROR_MESSAGE} from "@app/util/pomadeErrors"
|
||||||
|
import {pushToast} from "@app/util/toast"
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
email: string
|
email: string
|
||||||
@@ -44,7 +45,7 @@
|
|||||||
|
|
||||||
return pushToast({
|
return pushToast({
|
||||||
theme: "error",
|
theme: "error",
|
||||||
message: "Sorry, we were unable to log you in.",
|
message: getPomadeLoginFailureMessage(messages),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,10 +65,17 @@
|
|||||||
|
|
||||||
pushToast({
|
pushToast({
|
||||||
theme: "error",
|
theme: "error",
|
||||||
message: "Sorry, we were unable to log you in.",
|
message: getPomadeLoginFailureMessage(res.messages),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Login error:", error)
|
||||||
|
|
||||||
|
pushToast({
|
||||||
|
theme: "error",
|
||||||
|
message: POMADE_NETWORK_ERROR_MESSAGE,
|
||||||
|
})
|
||||||
} finally {
|
} finally {
|
||||||
loading = false
|
loading = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||||
import Profile from "@app/components/Profile.svelte"
|
import Profile from "@app/components/Profile.svelte"
|
||||||
import {deleteDeactivatedPomadeSessions, loginWithPomade} from "@app/util/pomade"
|
import {deleteDeactivatedPomadeSessions, loginWithPomade} from "@app/util/pomade"
|
||||||
|
import {getPomadeLoginFailureMessage, POMADE_NETWORK_ERROR_MESSAGE} from "@app/util/pomadeErrors"
|
||||||
import {setChecked} from "@app/util/notifications"
|
import {setChecked} from "@app/util/notifications"
|
||||||
import {clearModals} from "@app/util/modal"
|
import {clearModals} from "@app/util/modal"
|
||||||
import {pushToast} from "@app/util/toast"
|
import {pushToast} from "@app/util/toast"
|
||||||
@@ -46,9 +47,16 @@
|
|||||||
|
|
||||||
pushToast({
|
pushToast({
|
||||||
theme: "error",
|
theme: "error",
|
||||||
message: "Sorry, we were unable to log you in.",
|
message: getPomadeLoginFailureMessage(res.messages),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Login error:", error)
|
||||||
|
|
||||||
|
pushToast({
|
||||||
|
theme: "error",
|
||||||
|
message: POMADE_NETWORK_ERROR_MESSAGE,
|
||||||
|
})
|
||||||
} finally {
|
} finally {
|
||||||
loading = false
|
loading = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,9 +23,10 @@
|
|||||||
onsubmit: (values: Values) => void
|
onsubmit: (values: Values) => void
|
||||||
isSignup?: boolean
|
isSignup?: boolean
|
||||||
footer: Snippet
|
footer: Snippet
|
||||||
|
progressBar?: Snippet
|
||||||
}
|
}
|
||||||
|
|
||||||
const {initialValues, isSignup, onsubmit, footer}: Props = $props()
|
const {initialValues, isSignup, onsubmit, footer, progressBar}: Props = $props()
|
||||||
|
|
||||||
const values = $state(initialValues)
|
const values = $state(initialValues)
|
||||||
|
|
||||||
@@ -103,6 +104,9 @@
|
|||||||
</Field>
|
</Field>
|
||||||
{/if}
|
{/if}
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
|
{#if progressBar}
|
||||||
|
{@render progressBar()}
|
||||||
|
{/if}
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
{@render footer()}
|
{@render footer()}
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
const {current, total}: {current: number; total: number} = $props()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="flex w-full">
|
||||||
|
{#each Array(total) as _, i}
|
||||||
|
<div class="h-1 flex-1 transition-colors {i < current ? 'bg-primary' : 'bg-base-300'}"></div>
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
@@ -62,9 +62,10 @@
|
|||||||
|
|
||||||
const flows = {
|
const flows = {
|
||||||
email: {
|
email: {
|
||||||
start: () => pushModal(SignUpEmail, {next: flows.email.profile}),
|
start: () => pushModal(SignUpEmail, {next: flows.email.profile, step: 1, totalSteps: 3}),
|
||||||
profile: () => pushModal(SignUpProfile, {next: flows.email.complete}),
|
profile: () => pushModal(SignUpProfile, {next: flows.email.complete, step: 2, totalSteps: 3}),
|
||||||
complete: () => pushModal(SignUpComplete, {next: flows.email.finalize}),
|
complete: () =>
|
||||||
|
pushModal(SignUpComplete, {next: flows.email.finalize, step: 3, totalSteps: 3}),
|
||||||
finalize: () => {
|
finalize: () => {
|
||||||
const email = getKey<string>("signup.email")!
|
const email = getKey<string>("signup.email")!
|
||||||
const clientOptions = getKey<ClientOptions>("signup.clientOptions")!
|
const clientOptions = getKey<ClientOptions>("signup.clientOptions")!
|
||||||
@@ -74,9 +75,10 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
nostr: {
|
nostr: {
|
||||||
start: () => pushModal(SignUpProfile, {next: flows.nostr.key}),
|
start: () => pushModal(SignUpProfile, {next: flows.nostr.key, step: 1, totalSteps: 3}),
|
||||||
key: () => pushModal(SignUpKey, {next: flows.nostr.complete}),
|
key: () => pushModal(SignUpKey, {next: flows.nostr.complete, step: 2, totalSteps: 3}),
|
||||||
complete: () => pushModal(SignUpComplete, {next: flows.nostr.finalize}),
|
complete: () =>
|
||||||
|
pushModal(SignUpComplete, {next: flows.nostr.finalize, step: 3, totalSteps: 3}),
|
||||||
finalize: () => {
|
finalize: () => {
|
||||||
const secret = getKey<string>("signup.secret")!
|
const secret = getKey<string>("signup.secret")!
|
||||||
|
|
||||||
|
|||||||
@@ -9,12 +9,15 @@
|
|||||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||||
import ModalTitle from "@lib/components/ModalTitle.svelte"
|
import ModalTitle from "@lib/components/ModalTitle.svelte"
|
||||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||||
|
import ProgressBar from "@app/components/ProgressBar.svelte"
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
next: () => void
|
next: () => void
|
||||||
|
step?: number
|
||||||
|
totalSteps?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
const {next}: Props = $props()
|
const {next, step, totalSteps}: Props = $props()
|
||||||
|
|
||||||
const back = () => history.back()
|
const back = () => history.back()
|
||||||
</script>
|
</script>
|
||||||
@@ -33,6 +36,9 @@
|
|||||||
on groups you've already joined. Click below to get started!
|
on groups you've already joined. Click below to get started!
|
||||||
</p>
|
</p>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
|
{#if step && totalSteps}
|
||||||
|
<ProgressBar current={step} total={totalSteps} />
|
||||||
|
{/if}
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button class="btn btn-link" onclick={back}>
|
<Button class="btn btn-link" onclick={back}>
|
||||||
<Icon icon={AltArrowLeft} />
|
<Icon icon={AltArrowLeft} />
|
||||||
|
|||||||
@@ -18,14 +18,17 @@
|
|||||||
import ModalSubtitle from "@lib/components/ModalSubtitle.svelte"
|
import ModalSubtitle from "@lib/components/ModalSubtitle.svelte"
|
||||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||||
import SignUpEmailConfirm from "@app/components/SignUpEmailConfirm.svelte"
|
import SignUpEmailConfirm from "@app/components/SignUpEmailConfirm.svelte"
|
||||||
|
import ProgressBar from "@app/components/ProgressBar.svelte"
|
||||||
import {pushToast, popToast} from "@app/util/toast"
|
import {pushToast, popToast} from "@app/util/toast"
|
||||||
import {pushModal} from "@app/util/modal"
|
import {pushModal} from "@app/util/modal"
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
next: () => void
|
next: () => void
|
||||||
|
step?: number
|
||||||
|
totalSteps?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
const {next}: Props = $props()
|
const {next, step, totalSteps}: Props = $props()
|
||||||
|
|
||||||
const back = () => history.back()
|
const back = () => history.back()
|
||||||
|
|
||||||
@@ -81,7 +84,7 @@
|
|||||||
setKey("signup.clientOptions", clientOptions)
|
setKey("signup.clientOptions", clientOptions)
|
||||||
|
|
||||||
popToast(toastId)
|
popToast(toastId)
|
||||||
pushModal(SignUpEmailConfirm, {next})
|
pushModal(SignUpEmailConfirm, {next, step, totalSteps})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
|
|
||||||
@@ -139,6 +142,9 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
</FieldInline>
|
</FieldInline>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
|
{#if step && totalSteps}
|
||||||
|
<ProgressBar current={step} total={totalSteps} />
|
||||||
|
{/if}
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button class="btn btn-link" onclick={back}>
|
<Button class="btn btn-link" onclick={back}>
|
||||||
<Icon icon={AltArrowLeft} />
|
<Icon icon={AltArrowLeft} />
|
||||||
|
|||||||
@@ -15,12 +15,15 @@
|
|||||||
import ModalTitle from "@lib/components/ModalTitle.svelte"
|
import ModalTitle from "@lib/components/ModalTitle.svelte"
|
||||||
import ModalSubtitle from "@lib/components/ModalSubtitle.svelte"
|
import ModalSubtitle from "@lib/components/ModalSubtitle.svelte"
|
||||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||||
|
import ProgressBar from "@app/components/ProgressBar.svelte"
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
next: () => void
|
next: () => void
|
||||||
|
step?: number
|
||||||
|
totalSteps?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
const {next}: Props = $props()
|
const {next, step, totalSteps}: Props = $props()
|
||||||
|
|
||||||
const email = getKey<string>("signup.email")
|
const email = getKey<string>("signup.email")
|
||||||
|
|
||||||
@@ -61,6 +64,9 @@
|
|||||||
above.
|
above.
|
||||||
</p>
|
</p>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
|
{#if step && totalSteps}
|
||||||
|
<ProgressBar current={step} total={totalSteps} />
|
||||||
|
{/if}
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button class="btn btn-link" onclick={back} disabled={loading}>
|
<Button class="btn btn-link" onclick={back} disabled={loading}>
|
||||||
<Icon icon={AltArrowLeft} />
|
<Icon icon={AltArrowLeft} />
|
||||||
|
|||||||
@@ -4,11 +4,13 @@
|
|||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
next: () => void
|
next: () => void
|
||||||
|
step?: number
|
||||||
|
totalSteps?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
const {next}: Props = $props()
|
const {next, step, totalSteps}: Props = $props()
|
||||||
|
|
||||||
const secret = getKey<string>("signup.secret")!
|
const secret = getKey<string>("signup.secret")!
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<KeyDownload {secret} {next} />
|
<KeyDownload {secret} {next} {step} {totalSteps} />
|
||||||
|
|||||||
@@ -5,15 +5,16 @@
|
|||||||
import {getKey, setKey} from "@lib/implicit"
|
import {getKey, setKey} from "@lib/implicit"
|
||||||
import Icon from "@lib/components/Icon.svelte"
|
import Icon from "@lib/components/Icon.svelte"
|
||||||
import Button from "@lib/components/Button.svelte"
|
import Button from "@lib/components/Button.svelte"
|
||||||
import Modal from "@lib/components/Modal.svelte"
|
|
||||||
import ModalBody from "@lib/components/ModalBody.svelte"
|
|
||||||
import ProfileEditForm from "@app/components/ProfileEditForm.svelte"
|
import ProfileEditForm from "@app/components/ProfileEditForm.svelte"
|
||||||
|
import ProgressBar from "@app/components/ProgressBar.svelte"
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
next: () => void
|
next: () => void
|
||||||
|
step?: number
|
||||||
|
totalSteps?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
const {next}: Props = $props()
|
const {next, step, totalSteps}: Props = $props()
|
||||||
|
|
||||||
const profile = getKey<Profile>("signup.profile")!
|
const profile = getKey<Profile>("signup.profile")!
|
||||||
|
|
||||||
@@ -27,19 +28,20 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Modal>
|
<ProfileEditForm isSignup {initialValues} {onsubmit}>
|
||||||
<ModalBody>
|
{#snippet footer()}
|
||||||
<ProfileEditForm isSignup {initialValues} {onsubmit}>
|
<Button class="btn btn-link" onclick={back}>
|
||||||
{#snippet footer()}
|
<Icon icon={AltArrowLeft} />
|
||||||
<Button class="btn btn-link" onclick={back}>
|
Go back
|
||||||
<Icon icon={AltArrowLeft} />
|
</Button>
|
||||||
Go back
|
<Button class="btn btn-primary" type="submit">
|
||||||
</Button>
|
Create Account
|
||||||
<Button class="btn btn-primary" type="submit">
|
<Icon icon={AltArrowRight} />
|
||||||
Create Account
|
</Button>
|
||||||
<Icon icon={AltArrowRight} />
|
{/snippet}
|
||||||
</Button>
|
{#snippet progressBar()}
|
||||||
{/snippet}
|
{#if step && totalSteps}
|
||||||
</ProfileEditForm>
|
<ProgressBar current={step} total={totalSteps} />
|
||||||
</ModalBody>
|
{/if}
|
||||||
</Modal>
|
{/snippet}
|
||||||
|
</ProfileEditForm>
|
||||||
|
|||||||
@@ -2,9 +2,10 @@
|
|||||||
import {tick} from "svelte"
|
import {tick} from "svelte"
|
||||||
import {debounce} from "throttle-debounce"
|
import {debounce} from "throttle-debounce"
|
||||||
import {request} from "@welshman/net"
|
import {request} from "@welshman/net"
|
||||||
import {formatTimestampAsDate, groupBy, now, MINUTE, HOUR, DAY, WEEK} from "@welshman/lib"
|
import {repository, tracker} from "@welshman/app"
|
||||||
|
import {formatTimestampAsDate, groupBy, uniqBy, now, MINUTE, HOUR, DAY, WEEK} from "@welshman/lib"
|
||||||
import type {TrustedEvent, Filter} from "@welshman/util"
|
import type {TrustedEvent, Filter} from "@welshman/util"
|
||||||
import {sortEventsDesc} from "@welshman/util"
|
import {MESSAGE, sortEventsDesc} from "@welshman/util"
|
||||||
import CloseCircle from "@assets/icons/close-circle.svg?dataurl"
|
import CloseCircle from "@assets/icons/close-circle.svg?dataurl"
|
||||||
import Magnifier from "@assets/icons/magnifier.svg?dataurl"
|
import Magnifier from "@assets/icons/magnifier.svg?dataurl"
|
||||||
import {fly} from "@lib/transition"
|
import {fly} from "@lib/transition"
|
||||||
@@ -53,8 +54,11 @@
|
|||||||
|
|
||||||
const getFilter = (searchTerm: string): Filter =>
|
const getFilter = (searchTerm: string): Filter =>
|
||||||
h
|
h
|
||||||
? {kinds: CONTENT_KINDS, "#h": [h], search: searchTerm}
|
? {kinds: [MESSAGE, ...CONTENT_KINDS], "#h": [h], search: searchTerm}
|
||||||
: {kinds: CONTENT_KINDS, search: searchTerm}
|
: {kinds: [MESSAGE, ...CONTENT_KINDS], search: searchTerm}
|
||||||
|
|
||||||
|
const getLocalResults = (filter: Filter) =>
|
||||||
|
repository.query([filter]).filter(event => tracker.getRelays(event.id).has(url))
|
||||||
|
|
||||||
const search = debounce(300, async (searchTerm: string) => {
|
const search = debounce(300, async (searchTerm: string) => {
|
||||||
controller?.abort()
|
controller?.abort()
|
||||||
@@ -68,18 +72,23 @@
|
|||||||
controller = new AbortController()
|
controller = new AbortController()
|
||||||
loading = true
|
loading = true
|
||||||
|
|
||||||
|
const filter = getFilter(searchTerm.trim())
|
||||||
|
const localResults = getLocalResults(filter)
|
||||||
|
|
||||||
|
results = sortEventsDesc(localResults)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const events = await request({
|
const events = await request({
|
||||||
relays: getRelayUrls(),
|
relays: getRelayUrls(),
|
||||||
autoClose: true,
|
autoClose: true,
|
||||||
signal: controller.signal,
|
signal: controller.signal,
|
||||||
filters: [getFilter(searchTerm.trim())],
|
filters: [filter],
|
||||||
})
|
})
|
||||||
|
|
||||||
results = sortEventsDesc(events)
|
results = sortEventsDesc(uniqBy((e: TrustedEvent) => e.id, [...events, ...localResults]))
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (!(error instanceof DOMException && error.name === "AbortError")) {
|
if (!(error instanceof DOMException && error.name === "AbortError")) {
|
||||||
results = []
|
results = sortEventsDesc(localResults)
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loading = false
|
loading = false
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import {
|
|||||||
import type {TrustedEvent, Filter, List} from "@welshman/util"
|
import type {TrustedEvent, Filter, List} from "@welshman/util"
|
||||||
import {load, request, mergeRepositoryUpdates} from "@welshman/net"
|
import {load, request, mergeRepositoryUpdates} from "@welshman/net"
|
||||||
import type {RepositoryUpdate} from "@welshman/net"
|
import type {RepositoryUpdate} from "@welshman/net"
|
||||||
import {repository, loadRelay, tracker} from "@welshman/app"
|
import {pubkey, repository, loadRelay, tracker} from "@welshman/app"
|
||||||
import {createScroller} from "@lib/html"
|
import {createScroller} from "@lib/html"
|
||||||
import {daysBetween} from "@lib/util"
|
import {daysBetween} from "@lib/util"
|
||||||
import {getEventsForUrl} from "@app/core/state"
|
import {getEventsForUrl} from "@app/core/state"
|
||||||
@@ -41,6 +41,7 @@ export const makeFeed = ({
|
|||||||
element,
|
element,
|
||||||
onBackwardExhausted,
|
onBackwardExhausted,
|
||||||
onForwardExhausted,
|
onForwardExhausted,
|
||||||
|
allowOptimisticSelfEvents = false,
|
||||||
at = now(),
|
at = now(),
|
||||||
}: {
|
}: {
|
||||||
url: string
|
url: string
|
||||||
@@ -48,6 +49,7 @@ export const makeFeed = ({
|
|||||||
element: HTMLElement
|
element: HTMLElement
|
||||||
onBackwardExhausted?: () => void
|
onBackwardExhausted?: () => void
|
||||||
onForwardExhausted?: () => void
|
onForwardExhausted?: () => void
|
||||||
|
allowOptimisticSelfEvents?: boolean
|
||||||
at?: number
|
at?: number
|
||||||
}) => {
|
}) => {
|
||||||
const controller = new AbortController()
|
const controller = new AbortController()
|
||||||
@@ -113,7 +115,15 @@ export const makeFeed = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const matching = added.filter(
|
const matching = added.filter(
|
||||||
event => matchFilters(filters, event) && tracker.getRelays(event.id).has(url),
|
event =>
|
||||||
|
matchFilters(filters, event) &&
|
||||||
|
(tracker.getRelays(event.id).has(url) ||
|
||||||
|
// In Safari, relay confirmation can lag behind local repository updates.
|
||||||
|
// Only enable this for chat-like feeds that explicitly opt in.
|
||||||
|
(allowOptimisticSelfEvents &&
|
||||||
|
event.pubkey === pubkey.get() &&
|
||||||
|
tracker.getRelays(event.id).size === 0 &&
|
||||||
|
event.created_at >= now() - 60)),
|
||||||
)
|
)
|
||||||
|
|
||||||
if (matching.length > 0) {
|
if (matching.length > 0) {
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
export const POMADE_INVALID_LOGIN_MESSAGE = "Invalid login information"
|
||||||
|
export const POMADE_NETWORK_ERROR_MESSAGE = "Network error, please try again"
|
||||||
|
|
||||||
|
type PomadeMessage = {
|
||||||
|
res?: unknown
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getPomadeLoginFailureMessage = (messages: PomadeMessage[]) =>
|
||||||
|
messages.some(message => message.res !== undefined)
|
||||||
|
? POMADE_INVALID_LOGIN_MESSAGE
|
||||||
|
: POMADE_NETWORK_ERROR_MESSAGE
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import "emoji-picker-element"
|
import "emoji-picker-element"
|
||||||
|
import emojiDataUrl from "emoji-picker-element-data/en/emojibase/data.json?url"
|
||||||
import type {Emoji} from "emoji-picker-element/shared"
|
import type {Emoji} from "emoji-picker-element/shared"
|
||||||
import {onMount} from "svelte"
|
import {onMount} from "svelte"
|
||||||
|
|
||||||
@@ -26,4 +27,4 @@
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<emoji-picker bind:this={element} class="m-auto"></emoji-picker>
|
<emoji-picker bind:this={element} data-source={emojiDataUrl} class="m-auto"></emoji-picker>
|
||||||
|
|||||||
@@ -12,11 +12,11 @@
|
|||||||
<div class="flex flex-col gap-2 {props.class}">
|
<div class="flex flex-col gap-2 {props.class}">
|
||||||
<div class="flex items-center justify-between w-full gap-2">
|
<div class="flex items-center justify-between w-full gap-2">
|
||||||
{#if props.label}
|
{#if props.label}
|
||||||
<label class="flex items-center gap-2 max-w-[80%] md:max-w-none">
|
<label class="flex items-center gap-2 min-w-[30%] max-w-[80%] md:max-w-none">
|
||||||
{@render props.label()}
|
{@render props.label()}
|
||||||
</label>
|
</label>
|
||||||
{/if}
|
{/if}
|
||||||
<div class="flex items-center gap-2 justify-end shrink-0">
|
<div class="flex items-center gap-2 justify-end grow">
|
||||||
{#if props.input}
|
{#if props.input}
|
||||||
{@render props.input()}
|
{@render props.input()}
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
const className = $derived(
|
const className = $derived(
|
||||||
cx(
|
cx(
|
||||||
props.class,
|
props.class,
|
||||||
"scroll-container z-feature flex min-h-0 w-full min-w-0 flex-1 flex-col overflow-y-auto overflow-x-hidden",
|
"scroll-container z-feature flex min-h-0 w-full min-w-0 flex-col overflow-y-auto overflow-x-hidden",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -145,9 +145,7 @@
|
|||||||
<p>Media Server</p>
|
<p>Media Server</p>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
{#snippet secondary()}
|
{#snippet secondary()}
|
||||||
<Button
|
<Button class="link text-sm underline flex items-center gap-1" onclick={addServer}>
|
||||||
class="btn btn-link w-fit px-0 decoration-solid underline text-[#7161ff] h-auto min-h-0 flex items-center gap-[5px]"
|
|
||||||
onclick={addServer}>
|
|
||||||
<Icon icon={AddCircle} size={4} />
|
<Icon icon={AddCircle} size={4} />
|
||||||
Add Server
|
Add Server
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -12,8 +12,10 @@
|
|||||||
settings = {...$userSettingsValues}
|
settings = {...$userSettingsValues}
|
||||||
}
|
}
|
||||||
|
|
||||||
const onAuthModeChange = (e: any) => {
|
const onAuthModeChange = (e: Event) => {
|
||||||
settings.auth_mode = e.target.checked ? RelayAuthMode.Aggressive : RelayAuthMode.Conservative
|
const target = e.currentTarget as HTMLInputElement
|
||||||
|
|
||||||
|
settings.relay_auth = target.checked ? RelayAuthMode.Aggressive : RelayAuthMode.Conservative
|
||||||
}
|
}
|
||||||
|
|
||||||
const onsubmit = preventDefault(async () => {
|
const onsubmit = preventDefault(async () => {
|
||||||
@@ -40,7 +42,7 @@
|
|||||||
type="checkbox"
|
type="checkbox"
|
||||||
class="toggle toggle-primary"
|
class="toggle toggle-primary"
|
||||||
onchange={onAuthModeChange}
|
onchange={onAuthModeChange}
|
||||||
checked={settings.auth_mode === RelayAuthMode.Aggressive} />
|
checked={settings.relay_auth === RelayAuthMode.Aggressive} />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
{#snippet info()}
|
{#snippet info()}
|
||||||
<p>Controls whether {PLATFORM_NAME} will identify you to relays not in your lists.</p>
|
<p>Controls whether {PLATFORM_NAME} will identify you to relays not in your lists.</p>
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
import PasswordReset from "@app/components/PasswordReset.svelte"
|
import PasswordReset from "@app/components/PasswordReset.svelte"
|
||||||
import InfoKeys from "@app/components/InfoKeys.svelte"
|
import InfoKeys from "@app/components/InfoKeys.svelte"
|
||||||
import {pushModal} from "@app/util/modal"
|
import {pushModal} from "@app/util/modal"
|
||||||
|
import {POMADE_NETWORK_ERROR_MESSAGE} from "@app/util/pomadeErrors"
|
||||||
import {clip, pushToast} from "@app/util/toast"
|
import {clip, pushToast} from "@app/util/toast"
|
||||||
|
|
||||||
const npub = nip19.npubEncode($pubkey!)
|
const npub = nip19.npubEncode($pubkey!)
|
||||||
@@ -48,13 +49,24 @@
|
|||||||
const {ok, peersByPrefix} = await Client.requestChallenge($session!.email)
|
const {ok, peersByPrefix} = await Client.requestChallenge($session!.email)
|
||||||
|
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
|
console.error("Pomade challenge request failed during password reset initiation")
|
||||||
|
|
||||||
pushToast({
|
pushToast({
|
||||||
theme: "error",
|
theme: "error",
|
||||||
message: "Failed to initiate password reset!",
|
message: POMADE_NETWORK_ERROR_MESSAGE,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
pushModal(PasswordReset, {peersByPrefix})
|
pushModal(PasswordReset, {peersByPrefix})
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
|
||||||
|
pushToast({
|
||||||
|
theme: "error",
|
||||||
|
message: POMADE_NETWORK_ERROR_MESSAGE,
|
||||||
|
})
|
||||||
} finally {
|
} finally {
|
||||||
loading = false
|
loading = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
import InfoCircle from "@assets/icons/info-circle.svg?dataurl"
|
import InfoCircle from "@assets/icons/info-circle.svg?dataurl"
|
||||||
import Login2 from "@assets/icons/login-3.svg?dataurl"
|
import Login2 from "@assets/icons/login-3.svg?dataurl"
|
||||||
import cx from "classnames"
|
import cx from "classnames"
|
||||||
import {slide, fade, fly} from "@lib/transition"
|
import {fade, fly} from "@lib/transition"
|
||||||
import Button from "@lib/components/Button.svelte"
|
import Button from "@lib/components/Button.svelte"
|
||||||
import Divider from "@lib/components/Divider.svelte"
|
import Divider from "@lib/components/Divider.svelte"
|
||||||
import Icon from "@lib/components/Icon.svelte"
|
import Icon from "@lib/components/Icon.svelte"
|
||||||
@@ -246,6 +246,7 @@
|
|||||||
if (!isProgrammaticScroll) {
|
if (!isProgrammaticScroll) {
|
||||||
userHasScrolled = true
|
userHasScrolled = true
|
||||||
isUserScrolling = true
|
isUserScrolling = true
|
||||||
|
wasAtBottom = !element || Math.abs(element.scrollTop) < 100
|
||||||
clearIsUserScrolling()
|
clearIsUserScrolling()
|
||||||
manageScrollPosition()
|
manageScrollPosition()
|
||||||
}
|
}
|
||||||
@@ -281,6 +282,7 @@
|
|||||||
let events: Readable<TrustedEvent[]> = $state(readable([]))
|
let events: Readable<TrustedEvent[]> = $state(readable([]))
|
||||||
let compose: RoomCompose | undefined = $state()
|
let compose: RoomCompose | undefined = $state()
|
||||||
let eventToEdit: TrustedEvent | undefined = $state()
|
let eventToEdit: TrustedEvent | undefined = $state()
|
||||||
|
let wasAtBottom = true
|
||||||
|
|
||||||
const clearIsUserScrolling = debounce(150, () => {
|
const clearIsUserScrolling = debounce(150, () => {
|
||||||
isUserScrolling = false
|
isUserScrolling = false
|
||||||
@@ -359,8 +361,20 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
if (elements.length > 0 && !isUserScrolling) {
|
if (elements.length > 0) {
|
||||||
requestAnimationFrame(manageScrollPosition)
|
requestAnimationFrame(() => {
|
||||||
|
// Safari does not implement CSS scroll anchoring for flex-col-reverse.
|
||||||
|
// When a new message is inserted, Safari shifts scrollTop upward to preserve
|
||||||
|
// visual position rather than keeping it pinned at 0 (visual bottom).
|
||||||
|
// Snap back to 0 whenever the user was at the bottom before the update.
|
||||||
|
if (element && isNaN(at) && wasAtBottom) {
|
||||||
|
isProgrammaticScroll = true
|
||||||
|
element.scrollTop = 0
|
||||||
|
}
|
||||||
|
if (!isUserScrolling) {
|
||||||
|
manageScrollPosition()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -371,6 +385,7 @@
|
|||||||
url,
|
url,
|
||||||
at: at || now(),
|
at: at || now(),
|
||||||
element: element!,
|
element: element!,
|
||||||
|
allowOptimisticSelfEvents: true,
|
||||||
filters: [{kinds: [MESSAGE, ROOM_ADD_MEMBER], "#h": [h]}],
|
filters: [{kinds: [MESSAGE, ROOM_ADD_MEMBER], "#h": [h]}],
|
||||||
onBackwardExhausted: () => {
|
onBackwardExhausted: () => {
|
||||||
loadingBackward = false
|
loadingBackward = false
|
||||||
@@ -404,7 +419,7 @@
|
|||||||
onMount(() => {
|
onMount(() => {
|
||||||
start()
|
start()
|
||||||
|
|
||||||
return cleanup
|
return () => cleanup?.()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -496,7 +511,7 @@
|
|||||||
{#if event.kind === ROOM_ADD_MEMBER}
|
{#if event.kind === ROOM_ADD_MEMBER}
|
||||||
<RoomItemAddMember {url} {event} />
|
<RoomItemAddMember {url} {event} />
|
||||||
{:else}
|
{:else}
|
||||||
<div in:slide class="cv">
|
<div>
|
||||||
<RoomItem
|
<RoomItem
|
||||||
{url}
|
{url}
|
||||||
{event}
|
{event}
|
||||||
|
|||||||
@@ -141,6 +141,7 @@
|
|||||||
if (!isProgrammaticScroll) {
|
if (!isProgrammaticScroll) {
|
||||||
userHasScrolled = true
|
userHasScrolled = true
|
||||||
isUserScrolling = true
|
isUserScrolling = true
|
||||||
|
wasAtBottom = !element || Math.abs(element.scrollTop) < 100
|
||||||
clearIsUserScrolling()
|
clearIsUserScrolling()
|
||||||
manageScrollPosition()
|
manageScrollPosition()
|
||||||
}
|
}
|
||||||
@@ -174,6 +175,7 @@
|
|||||||
let events: Readable<TrustedEvent[]> = $state(readable([]))
|
let events: Readable<TrustedEvent[]> = $state(readable([]))
|
||||||
let compose: RoomCompose | undefined = $state()
|
let compose: RoomCompose | undefined = $state()
|
||||||
let eventToEdit: TrustedEvent | undefined = $state()
|
let eventToEdit: TrustedEvent | undefined = $state()
|
||||||
|
let wasAtBottom = true
|
||||||
|
|
||||||
const clearIsUserScrolling = debounce(150, () => {
|
const clearIsUserScrolling = debounce(150, () => {
|
||||||
isUserScrolling = false
|
isUserScrolling = false
|
||||||
@@ -252,8 +254,20 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
if (elements.length > 0 && !isUserScrolling) {
|
if (elements.length > 0) {
|
||||||
requestAnimationFrame(manageScrollPosition)
|
requestAnimationFrame(() => {
|
||||||
|
// Safari does not implement CSS scroll anchoring for flex-col-reverse.
|
||||||
|
// When a new message is inserted, Safari shifts scrollTop upward to preserve
|
||||||
|
// visual position rather than keeping it pinned at 0 (visual bottom).
|
||||||
|
// Snap back to 0 whenever the user was at the bottom before the update.
|
||||||
|
if (element && isNaN(at) && wasAtBottom) {
|
||||||
|
isProgrammaticScroll = true
|
||||||
|
element.scrollTop = 0
|
||||||
|
}
|
||||||
|
if (!isUserScrolling) {
|
||||||
|
manageScrollPosition()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -264,6 +278,7 @@
|
|||||||
url,
|
url,
|
||||||
at: at || now(),
|
at: at || now(),
|
||||||
element: element!,
|
element: element!,
|
||||||
|
allowOptimisticSelfEvents: true,
|
||||||
filters: [{kinds: [MESSAGE, RELAY_ADD_MEMBER]}],
|
filters: [{kinds: [MESSAGE, RELAY_ADD_MEMBER]}],
|
||||||
onBackwardExhausted: () => {
|
onBackwardExhausted: () => {
|
||||||
loadingBackward = false
|
loadingBackward = false
|
||||||
@@ -297,7 +312,7 @@
|
|||||||
onMount(() => {
|
onMount(() => {
|
||||||
start()
|
start()
|
||||||
|
|
||||||
return cleanup
|
return () => cleanup?.()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Server from "@assets/icons/server.svg?dataurl"
|
import Server from "@assets/icons/server.svg?dataurl"
|
||||||
|
import CloudCheck from "@assets/icons/cloud-check.svg?dataurl"
|
||||||
|
import CheckCircle from "@assets/icons/check-circle.svg?dataurl"
|
||||||
import ArrowRight from "@assets/icons/arrow-right.svg?dataurl"
|
import ArrowRight from "@assets/icons/arrow-right.svg?dataurl"
|
||||||
import Link from "@lib/components/Link.svelte"
|
import Link from "@lib/components/Link.svelte"
|
||||||
import Icon from "@lib/components/Icon.svelte"
|
import Icon from "@lib/components/Icon.svelte"
|
||||||
@@ -12,78 +14,91 @@
|
|||||||
<PageContent class="flex flex-col items-center gap-2 p-2 pt-4">
|
<PageContent class="flex flex-col items-center gap-2 p-2 pt-4">
|
||||||
<PageHeader>
|
<PageHeader>
|
||||||
{#snippet title()}
|
{#snippet title()}
|
||||||
<div>Create your own Space</div>
|
<div>Choose your Hosting Plan</div>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
{#snippet info()}
|
{#snippet info()}
|
||||||
<p>Get started with one of our trusted partners, or learn how to host your own space.</p>
|
<p>
|
||||||
|
Select how you want to deploy and manage your new Space. You can always migrate later.
|
||||||
|
</p>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
<div class="grid w-full max-w-lg grid-cols-1 gap-2 lg:max-w-4xl lg:grid-cols-2">
|
<div class="flex w-full max-w-lg flex-col gap-4 lg:max-w-4xl">
|
||||||
<div class="card2 bg-alt flex flex-col gap-4">
|
<div class="grid grid-cols-1 gap-2 lg:grid-cols-2">
|
||||||
<div class="flex flex-col gap-4">
|
<div class="card2 bg-alt flex flex-col gap-5">
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex flex-col gap-3">
|
||||||
<div class="flex items-center gap-3">
|
<div class="bg-primary/20 flex h-10 w-10 items-center justify-center rounded-md">
|
||||||
<Icon icon={Server} />
|
<Icon icon={CloudCheck} class="text-primary" />
|
||||||
<h3 class="text-lg font-bold">Self-Host your Space</h3>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="badge badge-neutral">Recommended</div>
|
<div class="flex flex-col gap-1">
|
||||||
|
<h3 class="text-lg font-bold">Community</h3>
|
||||||
|
<div class="text-xs font-semibold tracking-wider opacity-60">SELF-HOSTED</div>
|
||||||
|
</div>
|
||||||
|
<p class="text-sm opacity-70">
|
||||||
|
For technical users who want full control. Deploy on your own infrastructure and
|
||||||
|
manage your own updates and scaling.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<ul class="flex list-inside list-disc flex-col gap-1 text-sm opacity-70">
|
<ul class="flex flex-col gap-2 text-sm">
|
||||||
<li>Unlimited customization and control</li>
|
<li class="flex items-center gap-2">
|
||||||
<li>Free and open source software</li>
|
<Icon icon={CheckCircle} class="opacity-60" />
|
||||||
<li>Full-featured admin dashboards available</li>
|
Open source core
|
||||||
<li>Requires some technical skills</li>
|
</li>
|
||||||
|
<li class="flex items-center gap-2">
|
||||||
|
<Icon icon={CheckCircle} class="opacity-60" />
|
||||||
|
Community support
|
||||||
|
</li>
|
||||||
|
<li class="flex items-center gap-2">
|
||||||
|
<Icon icon={CheckCircle} class="opacity-60" />
|
||||||
|
Bring your own infra
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<Link
|
||||||
|
external
|
||||||
|
class="btn btn-neutral mt-auto"
|
||||||
|
href="https://gitea.coracle.social/coracle/zooid">
|
||||||
|
Get started
|
||||||
|
<Icon icon={ArrowRight} />
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<Link external class="btn btn-primary" href="https://github.com/coracle-social/zooid">
|
<div class="card2 bg-alt border-primary flex flex-col gap-5 border">
|
||||||
Get Started
|
<div class="flex flex-col gap-3">
|
||||||
<Icon icon={ArrowRight} />
|
<div class="flex items-start justify-between">
|
||||||
</Link>
|
<img alt="Coracle Logo" src="/coracle.png" class="h-10 w-10" />
|
||||||
</div>
|
<div class="badge badge-primary">Recommended</div>
|
||||||
<div class="card2 bg-alt flex flex-col gap-4">
|
</div>
|
||||||
<div class="flex flex-col gap-4">
|
<div class="flex flex-col gap-1">
|
||||||
<div class="flex items-center justify-between">
|
|
||||||
<div class="flex items-center gap-2">
|
|
||||||
<img alt="Coracle Logo" src="/coracle.png" class="h-7 w-7" />
|
|
||||||
<h3 class="text-lg font-bold">Coracle Hosting</h3>
|
<h3 class="text-lg font-bold">Coracle Hosting</h3>
|
||||||
|
<div class="text-xs font-semibold tracking-wider opacity-60">FULLY MANAGED</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="badge badge-neutral">Recommended</div>
|
<p class="text-sm opacity-70">
|
||||||
|
The premium experience. We handle the infrastructure, security updates, and scaling so
|
||||||
|
you can focus on your community.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<ul class="flex list-inside list-disc flex-col gap-1 text-sm opacity-70">
|
<ul class="flex flex-col gap-2 text-sm">
|
||||||
<li>Simple setup, support included</li>
|
<li class="flex items-center gap-2">
|
||||||
<li>Free and open source software — no vendor lock-in</li>
|
<Icon icon={CheckCircle} class="text-primary" />
|
||||||
<li>Advanced access controls and relay policies</li>
|
One-click deployment
|
||||||
<li>Full-featured admin dashboard</li>
|
</li>
|
||||||
|
<li class="flex items-center gap-2">
|
||||||
|
<Icon icon={CheckCircle} class="text-primary" />
|
||||||
|
Automated backups & scaling
|
||||||
|
</li>
|
||||||
|
<li class="flex items-center gap-2">
|
||||||
|
<Icon icon={CheckCircle} class="text-primary" />
|
||||||
|
Priority support
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<Link external class="btn btn-primary mt-auto" href="https://hosting.coracle.social">
|
||||||
|
Start for free
|
||||||
|
<Icon icon={ArrowRight} />
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<Link external class="btn btn-neutral" href="https://hosting.coracle.social">
|
|
||||||
Get Started
|
|
||||||
<Icon icon={ArrowRight} />
|
|
||||||
</Link>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card2 bg-alt flex flex-col gap-4">
|
<div class="flex flex-col items-center justify-center gap-2 py-2 text-sm opacity-70">
|
||||||
<div class="flex flex-col gap-4">
|
<span>Want to host on other servers?</span>
|
||||||
<div class="self-start">
|
<Link external class="link center gap-1" href="https://relay.tools/signup">
|
||||||
<img
|
Other hosting options
|
||||||
alt="Relay Tools"
|
|
||||||
src="https://relay.tools/17.svg"
|
|
||||||
class="-my-20 -ml-2 hidden h-48 dark:block"
|
|
||||||
style="filter: contrast(50%)" />
|
|
||||||
<img
|
|
||||||
alt="Relay Tools"
|
|
||||||
src="https://relay.tools/19.svg"
|
|
||||||
class="-my-20 -ml-2 h-48 dark:hidden"
|
|
||||||
style="filter: contrast(50%)" />
|
|
||||||
</div>
|
|
||||||
<ul class="flex list-inside list-disc flex-col gap-1 text-sm opacity-70">
|
|
||||||
<li>Independently run</li>
|
|
||||||
<li>Customizable relay policies</li>
|
|
||||||
<li>Simple management dashboard</li>
|
|
||||||
<li>Support available</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<Link external class="btn btn-neutral" href="https://relay.tools/signup">
|
|
||||||
Get Started
|
|
||||||
<Icon icon={ArrowRight} />
|
<Icon icon={ArrowRight} />
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user