Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 976ccdabd4 | |||
| 99b26680b6 | |||
| c5be477855 | |||
| 32c1501e9c | |||
| 463837e7d4 | |||
| d74f142cdd | |||
| 53954aae89 | |||
| 24aa62a503 | |||
| 2618bb9c63 | |||
| 32a31045ef | |||
| 56edad77a8 | |||
| fdb604e350 | |||
| 3c66dfd83c | |||
| 81633b0a1e | |||
| 4a967de184 | |||
| 59961cbdb5 |
@@ -85,6 +85,7 @@
|
||||
"date-picker-svelte": "^2.17.0",
|
||||
"dotenv": "^16.6.1",
|
||||
"emoji-picker-element": "^1.28.1",
|
||||
"emoji-picker-element-data": "^1.8.0",
|
||||
"fuse.js": "^7.1.0",
|
||||
"husky": "^9.1.7",
|
||||
"idb": "^8.0.3",
|
||||
|
||||
Generated
+8
@@ -137,6 +137,9 @@ importers:
|
||||
emoji-picker-element:
|
||||
specifier: ^1.28.1
|
||||
version: 1.28.1
|
||||
emoji-picker-element-data:
|
||||
specifier: ^1.8.0
|
||||
version: 1.8.0
|
||||
fuse.js:
|
||||
specifier: ^7.1.0
|
||||
version: 7.1.0
|
||||
@@ -2824,6 +2827,9 @@ packages:
|
||||
resolution: {integrity: sha512-wkgGT6kugeQk/P6VZ/f4T+4HB41BVgNBq5CDIZVbQ02nvTVqAiVTbskxxu3eA/X96lMlfYOwnLQpN2v5E1zDEg==}
|
||||
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:
|
||||
resolution: {integrity: sha512-8c64IPish2PWoV9oYCo2pvuPHwIv+uK9bO0dfpPyMupDAvaWL9ZvYhWNTAR+2sx7BhfRjciImqP6CIUgNX+DMg==}
|
||||
|
||||
@@ -8028,6 +8034,8 @@ snapshots:
|
||||
dependencies:
|
||||
sax: 1.1.4
|
||||
|
||||
emoji-picker-element-data@1.8.0: {}
|
||||
|
||||
emoji-picker-element@1.28.1: {}
|
||||
|
||||
emoji-regex@8.0.0: {}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
let popover: Instance | undefined = $state()
|
||||
</script>
|
||||
|
||||
<Button class="join rounded-full">
|
||||
<div class="join items-center rounded-full">
|
||||
{#if ENABLE_ZAPS && !hideZap}
|
||||
<ZapButton {url} {event} class="btn join-item btn-neutral btn-xs">
|
||||
<Icon icon={Bolt} size={4} />
|
||||
@@ -52,6 +52,7 @@
|
||||
<Icon icon={SmileCircle} size={4} />
|
||||
</EmojiButton>
|
||||
<Tippy
|
||||
class="flex"
|
||||
bind:popover
|
||||
component={EventMenu}
|
||||
props={{url, noun, event, customActions, onClick: hidePopover}}
|
||||
@@ -60,4 +61,4 @@
|
||||
<Icon icon={MenuDots} size={4} />
|
||||
</Button>
|
||||
</Tippy>
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalTitle from "@lib/components/ModalTitle.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import ProgressBar from "@app/components/ProgressBar.svelte"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {PLATFORM_NAME} from "@app/core/state"
|
||||
|
||||
@@ -22,9 +23,11 @@
|
||||
secret: string
|
||||
next: () => unknown
|
||||
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()
|
||||
|
||||
@@ -150,6 +153,9 @@
|
||||
</Button>
|
||||
</div>
|
||||
</ModalBody>
|
||||
{#if step && totalSteps}
|
||||
<ProgressBar current={step} total={totalSteps} />
|
||||
{/if}
|
||||
<ModalFooter>
|
||||
<Button class="btn btn-link" onclick={back}>
|
||||
<Icon icon={AltArrowLeft} />
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
import LogInOTP from "@app/components/LogInOTP.svelte"
|
||||
import LogInSelect from "@app/components/LogInSelect.svelte"
|
||||
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 {setChecked} from "@app/util/notifications"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
@@ -44,7 +45,7 @@
|
||||
|
||||
return pushToast({
|
||||
theme: "error",
|
||||
message: "Sorry, we were unable to log you in.",
|
||||
message: getPomadeLoginFailureMessage(messages),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -64,10 +65,17 @@
|
||||
|
||||
pushToast({
|
||||
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 {
|
||||
loading = false
|
||||
}
|
||||
@@ -90,7 +98,7 @@
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon={Letter} />
|
||||
<input bind:value={email} />
|
||||
<input type="email" bind:value={email} />
|
||||
</label>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
import ModalSubtitle from "@lib/components/ModalSubtitle.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import LogInOTPConfirm from "@app/components/LogInOTPConfirm.svelte"
|
||||
import {POMADE_NETWORK_ERROR_MESSAGE} from "@app/util/pomadeErrors"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
|
||||
@@ -35,11 +36,20 @@
|
||||
if (ok) {
|
||||
pushModal(LogInOTPConfirm, {email, peersByPrefix})
|
||||
} else {
|
||||
console.error("Pomade challenge request failed during OTP login")
|
||||
|
||||
pushToast({
|
||||
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 {
|
||||
loading = false
|
||||
}
|
||||
@@ -61,7 +71,7 @@
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon={Letter} />
|
||||
<input bind:value={email} />
|
||||
<input type="email" bind:value={email} />
|
||||
</label>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
|
||||
@@ -15,10 +15,11 @@
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import StringMultiInput from "@lib/components/StringMultiInput.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 {setChecked} from "@app/util/notifications"
|
||||
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 = {
|
||||
email: string
|
||||
@@ -44,7 +45,7 @@
|
||||
|
||||
return pushToast({
|
||||
theme: "error",
|
||||
message: "Sorry, we were unable to log you in.",
|
||||
message: getPomadeLoginFailureMessage(messages),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -64,10 +65,17 @@
|
||||
|
||||
pushToast({
|
||||
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 {
|
||||
loading = false
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import Profile from "@app/components/Profile.svelte"
|
||||
import {deleteDeactivatedPomadeSessions, loginWithPomade} from "@app/util/pomade"
|
||||
import {getPomadeLoginFailureMessage, POMADE_NETWORK_ERROR_MESSAGE} from "@app/util/pomadeErrors"
|
||||
import {setChecked} from "@app/util/notifications"
|
||||
import {clearModals} from "@app/util/modal"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
@@ -46,9 +47,16 @@
|
||||
|
||||
pushToast({
|
||||
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 {
|
||||
loading = false
|
||||
}
|
||||
|
||||
@@ -23,9 +23,10 @@
|
||||
onsubmit: (values: Values) => void
|
||||
isSignup?: boolean
|
||||
footer: Snippet
|
||||
progressBar?: Snippet
|
||||
}
|
||||
|
||||
const {initialValues, isSignup, onsubmit, footer}: Props = $props()
|
||||
const {initialValues, isSignup, onsubmit, footer, progressBar}: Props = $props()
|
||||
|
||||
const values = $state(initialValues)
|
||||
|
||||
@@ -103,6 +104,9 @@
|
||||
</Field>
|
||||
{/if}
|
||||
</ModalBody>
|
||||
{#if progressBar}
|
||||
{@render progressBar()}
|
||||
{/if}
|
||||
<ModalFooter>
|
||||
{@render footer()}
|
||||
</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 = {
|
||||
email: {
|
||||
start: () => pushModal(SignUpEmail, {next: flows.email.profile}),
|
||||
profile: () => pushModal(SignUpProfile, {next: flows.email.complete}),
|
||||
complete: () => pushModal(SignUpComplete, {next: flows.email.finalize}),
|
||||
start: () => pushModal(SignUpEmail, {next: flows.email.profile, step: 1, totalSteps: 3}),
|
||||
profile: () => pushModal(SignUpProfile, {next: flows.email.complete, step: 2, totalSteps: 3}),
|
||||
complete: () =>
|
||||
pushModal(SignUpComplete, {next: flows.email.finalize, step: 3, totalSteps: 3}),
|
||||
finalize: () => {
|
||||
const email = getKey<string>("signup.email")!
|
||||
const clientOptions = getKey<ClientOptions>("signup.clientOptions")!
|
||||
@@ -74,9 +75,10 @@
|
||||
},
|
||||
},
|
||||
nostr: {
|
||||
start: () => pushModal(SignUpProfile, {next: flows.nostr.key}),
|
||||
key: () => pushModal(SignUpKey, {next: flows.nostr.complete}),
|
||||
complete: () => pushModal(SignUpComplete, {next: flows.nostr.finalize}),
|
||||
start: () => pushModal(SignUpProfile, {next: flows.nostr.key, step: 1, totalSteps: 3}),
|
||||
key: () => pushModal(SignUpKey, {next: flows.nostr.complete, step: 2, totalSteps: 3}),
|
||||
complete: () =>
|
||||
pushModal(SignUpComplete, {next: flows.nostr.finalize, step: 3, totalSteps: 3}),
|
||||
finalize: () => {
|
||||
const secret = getKey<string>("signup.secret")!
|
||||
|
||||
|
||||
@@ -9,12 +9,15 @@
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalTitle from "@lib/components/ModalTitle.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import ProgressBar from "@app/components/ProgressBar.svelte"
|
||||
|
||||
type Props = {
|
||||
next: () => void
|
||||
step?: number
|
||||
totalSteps?: number
|
||||
}
|
||||
|
||||
const {next}: Props = $props()
|
||||
const {next, step, totalSteps}: Props = $props()
|
||||
|
||||
const back = () => history.back()
|
||||
</script>
|
||||
@@ -33,6 +36,9 @@
|
||||
on groups you've already joined. Click below to get started!
|
||||
</p>
|
||||
</ModalBody>
|
||||
{#if step && totalSteps}
|
||||
<ProgressBar current={step} total={totalSteps} />
|
||||
{/if}
|
||||
<ModalFooter>
|
||||
<Button class="btn btn-link" onclick={back}>
|
||||
<Icon icon={AltArrowLeft} />
|
||||
|
||||
@@ -18,14 +18,17 @@
|
||||
import ModalSubtitle from "@lib/components/ModalSubtitle.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import SignUpEmailConfirm from "@app/components/SignUpEmailConfirm.svelte"
|
||||
import ProgressBar from "@app/components/ProgressBar.svelte"
|
||||
import {pushToast, popToast} from "@app/util/toast"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
|
||||
type Props = {
|
||||
next: () => void
|
||||
step?: number
|
||||
totalSteps?: number
|
||||
}
|
||||
|
||||
const {next}: Props = $props()
|
||||
const {next, step, totalSteps}: Props = $props()
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
@@ -81,7 +84,7 @@
|
||||
setKey("signup.clientOptions", clientOptions)
|
||||
|
||||
popToast(toastId)
|
||||
pushModal(SignUpEmailConfirm, {next})
|
||||
pushModal(SignUpEmailConfirm, {next, step, totalSteps})
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
|
||||
@@ -120,7 +123,7 @@
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon={Letter} />
|
||||
<input bind:value={email} />
|
||||
<input type="email" bind:value={email} />
|
||||
</label>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
@@ -134,8 +137,14 @@
|
||||
<input type="password" bind:value={password} />
|
||||
</label>
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
Must be at least 12 characters long.
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
</ModalBody>
|
||||
{#if step && totalSteps}
|
||||
<ProgressBar current={step} total={totalSteps} />
|
||||
{/if}
|
||||
<ModalFooter>
|
||||
<Button class="btn btn-link" onclick={back}>
|
||||
<Icon icon={AltArrowLeft} />
|
||||
|
||||
@@ -15,12 +15,15 @@
|
||||
import ModalTitle from "@lib/components/ModalTitle.svelte"
|
||||
import ModalSubtitle from "@lib/components/ModalSubtitle.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import ProgressBar from "@app/components/ProgressBar.svelte"
|
||||
|
||||
type Props = {
|
||||
next: () => void
|
||||
step?: number
|
||||
totalSteps?: number
|
||||
}
|
||||
|
||||
const {next}: Props = $props()
|
||||
const {next, step, totalSteps}: Props = $props()
|
||||
|
||||
const email = getKey<string>("signup.email")
|
||||
|
||||
@@ -61,6 +64,9 @@
|
||||
above.
|
||||
</p>
|
||||
</ModalBody>
|
||||
{#if step && totalSteps}
|
||||
<ProgressBar current={step} total={totalSteps} />
|
||||
{/if}
|
||||
<ModalFooter>
|
||||
<Button class="btn btn-link" onclick={back} disabled={loading}>
|
||||
<Icon icon={AltArrowLeft} />
|
||||
|
||||
@@ -4,11 +4,13 @@
|
||||
|
||||
type Props = {
|
||||
next: () => void
|
||||
step?: number
|
||||
totalSteps?: number
|
||||
}
|
||||
|
||||
const {next}: Props = $props()
|
||||
const {next, step, totalSteps}: Props = $props()
|
||||
|
||||
const secret = getKey<string>("signup.secret")!
|
||||
</script>
|
||||
|
||||
<KeyDownload {secret} {next} />
|
||||
<KeyDownload {secret} {next} {step} {totalSteps} />
|
||||
|
||||
@@ -5,15 +5,16 @@
|
||||
import {getKey, setKey} from "@lib/implicit"
|
||||
import Icon from "@lib/components/Icon.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 ProgressBar from "@app/components/ProgressBar.svelte"
|
||||
|
||||
type Props = {
|
||||
next: () => void
|
||||
step?: number
|
||||
totalSteps?: number
|
||||
}
|
||||
|
||||
const {next}: Props = $props()
|
||||
const {next, step, totalSteps}: Props = $props()
|
||||
|
||||
const profile = getKey<Profile>("signup.profile")!
|
||||
|
||||
@@ -27,19 +28,20 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<Modal>
|
||||
<ModalBody>
|
||||
<ProfileEditForm isSignup {initialValues} {onsubmit}>
|
||||
{#snippet footer()}
|
||||
<Button class="btn btn-link" onclick={back}>
|
||||
<Icon icon={AltArrowLeft} />
|
||||
Go back
|
||||
</Button>
|
||||
<Button class="btn btn-primary" type="submit">
|
||||
Create Account
|
||||
<Icon icon={AltArrowRight} />
|
||||
</Button>
|
||||
{/snippet}
|
||||
</ProfileEditForm>
|
||||
</ModalBody>
|
||||
</Modal>
|
||||
<ProfileEditForm isSignup {initialValues} {onsubmit}>
|
||||
{#snippet footer()}
|
||||
<Button class="btn btn-link" onclick={back}>
|
||||
<Icon icon={AltArrowLeft} />
|
||||
Go back
|
||||
</Button>
|
||||
<Button class="btn btn-primary" type="submit">
|
||||
Create Account
|
||||
<Icon icon={AltArrowRight} />
|
||||
</Button>
|
||||
{/snippet}
|
||||
{#snippet progressBar()}
|
||||
{#if step && totalSteps}
|
||||
<ProgressBar current={step} total={totalSteps} />
|
||||
{/if}
|
||||
{/snippet}
|
||||
</ProfileEditForm>
|
||||
|
||||
@@ -25,6 +25,16 @@
|
||||
const {url} = $props()
|
||||
|
||||
const authError = deriveRelayAuthError(url)
|
||||
let networkError = $state(false)
|
||||
const isExplicitAuthError = $derived(
|
||||
$authError &&
|
||||
!(
|
||||
$authError.toLowerCase().includes("failed") ||
|
||||
$authError.toLowerCase().includes("timeout") ||
|
||||
$authError.toLowerCase().includes("network")
|
||||
),
|
||||
)
|
||||
const isGenericError = $derived(networkError || ($authError && !isExplicitAuthError))
|
||||
|
||||
const back = () => history.back()
|
||||
const copyInvite = () => clip(invite)
|
||||
@@ -70,8 +80,14 @@
|
||||
])
|
||||
|
||||
claim = getTagValue("claim", event?.tags || []) || ""
|
||||
} catch {
|
||||
} catch (err) {
|
||||
claim = ""
|
||||
if (
|
||||
(err instanceof Error && (err.name === "AbortError" || err.name === "TimeoutError")) ||
|
||||
!navigator.onLine
|
||||
) {
|
||||
networkError = true
|
||||
}
|
||||
} finally {
|
||||
loading = false
|
||||
}
|
||||
@@ -92,7 +108,11 @@
|
||||
<p class="center">
|
||||
<Spinner {loading}>Requesting an invite link...</Spinner>
|
||||
</p>
|
||||
{:else if $authError}
|
||||
{:else if isGenericError}
|
||||
<p class="center text-center">
|
||||
Unable to reach the relay. Please check your connection and try again.
|
||||
</p>
|
||||
{:else if isExplicitAuthError}
|
||||
<p class="center">Oops! It looks like you're not a member of this relay.</p>
|
||||
{:else}
|
||||
<div class="flex flex-col items-center gap-6">
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
{#if Array.isArray(supported_nips)}
|
||||
<p class="badge badge-neutral">
|
||||
<p class="badge badge-neutral text-wrap h-auto">
|
||||
<span class="ellipsize">Supported NIPs: {supported_nips.join(", ")}</span>
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
import {tick} from "svelte"
|
||||
import {debounce} from "throttle-debounce"
|
||||
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 {sortEventsDesc} from "@welshman/util"
|
||||
import {MESSAGE, sortEventsDesc} from "@welshman/util"
|
||||
import CloseCircle from "@assets/icons/close-circle.svg?dataurl"
|
||||
import Magnifier from "@assets/icons/magnifier.svg?dataurl"
|
||||
import {fly} from "@lib/transition"
|
||||
@@ -53,8 +54,11 @@
|
||||
|
||||
const getFilter = (searchTerm: string): Filter =>
|
||||
h
|
||||
? {kinds: CONTENT_KINDS, "#h": [h], search: searchTerm}
|
||||
: {kinds: CONTENT_KINDS, search: searchTerm}
|
||||
? {kinds: [MESSAGE, ...CONTENT_KINDS], "#h": [h], 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) => {
|
||||
controller?.abort()
|
||||
@@ -68,18 +72,23 @@
|
||||
controller = new AbortController()
|
||||
loading = true
|
||||
|
||||
const filter = getFilter(searchTerm.trim())
|
||||
const localResults = getLocalResults(filter)
|
||||
|
||||
results = sortEventsDesc(localResults)
|
||||
|
||||
try {
|
||||
const events = await request({
|
||||
relays: getRelayUrls(),
|
||||
autoClose: true,
|
||||
signal: controller.signal,
|
||||
filters: [getFilter(searchTerm.trim())],
|
||||
filters: [filter],
|
||||
})
|
||||
|
||||
results = sortEventsDesc(events)
|
||||
results = sortEventsDesc(uniqBy((e: TrustedEvent) => e.id, [...events, ...localResults]))
|
||||
} catch (error) {
|
||||
if (!(error instanceof DOMException && error.name === "AbortError")) {
|
||||
results = []
|
||||
results = sortEventsDesc(localResults)
|
||||
}
|
||||
} finally {
|
||||
loading = false
|
||||
|
||||
@@ -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
|
||||
@@ -31,6 +31,7 @@
|
||||
<svelte:document onmousemove={onMouseMove} />
|
||||
|
||||
<Tippy
|
||||
class="flex"
|
||||
bind:popover
|
||||
component={EmojiPicker}
|
||||
props={{onClick}}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
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 {onMount} from "svelte"
|
||||
|
||||
@@ -26,4 +27,4 @@
|
||||
})
|
||||
</script>
|
||||
|
||||
<emoji-picker bind:this={element} class="m-auto"></emoji-picker>
|
||||
<emoji-picker bind:this={element} data-source={emojiDataUrl} class="m-auto"></emoji-picker>
|
||||
|
||||
@@ -9,16 +9,22 @@
|
||||
const {...props}: Props = $props()
|
||||
</script>
|
||||
|
||||
<div class="grid grid-cols-1 gap-2 lg:gap-6 lg:grid-cols-3 {props.class}">
|
||||
<label class="flex items-center gap-2 font-bold">
|
||||
{@render props.label?.()}
|
||||
</label>
|
||||
<div class="col-span-2 flex items-center gap-2">
|
||||
{@render props.input?.()}
|
||||
</div>
|
||||
<p class="flex-end text-sm opacity-50 lg:col-span-3">
|
||||
{#if props.info}
|
||||
{@render props.info?.()}
|
||||
<div class="flex flex-col gap-2 {props.class}">
|
||||
<div class="flex items-center justify-between w-full gap-2">
|
||||
{#if props.label}
|
||||
<label class="flex items-center gap-2 min-w-[30%] max-w-[80%] md:max-w-none">
|
||||
{@render props.label()}
|
||||
</label>
|
||||
{/if}
|
||||
</p>
|
||||
<div class="flex items-center gap-2 justify-end grow">
|
||||
{#if props.input}
|
||||
{@render props.input()}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{#if props.info}
|
||||
<p class="text-sm opacity-50">
|
||||
{@render props.info()}
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,12 @@
|
||||
placeholder?: string
|
||||
}
|
||||
|
||||
let {value = $bindable(), addLabel, placeholder = "Enter text..."}: Props = $props()
|
||||
let {
|
||||
value = $bindable(),
|
||||
addLabel,
|
||||
placeholder = "Enter text...",
|
||||
allowAdd = true,
|
||||
}: Props & {allowAdd?: boolean} = $props()
|
||||
let draggedIndex: number | null = $state(null)
|
||||
|
||||
const onChange = (newValue: string[]) => {
|
||||
@@ -72,12 +77,14 @@
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
<Button onclick={addItem} class="btn btn-link w-fit px-0">
|
||||
<Icon icon={AddCircle} size={5} />
|
||||
{#if addLabel}
|
||||
{@render addLabel?.()}
|
||||
{:else}
|
||||
Add Item
|
||||
{/if}
|
||||
</Button>
|
||||
{#if allowAdd}
|
||||
<Button onclick={addItem} class="btn btn-link w-fit px-0">
|
||||
<Icon icon={AddCircle} size={5} />
|
||||
{#if addLabel}
|
||||
{@render addLabel?.()}
|
||||
{:else}
|
||||
Add Item
|
||||
{/if}
|
||||
</Button>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
const className = $derived(
|
||||
cx(
|
||||
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>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
import {Badge} from "@capawesome/capacitor-badge"
|
||||
import Bell from "@assets/icons/bell.svg?dataurl"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import FieldInline from "@lib/components/FieldInline.svelte"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
@@ -63,40 +64,64 @@
|
||||
<!-- pass -->
|
||||
{:then { isSupported }}
|
||||
{#if isSupported}
|
||||
<div class="flex justify-between">
|
||||
<p>Show badge for unread alerts</p>
|
||||
<input type="checkbox" class="toggle toggle-primary" bind:checked={settings.badge} />
|
||||
</div>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Show badge for unread alerts</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<input type="checkbox" class="toggle toggle-primary" bind:checked={settings.badge} />
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
{/if}
|
||||
{/await}
|
||||
{#if !Capacitor.isNativePlatform()}
|
||||
<div class="flex justify-between">
|
||||
<p>Play sound for new activity</p>
|
||||
<input type="checkbox" class="toggle toggle-primary" bind:checked={settings.sound} />
|
||||
</div>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Play sound for new activity</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<input type="checkbox" class="toggle toggle-primary" bind:checked={settings.sound} />
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
{/if}
|
||||
<div class="flex justify-between">
|
||||
<p>Enable push notifications</p>
|
||||
<input type="checkbox" class="toggle toggle-primary" bind:checked={settings.push} />
|
||||
</div>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Enable push notifications</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<input type="checkbox" class="toggle toggle-primary" bind:checked={settings.push} />
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
</div>
|
||||
<div
|
||||
class={cx("card2 bg-alt col-4 shadow-md", {
|
||||
"pointer-events-none opacity-50": !settings.badge && !settings.sound && !settings.push,
|
||||
})}>
|
||||
<strong class="text-lg">Alert Types</strong>
|
||||
<div class="flex justify-between">
|
||||
<p>Notify me about new activity</p>
|
||||
<input type="checkbox" class="toggle toggle-primary" bind:checked={settings.spaces} />
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<p>Always notify me when mentioned</p>
|
||||
<input type="checkbox" class="toggle toggle-primary" checked={settings.mentions} />
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<p>Notify me about new messages</p>
|
||||
<input type="checkbox" class="toggle toggle-primary" bind:checked={settings.messages} />
|
||||
</div>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Notify me about new activity</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<input type="checkbox" class="toggle toggle-primary" bind:checked={settings.spaces} />
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Always notify me when mentioned</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<input type="checkbox" class="toggle toggle-primary" checked={settings.mentions} />
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Notify me about new messages</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<input type="checkbox" class="toggle toggle-primary" bind:checked={settings.messages} />
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
</div>
|
||||
<div
|
||||
class="card2 bg-alt sticky -bottom-3 shadow-md flex flex-row items-center justify-between gap-4">
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
import {Router} from "@welshman/router"
|
||||
import {userMuteList, tagPubkey, publishThunk, userBlossomServerList} from "@welshman/app"
|
||||
import NotesMinimalistic from "@assets/icons/notes-minimalistic.svg?dataurl"
|
||||
import AddCircle from "@assets/icons/add-circle.svg?dataurl"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import Field from "@lib/components/Field.svelte"
|
||||
import FieldInline from "@lib/components/FieldInline.svelte"
|
||||
@@ -28,6 +29,10 @@
|
||||
blossomServers = getTagValues("server", getListTags($userBlossomServerList))
|
||||
}
|
||||
|
||||
const addServer = () => {
|
||||
blossomServers = [...blossomServers, ""]
|
||||
}
|
||||
|
||||
const onsubmit = preventDefault(async () => {
|
||||
await publishSettings($state.snapshot(settings))
|
||||
|
||||
@@ -104,7 +109,7 @@
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<input
|
||||
class="range range-primary"
|
||||
class="range range-primary w-full"
|
||||
type="range"
|
||||
min="0.8"
|
||||
max="1.3"
|
||||
@@ -115,13 +120,13 @@
|
||||
</div>
|
||||
<div class="card2 bg-alt col-4 shadow-md">
|
||||
<strong class="text-lg">Editor Settings</strong>
|
||||
<FieldInline>
|
||||
<Field>
|
||||
{#snippet label()}
|
||||
<p>Send Delay</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<input
|
||||
class="range range-primary"
|
||||
class="range range-primary w-full"
|
||||
type="range"
|
||||
min="0"
|
||||
max="10000"
|
||||
@@ -134,17 +139,19 @@
|
||||
{settings.send_delay === 1000 ? "second" : "seconds"}.
|
||||
</p>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
</Field>
|
||||
<Field>
|
||||
{#snippet label()}
|
||||
<p>Media Server</p>
|
||||
{/snippet}
|
||||
{#snippet secondary()}
|
||||
<Button class="link text-sm underline flex items-center gap-1" onclick={addServer}>
|
||||
<Icon icon={AddCircle} size={4} />
|
||||
Add Server
|
||||
</Button>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<InputList bind:value={blossomServers}>
|
||||
{#snippet addLabel()}
|
||||
Add Server
|
||||
{/snippet}
|
||||
</InputList>
|
||||
<InputList allowAdd={false} bind:value={blossomServers} />
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
<p>Choose a media server type and url for files you upload to {PLATFORM_NAME}.</p>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import ShieldMinimalistic from "@assets/icons/shield-minimalistic.svg?dataurl"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import FieldInline from "@lib/components/FieldInline.svelte"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
@@ -11,8 +12,10 @@
|
||||
settings = {...$userSettingsValues}
|
||||
}
|
||||
|
||||
const onAuthModeChange = (e: any) => {
|
||||
settings.auth_mode = e.target.checked ? RelayAuthMode.Aggressive : RelayAuthMode.Conservative
|
||||
const onAuthModeChange = (e: Event) => {
|
||||
const target = e.currentTarget as HTMLInputElement
|
||||
|
||||
settings.relay_auth = target.checked ? RelayAuthMode.Aggressive : RelayAuthMode.Conservative
|
||||
}
|
||||
|
||||
const onsubmit = preventDefault(async () => {
|
||||
@@ -30,31 +33,46 @@
|
||||
<Icon icon={ShieldMinimalistic} />
|
||||
Privacy Settings
|
||||
</strong>
|
||||
<div class="grid grid-cols-2 gap-2">
|
||||
<p>Authenticate with unknown relays?</p>
|
||||
<input
|
||||
type="checkbox"
|
||||
class="toggle toggle-primary"
|
||||
onchange={onAuthModeChange}
|
||||
checked={settings.auth_mode === RelayAuthMode.Aggressive} />
|
||||
<p class="col-span-2 text-sm opacity-70">
|
||||
Controls whether {PLATFORM_NAME} will identify you to relays not in your lists.
|
||||
</p>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 gap-2">
|
||||
<p>Report errors?</p>
|
||||
<input type="checkbox" class="toggle toggle-primary" bind:checked={settings.report_errors} />
|
||||
<p class="col-span-2 text-sm opacity-70">
|
||||
Allow {PLATFORM_NAME} to send error reports to help improve the app.
|
||||
</p>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 gap-2">
|
||||
<p>Report usage?</p>
|
||||
<input type="checkbox" class="toggle toggle-primary" bind:checked={settings.report_usage} />
|
||||
<p class="col-span-2 text-sm opacity-70">
|
||||
Allow {PLATFORM_NAME} to collect anonymous usage data.
|
||||
</p>
|
||||
</div>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Authenticate with unknown relays?</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<input
|
||||
type="checkbox"
|
||||
class="toggle toggle-primary"
|
||||
onchange={onAuthModeChange}
|
||||
checked={settings.relay_auth === RelayAuthMode.Aggressive} />
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
<p>Controls whether {PLATFORM_NAME} will identify you to relays not in your lists.</p>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Report errors?</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<input
|
||||
type="checkbox"
|
||||
class="toggle toggle-primary"
|
||||
bind:checked={settings.report_errors} />
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
<p>Allow {PLATFORM_NAME} to send error reports to help improve the app.</p>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Report usage?</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<input type="checkbox" class="toggle toggle-primary" bind:checked={settings.report_usage} />
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
<p>Allow {PLATFORM_NAME} to collect anonymous usage data.</p>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
</div>
|
||||
<div
|
||||
class="card2 bg-alt sticky -bottom-3 shadow-md flex flex-row items-center justify-between gap-4">
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
import PasswordReset from "@app/components/PasswordReset.svelte"
|
||||
import InfoKeys from "@app/components/InfoKeys.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {POMADE_NETWORK_ERROR_MESSAGE} from "@app/util/pomadeErrors"
|
||||
import {clip, pushToast} from "@app/util/toast"
|
||||
|
||||
const npub = nip19.npubEncode($pubkey!)
|
||||
@@ -48,13 +49,24 @@
|
||||
const {ok, peersByPrefix} = await Client.requestChallenge($session!.email)
|
||||
|
||||
if (!ok) {
|
||||
console.error("Pomade challenge request failed during password reset initiation")
|
||||
|
||||
pushToast({
|
||||
theme: "error",
|
||||
message: "Failed to initiate password reset!",
|
||||
message: POMADE_NETWORK_ERROR_MESSAGE,
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
pushModal(PasswordReset, {peersByPrefix})
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
|
||||
pushToast({
|
||||
theme: "error",
|
||||
message: POMADE_NETWORK_ERROR_MESSAGE,
|
||||
})
|
||||
} finally {
|
||||
loading = false
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import {page} from "$app/stores"
|
||||
import {goto} from "$app/navigation"
|
||||
import type {Readable} from "svelte/store"
|
||||
import {debounce} from "throttle-debounce"
|
||||
import {pubkey, publishThunk, waitForThunkError, joinRoom, leaveRoom} from "@welshman/app"
|
||||
import {now, ifLet, int, formatTimestampAsDate, ago, MINUTE} from "@welshman/lib"
|
||||
import type {MakeNonOptional} from "@welshman/lib"
|
||||
@@ -244,6 +245,8 @@
|
||||
const onScroll = () => {
|
||||
if (!isProgrammaticScroll) {
|
||||
userHasScrolled = true
|
||||
isUserScrolling = true
|
||||
clearIsUserScrolling()
|
||||
manageScrollPosition()
|
||||
}
|
||||
|
||||
@@ -265,6 +268,7 @@
|
||||
let leaving = $state(false)
|
||||
let userHasScrolled = $state(false)
|
||||
let isProgrammaticScroll = $state(false)
|
||||
let isUserScrolling = $state(false)
|
||||
let loadingBackward = $state(true)
|
||||
let loadingForward = $state(true)
|
||||
let share = $state(popKey<TrustedEvent | undefined>("share"))
|
||||
@@ -278,6 +282,10 @@
|
||||
let compose: RoomCompose | undefined = $state()
|
||||
let eventToEdit: TrustedEvent | undefined = $state()
|
||||
|
||||
const clearIsUserScrolling = debounce(150, () => {
|
||||
isUserScrolling = false
|
||||
})
|
||||
|
||||
const elements = $derived.by(() => {
|
||||
const elements = []
|
||||
const seen = new Set()
|
||||
@@ -351,7 +359,7 @@
|
||||
})
|
||||
|
||||
$effect(() => {
|
||||
if (elements.length > 0) {
|
||||
if (elements.length > 0 && !isUserScrolling) {
|
||||
requestAnimationFrame(manageScrollPosition)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import {goto} from "$app/navigation"
|
||||
import type {Readable} from "svelte/store"
|
||||
import {readable} from "svelte/store"
|
||||
import {debounce} from "throttle-debounce"
|
||||
import {now, int, ifLet, formatTimestampAsDate, MINUTE, ago} from "@welshman/lib"
|
||||
import type {TrustedEvent, EventContent} from "@welshman/util"
|
||||
import {makeEvent, MESSAGE, RELAY_ADD_MEMBER} from "@welshman/util"
|
||||
@@ -139,6 +140,8 @@
|
||||
const onScroll = () => {
|
||||
if (!isProgrammaticScroll) {
|
||||
userHasScrolled = true
|
||||
isUserScrolling = true
|
||||
clearIsUserScrolling()
|
||||
manageScrollPosition()
|
||||
}
|
||||
|
||||
@@ -160,6 +163,7 @@
|
||||
let loadingForward = $state(true)
|
||||
let userHasScrolled = $state(false)
|
||||
let isProgrammaticScroll = $state(false)
|
||||
let isUserScrolling = $state(false)
|
||||
let share = $state(popKey<TrustedEvent | undefined>("share"))
|
||||
let parent: TrustedEvent | undefined = $state()
|
||||
let element: HTMLElement | undefined = $state()
|
||||
@@ -171,6 +175,10 @@
|
||||
let compose: RoomCompose | undefined = $state()
|
||||
let eventToEdit: TrustedEvent | undefined = $state()
|
||||
|
||||
const clearIsUserScrolling = debounce(150, () => {
|
||||
isUserScrolling = false
|
||||
})
|
||||
|
||||
const elements = $derived.by(() => {
|
||||
const elements = []
|
||||
const seen = new Set()
|
||||
@@ -244,7 +252,7 @@
|
||||
})
|
||||
|
||||
$effect(() => {
|
||||
if (elements.length > 0) {
|
||||
if (elements.length > 0 && !isUserScrolling) {
|
||||
requestAnimationFrame(manageScrollPosition)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<script lang="ts">
|
||||
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 Link from "@lib/components/Link.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">
|
||||
<PageHeader>
|
||||
{#snippet title()}
|
||||
<div>Create your own Space</div>
|
||||
<div>Choose your Hosting Plan</div>
|
||||
{/snippet}
|
||||
{#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}
|
||||
</PageHeader>
|
||||
<div class="grid w-full max-w-lg grid-cols-1 gap-2 lg:max-w-4xl lg:grid-cols-2">
|
||||
<div class="card2 bg-alt flex flex-col gap-4">
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center gap-3">
|
||||
<Icon icon={Server} />
|
||||
<h3 class="text-lg font-bold">Self-Host your Space</h3>
|
||||
<div class="flex w-full max-w-lg flex-col gap-4 lg:max-w-4xl">
|
||||
<div class="grid grid-cols-1 gap-2 lg:grid-cols-2">
|
||||
<div class="card2 bg-alt flex flex-col gap-5">
|
||||
<div class="flex flex-col gap-3">
|
||||
<div class="bg-primary/20 flex h-10 w-10 items-center justify-center rounded-md">
|
||||
<Icon icon={CloudCheck} class="text-primary" />
|
||||
</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>
|
||||
<ul class="flex list-inside list-disc flex-col gap-1 text-sm opacity-70">
|
||||
<li>Unlimited customization and control</li>
|
||||
<li>Free and open source software</li>
|
||||
<li>Full-featured admin dashboards available</li>
|
||||
<li>Requires some technical skills</li>
|
||||
<ul class="flex flex-col gap-2 text-sm">
|
||||
<li class="flex items-center gap-2">
|
||||
<Icon icon={CheckCircle} class="opacity-60" />
|
||||
Open source core
|
||||
</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>
|
||||
<Link
|
||||
external
|
||||
class="btn btn-neutral mt-auto"
|
||||
href="https://gitea.coracle.social/coracle/zooid">
|
||||
Get started
|
||||
<Icon icon={ArrowRight} />
|
||||
</Link>
|
||||
</div>
|
||||
<Link external class="btn btn-primary" href="https://github.com/coracle-social/zooid">
|
||||
Get Started
|
||||
<Icon icon={ArrowRight} />
|
||||
</Link>
|
||||
</div>
|
||||
<div class="card2 bg-alt flex flex-col gap-4">
|
||||
<div class="flex flex-col gap-4">
|
||||
<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" />
|
||||
<div class="card2 bg-alt border-primary flex flex-col gap-5 border">
|
||||
<div class="flex flex-col gap-3">
|
||||
<div class="flex items-start justify-between">
|
||||
<img alt="Coracle Logo" src="/coracle.png" class="h-10 w-10" />
|
||||
<div class="badge badge-primary">Recommended</div>
|
||||
</div>
|
||||
<div class="flex flex-col gap-1">
|
||||
<h3 class="text-lg font-bold">Coracle Hosting</h3>
|
||||
<div class="text-xs font-semibold tracking-wider opacity-60">FULLY MANAGED</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>
|
||||
<ul class="flex list-inside list-disc flex-col gap-1 text-sm opacity-70">
|
||||
<li>Simple setup, support included</li>
|
||||
<li>Free and open source software — no vendor lock-in</li>
|
||||
<li>Advanced access controls and relay policies</li>
|
||||
<li>Full-featured admin dashboard</li>
|
||||
<ul class="flex flex-col gap-2 text-sm">
|
||||
<li class="flex items-center gap-2">
|
||||
<Icon icon={CheckCircle} class="text-primary" />
|
||||
One-click deployment
|
||||
</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>
|
||||
<Link external class="btn btn-primary mt-auto" href="https://hosting.coracle.social">
|
||||
Start for free
|
||||
<Icon icon={ArrowRight} />
|
||||
</Link>
|
||||
</div>
|
||||
<Link external class="btn btn-neutral" href="https://hosting.coracle.social">
|
||||
Get Started
|
||||
<Icon icon={ArrowRight} />
|
||||
</Link>
|
||||
</div>
|
||||
<div class="card2 bg-alt flex flex-col gap-4">
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="self-start">
|
||||
<img
|
||||
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
|
||||
<div class="flex flex-col items-center justify-center gap-2 py-2 text-sm opacity-70">
|
||||
<span>Want to host on other servers?</span>
|
||||
<Link external class="link center gap-1" href="https://relay.tools/signup">
|
||||
Other hosting options
|
||||
<Icon icon={ArrowRight} />
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user