remove old env vars, add remove user to profile detail modal
This commit is contained in:
parent
fd8795821e
commit
e5c752ce9e
3 changed files with 21 additions and 5 deletions
2
.env
2
.env
|
|
@ -9,7 +9,6 @@ VITE_PLATFORM_NAME=Flotilla
|
||||||
VITE_PLATFORM_LOGO=static/logo.png
|
VITE_PLATFORM_LOGO=static/logo.png
|
||||||
VITE_PLATFORM_RELAYS=
|
VITE_PLATFORM_RELAYS=
|
||||||
VITE_PLATFORM_ACCENT="#7161FF"
|
VITE_PLATFORM_ACCENT="#7161FF"
|
||||||
VITE_PLATFORM_SECONDARY="#EB5E28"
|
|
||||||
VITE_THEME="clay"
|
VITE_THEME="clay"
|
||||||
VITE_PLATFORM_DESCRIPTION="Flotilla is nostr — for communities."
|
VITE_PLATFORM_DESCRIPTION="Flotilla is nostr — for communities."
|
||||||
VITE_PUSH_SERVER=https://nps.flotilla.social/
|
VITE_PUSH_SERVER=https://nps.flotilla.social/
|
||||||
|
|
@ -20,7 +19,6 @@ VITE_DEFAULT_RELAYS=relay.damus.io,relay.primal.net,nostr.mom
|
||||||
VITE_DEFAULT_SEARCH_RELAYS=relay.ditto.pub,antiprimal.net,relay.vertexlab.io
|
VITE_DEFAULT_SEARCH_RELAYS=relay.ditto.pub,antiprimal.net,relay.vertexlab.io
|
||||||
VITE_DEFAULT_MESSAGING_RELAYS=auth.nostr1.com,relay.keychat.io,relay.ditto.pub
|
VITE_DEFAULT_MESSAGING_RELAYS=auth.nostr1.com,relay.keychat.io,relay.ditto.pub
|
||||||
VITE_SIGNER_RELAYS=relay.nsec.app,ephemeral.snowflare.cc,bucket.coracle.social
|
VITE_SIGNER_RELAYS=relay.nsec.app,ephemeral.snowflare.cc,bucket.coracle.social
|
||||||
VITE_VAPID_PUBLIC_KEY=BIt2D4BdgdbCowD_0d3Np6GbrIGHxd7aIEUeZNe3hQuRlHz02OhzvDaai0XSFoJYVzSzdMjdyW-QhvW9_yq8j4Y
|
|
||||||
VITE_THUMBNAIL_URL=https://vthumbs.coracle.social
|
VITE_THUMBNAIL_URL=https://vthumbs.coracle.social
|
||||||
VITE_GLITCHTIP_API_KEY=
|
VITE_GLITCHTIP_API_KEY=
|
||||||
GLITCHTIP_AUTH_TOKEN=
|
GLITCHTIP_AUTH_TOKEN=
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ You can also optionally create an `.env.local` file and populate it with the fol
|
||||||
- `VITE_PLATFORM_URL` - The url where the app will be hosted
|
- `VITE_PLATFORM_URL` - The url where the app will be hosted
|
||||||
- `VITE_PLATFORM_NAME` - The name of the app
|
- `VITE_PLATFORM_NAME` - The name of the app
|
||||||
- `VITE_PLATFORM_LOGO` - A logo url for the app. Can be a local path or https link. Must be a PNG file.
|
- `VITE_PLATFORM_LOGO` - A logo url for the app. Can be a local path or https link. Must be a PNG file.
|
||||||
- `VITE_PLATFORM_ACCENT` - A hex color for the app's accent color
|
- `VITE_PLATFORM_ACCENT` - A hex color for the app's accent color (used only for generated manifest, for more control create a custom theme file)
|
||||||
- `VITE_PLATFORM_DESCRIPTION` - A description of the app
|
- `VITE_PLATFORM_DESCRIPTION` - A description of the app
|
||||||
- `VITE_PLATFORM_TERMS` - URL to your terms of service page
|
- `VITE_PLATFORM_TERMS` - URL to your terms of service page
|
||||||
- `VITE_PLATFORM_PRIVACY` - URL to your privacy policy page
|
- `VITE_PLATFORM_PRIVACY` - URL to your privacy policy page
|
||||||
|
|
@ -33,7 +33,6 @@ You can also optionally create an `.env.local` file and populate it with the fol
|
||||||
- `VITE_BLOCKED_RELAYS` - A comma-separated list of relay urls that will be blocked
|
- `VITE_BLOCKED_RELAYS` - A comma-separated list of relay urls that will be blocked
|
||||||
- `VITE_PUSH_SERVER` - URL of the push notification server
|
- `VITE_PUSH_SERVER` - URL of the push notification server
|
||||||
- `VITE_PUSH_BRIDGE` - WebSocket URL of the push notification relay bridge
|
- `VITE_PUSH_BRIDGE` - WebSocket URL of the push notification relay bridge
|
||||||
- `VITE_VAPID_PUBLIC_KEY` - VAPID public key for web push notifications
|
|
||||||
- `VITE_POMADE_SIGNERS` - A comma-separated list of Pomade signer server URLs (3+ required to enable email signup)
|
- `VITE_POMADE_SIGNERS` - A comma-separated list of Pomade signer server URLs (3+ required to enable email signup)
|
||||||
- `VITE_THUMBNAIL_URL` - URL of the image thumbnail service
|
- `VITE_THUMBNAIL_URL` - URL of the image thumbnail service
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
import UserCircle from "@assets/icons/user-circle.svg?dataurl"
|
import UserCircle from "@assets/icons/user-circle.svg?dataurl"
|
||||||
import MenuDots from "@assets/icons/menu-dots.svg?dataurl"
|
import MenuDots from "@assets/icons/menu-dots.svg?dataurl"
|
||||||
import MinusCircle from "@assets/icons/minus-circle.svg?dataurl"
|
import MinusCircle from "@assets/icons/minus-circle.svg?dataurl"
|
||||||
|
import UserMinus from "@assets/icons/user-minus.svg?dataurl"
|
||||||
import Restart from "@assets/icons/restart.svg?dataurl"
|
import Restart from "@assets/icons/restart.svg?dataurl"
|
||||||
import {fly} from "@lib/transition"
|
import {fly} from "@lib/transition"
|
||||||
import Icon from "@lib/components/Icon.svelte"
|
import Icon from "@lib/components/Icon.svelte"
|
||||||
|
|
@ -21,6 +22,7 @@
|
||||||
import {
|
import {
|
||||||
deriveUserIsSpaceAdmin,
|
deriveUserIsSpaceAdmin,
|
||||||
deriveSpaceBannedPubkeyItems,
|
deriveSpaceBannedPubkeyItems,
|
||||||
|
removeSpaceMembers,
|
||||||
addSpaceMembers,
|
addSpaceMembers,
|
||||||
banSpaceMembers,
|
banSpaceMembers,
|
||||||
} from "@app/members"
|
} from "@app/members"
|
||||||
|
|
@ -69,6 +71,17 @@
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const removeMember = async () => {
|
||||||
|
const error = await removeSpaceMembers(url!, [pubkey])
|
||||||
|
|
||||||
|
if (error) {
|
||||||
|
pushToast({theme: "error", message: error})
|
||||||
|
} else {
|
||||||
|
pushToast({message: "User has successfully been removed!"})
|
||||||
|
back()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const restoreMember = async () => {
|
const restoreMember = async () => {
|
||||||
const error = await addSpaceMembers(url!, [pubkey])
|
const error = await addSpaceMembers(url!, [pubkey])
|
||||||
|
|
||||||
|
|
@ -106,10 +119,16 @@
|
||||||
<li>
|
<li>
|
||||||
<Button onclick={restoreMember}>
|
<Button onclick={restoreMember}>
|
||||||
<Icon icon={Restart} />
|
<Icon icon={Restart} />
|
||||||
Restore User
|
Restore Membership
|
||||||
</Button>
|
</Button>
|
||||||
</li>
|
</li>
|
||||||
{:else}
|
{:else}
|
||||||
|
<li>
|
||||||
|
<Button onclick={removeMember}>
|
||||||
|
<Icon icon={UserMinus} />
|
||||||
|
Remove Member
|
||||||
|
</Button>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<Button class="text-error" onclick={banMember}>
|
<Button class="text-error" onclick={banMember}>
|
||||||
<Icon icon={MinusCircle} />
|
<Icon icon={MinusCircle} />
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue