Allow blurring content in development

This commit is contained in:
Jon Staab 2024-07-15 09:24:24 -07:00
parent 70331bfb81
commit 9b14b4a3d1
6 changed files with 8 additions and 11 deletions

3
.env
View File

@ -26,5 +26,4 @@ VITE_BUGSNAG_API_KEY=
VITE_BUILD_HASH=
VITE_LOG_LEVEL=error
VITE_ENABLE_MARKET=true
VITE_BLUR_CONTENT=false

View File

@ -3,6 +3,7 @@
# 0.4.9
- [x] Add person zaps
- [x] Bring back delete
# 0.4.8

View File

@ -297,7 +297,9 @@
}}>Show</Anchor>
</p>
{:else}
<NoteContent note={event} {showEntire} {showMedia} />
<div class:blur-sm={$env.BLUR_CONTENT}>
<NoteContent note={event} {showEntire} {showMedia} />
</div>
{/if}
<div class="cy-note-click-target h-[2px]" />
<NoteActions

View File

@ -2,7 +2,7 @@
import Anchor from "src/partials/Anchor.svelte"
import FlexColumn from "src/partials/FlexColumn.svelte"
import {router} from "src/app/util/router"
import {deleteEventById} from "src/engine"
import {deleteEvent} from "src/engine"
export let eid
export let kind
@ -10,7 +10,7 @@
const onCancel = () => router.pop()
const onConfirm = () => {
deleteEventById({kind, id: eid})
deleteEvent({kind, id: eid})
router.pop()
}
</script>

View File

@ -669,12 +669,6 @@ export const publishDeletion = ({kind, address = null, id = null}) => {
export const deleteEvent = event =>
publishDeletion({id: event.id, address: getAddress(event), kind: event.kind})
export const deleteEventById = ({kind, id}) =>
publishDeletion({
kind,
id,
})
export const deleteEventByAddress = address =>
publishDeletion({address, kind: Address.from(address).kind})

View File

@ -172,6 +172,7 @@ export const env = new Writable({
DVM_RELAYS: fromCsv(import.meta.env.VITE_DVM_RELAYS).map(normalizeRelayUrl) as string[],
ENABLE_MARKET: JSON.parse(import.meta.env.VITE_ENABLE_MARKET) as boolean,
ENABLE_ZAPS: JSON.parse(import.meta.env.VITE_ENABLE_ZAPS) as boolean,
BLUR_CONTENT: JSON.parse(import.meta.env.VITE_BLUR_CONTENT) as boolean,
FORCE_GROUP: import.meta.env.VITE_FORCE_GROUP as string,
IMGPROXY_URL: import.meta.env.VITE_IMGPROXY_URL as string,
MULTIPLEXTR_URL: import.meta.env.VITE_MULTIPLEXTR_URL as string,