Parameterize app name

This commit is contained in:
Jon Staab
2024-10-22 11:04:40 -07:00
parent f2570c3766
commit 249f660d40
18 changed files with 51 additions and 32 deletions
+2 -1
View File
@@ -2,6 +2,7 @@
import Button from "@lib/components/Button.svelte"
import Link from "@lib/components/Link.svelte"
import ModalHeader from "@lib/components/ModalHeader.svelte"
import {PLATFORM_NAME} from "@app/state"
</script>
<div class="column gap-4">
@@ -9,7 +10,7 @@
<div slot="title">What is a nostr address?</div>
</ModalHeader>
<p>
Flotilla hosts spaces on the <Link external href="https://nostr.com/" class="underline"
{PLATFORM_NAME} hosts spaces on the <Link external href="https://nostr.com/" class="underline"
>Nostr protocol</Link
>. Nostr uses "nostr addresses" to make it easier for people to find you, without having to
memorize your public key (your user id).
+3 -2
View File
@@ -2,6 +2,7 @@
import Link from "@lib/components/Link.svelte"
import Button from "@lib/components/Button.svelte"
import ModalHeader from "@lib/components/ModalHeader.svelte"
import {PLATFORM_NAME} from "@app/state"
</script>
<div class="column gap-4">
@@ -22,8 +23,8 @@
</p>
<p>
It's very important to keep private keys safe, but this can sometimes be confusing for
newcomers. This is why flotilla supports <strong>remote signer</strong> login. These services can
store your keys securely for you, giving you access using a username and password.
newcomers. This is why {PLATFORM_NAME} supports <strong>remote signer</strong> login. These services
can store your keys securely for you, giving you access using a username and password.
</p>
<Button class="btn btn-primary" on:click={() => history.back()}>Got it</Button>
</div>
+3 -2
View File
@@ -2,6 +2,7 @@
import Link from "@lib/components/Link.svelte"
import Button from "@lib/components/Button.svelte"
import ModalHeader from "@lib/components/ModalHeader.svelte"
import {PLATFORM_NAME} from "@app/state"
</script>
<div class="column gap-4">
@@ -15,8 +16,8 @@
</p>
<p>
This can be a little confusing when you're just getting started, but as long as you're using
Flotilla, it will work just like a normal app. When you're ready to start exploring nostr, visit
your settings page to learn more.
{PLATFORM_NAME}, it will work just like a normal app. When you're ready to start exploring
nostr, visit your settings page to learn more.
</p>
<Button class="btn btn-primary" on:click={() => history.back()}>Got it</Button>
</div>
+2 -1
View File
@@ -2,6 +2,7 @@
import Button from "@lib/components/Button.svelte"
import Link from "@lib/components/Link.svelte"
import ModalHeader from "@lib/components/ModalHeader.svelte"
import {PLATFORM_NAME} from "@app/state"
</script>
<div class="column gap-4">
@@ -9,7 +10,7 @@
<div slot="title">What is a relay?</div>
</ModalHeader>
<p>
Flotilla hosts spaces on the <Link external href="https://nostr.com/" class="underline"
{PLATFORM_NAME} hosts spaces on the <Link external href="https://nostr.com/" class="underline"
>Nostr protocol</Link
>. Nostr uses "relays" to host data, which are special-purpose servers that speak nostr's
language. This means that anyone can host their own data, making the web more decentralized and
+2 -1
View File
@@ -5,6 +5,7 @@
import CardButton from "@lib/components/CardButton.svelte"
import LogIn from "@app/components/LogIn.svelte"
import SignUp from "@app/components/SignUp.svelte"
import {PLATFORM_NAME} from "@app/state"
import {pushModal} from "@app/modal"
const logIn = () => pushModal(LogIn)
@@ -15,7 +16,7 @@
<Dialog>
<div class="column gap-4">
<div class="py-2">
<h1 class="heading">Welcome to Flotilla!</h1>
<h1 class="heading">Welcome to {PLATFORM_NAME}!</h1>
<p class="text-center">The chat app built for sovereign communities.</p>
</div>
<Button on:click={logIn}>
+2 -1
View File
@@ -12,6 +12,7 @@
import LogInInfoRemoteSigner from "@app/components/LogInInfoRemoteSigner.svelte"
import LogInKey from "@app/components/LogInKey.svelte"
import {pushModal, clearModals} from "@app/modal"
import {PLATFORM_NAME} from "@app/state"
import {pushToast} from "@app/toast"
import {loadUserData} from "@app/commands"
@@ -116,7 +117,7 @@
<form class="column gap-4" on:submit|preventDefault={loginWithNip46}>
<h1 class="heading">Log in with Nostr</h1>
<p class="m-auto max-w-sm text-center">
Flotilla is built using the
{PLATFORM_NAME} is built using the
<Button class="link" on:click={() => pushModal(InfoNostr)}>nostr protocol</Button>, which allows
you to own your social identity.
</p>
+4 -3
View File
@@ -4,6 +4,7 @@
import Button from "@lib/components/Button.svelte"
import CardButton from "@lib/components/CardButton.svelte"
import LogOut from "@app/components/LogOut.svelte"
import {PLATFORM_NAME} from "@app/state"
import {pushModal} from "@app/modal"
const logout = () => pushModal(LogOut)
@@ -14,21 +15,21 @@
<CardButton>
<div slot="icon"><Icon icon="server" size={7} /></div>
<div slot="title">Relays</div>
<div slot="info">Control how Flotilla talks to the network</div>
<div slot="info">Control how {PLATFORM_NAME} talks to the network</div>
</CardButton>
</Link>
<Link href="/settings">
<CardButton>
<div slot="icon"><Icon icon="settings" size={7} /></div>
<div slot="title">Settings</div>
<div slot="info">Get into the details about how Flotilla works</div>
<div slot="info">Get into the details about how {PLATFORM_NAME} works</div>
</CardButton>
</Link>
<Link href="/settings/about">
<CardButton>
<div slot="icon"><Icon icon="code-2" size={7} /></div>
<div slot="title">About</div>
<div slot="info">Learn about Flotilla and support the developer</div>
<div slot="info">Learn about {PLATFORM_NAME} and support the developer</div>
</CardButton>
</Link>
<Button on:click={logout} class="btn btn-error">
+2 -1
View File
@@ -21,6 +21,7 @@
memberships,
roomsByUrl,
GENERAL,
PLATFORM_RELAY,
} from "@app/state"
import {checkRelayConnection, checkRelayAuth} from "@app/commands"
import {pushModal} from "@app/modal"
@@ -97,7 +98,7 @@
Create Invite
</Button>
</li>
{#if !import.meta.env.VITE_PLATFORM_RELAY}
{#if !PLATFORM_RELAY}
<li>
{#if getMembershipUrls($userMembership).includes(url)}
<Button on:click={leaveSpace} class="text-error">
+6 -6
View File
@@ -8,7 +8,7 @@
import SpaceAvatar from "@app/components/SpaceAvatar.svelte"
import MenuSpaces from "@app/components/MenuSpaces.svelte"
import MenuSettings from "@app/components/MenuSettings.svelte"
import {userMembership, getMembershipUrls} from "@app/state"
import {userMembership, getMembershipUrls, PLATFORM_RELAY, PLATFORM_LOGO} from "@app/state"
import {pushModal} from "@app/modal"
import {makeSpacePath} from "@app/routes"
@@ -23,15 +23,15 @@
<div class="flex h-full flex-col justify-between">
<div>
<PrimaryNavItem title="Home" href="/home" class="tooltip-right">
<Avatar src={import.meta.env.VITE_PLATFORM_LOGO} class="!h-10 !w-10" />
<Avatar src={PLATFORM_LOGO} class="!h-10 !w-10" />
</PrimaryNavItem>
<Divider />
{#if import.meta.env.VITE_PLATFORM_RELAY}
{#if PLATFORM_RELAY}
<PrimaryNavItem
title={displayRelayUrl(import.meta.env.VITE_PLATFORM_RELAY)}
href={makeSpacePath(import.meta.env.VITE_PLATFORM_RELAY)}
title={displayRelayUrl(PLATFORM_RELAY)}
href={makeSpacePath(PLATFORM_RELAY)}
class="tooltip-right">
<SpaceAvatar url={import.meta.env.VITE_PLATFORM_RELAY} />
<SpaceAvatar url={PLATFORM_RELAY} />
</PrimaryNavItem>
{:else}
{#each getMembershipUrls($userMembership) as url (url)}
+2 -1
View File
@@ -10,6 +10,7 @@
import InfoNostr from "@app/components/InfoNostr.svelte"
import SignUpKey from "@app/components/SignUpKey.svelte"
import {pushModal, clearModals} from "@app/modal"
import {PLATFORM_NAME} from "@app/state"
import {pushToast} from "@app/toast"
const login = () => pushModal(LogIn)
@@ -74,7 +75,7 @@
<form class="column gap-4" on:submit|preventDefault={signup}>
<h1 class="heading">Sign up with Nostr</h1>
<p class="m-auto max-w-sm text-center">
Flotilla is built using the
{PLATFORM_NAME} is built using the
<Button class="link" on:click={() => pushModal(InfoNostr)}>nostr protocol</Button>, which allows
you to own your social identity.
</p>
@@ -5,6 +5,7 @@
import ModalHeader from "@lib/components/ModalHeader.svelte"
import ModalFooter from "@lib/components/ModalFooter.svelte"
import SpaceInviteAccept from "@app/components/SpaceInviteAccept.svelte"
import {PLATFORM_NAME} from "@app/state"
import {pushModal} from "@app/modal"
const back = () => history.back()
@@ -23,11 +24,11 @@
</ModalHeader>
<p>
<Link class="text-primary" external href="https://relay.tools">relay.tools</Link> is a third-party
service that allows anyone to run their own relay for use with Flotilla, or any other nostr-compatible
app.
service that allows anyone to run their own relay for use with {PLATFORM_NAME}, or any other
nostr-compatible app.
</p>
<p>
Once you've created a relay of your own, come back here to link Flotilla with your new relay.
Once you've created a relay of your own, come back here to link {PLATFORM_NAME} with your new relay.
</p>
<ModalFooter>
<Button class="btn btn-link" on:click={back}>