Skip to content

Commit

Permalink
Remove listings and events (#468)
Browse files Browse the repository at this point in the history
* remove calendar view

* delete event create

* remove all listing/calendar ref

* remove eventEdit and eventDelete

* remove EventDetail

* remove eventActions

---------

Co-authored-by: hodlbod <[email protected]>
  • Loading branch information
ticruz38 and staab authored Nov 19, 2024
1 parent 6536ca0 commit 8578c36
Show file tree
Hide file tree
Showing 12 changed files with 8 additions and 539 deletions.
32 changes: 0 additions & 32 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
"@capacitor/cli": "^6.1.2",
"@capacitor/core": "^6.1.2",
"@capacitor/ios": "^6.1.2",
"@event-calendar/core": "^3.6.2",
"@event-calendar/day-grid": "^3.6.2",
"@event-calendar/interaction": "^3.6.2",
"@fortawesome/fontawesome-free": "^6.6.0",
"@getalby/bitcoin-connect": "^3.6.2",
"@scure/base": "^1.1.9",
Expand Down
21 changes: 0 additions & 21 deletions src/app/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,11 @@
import ForegroundButtons from "src/app/ForegroundButtons.svelte"
import About from "src/app/views/About.svelte"
import Bech32Entity from "src/app/views/Bech32Entity.svelte"
import Calendar from "src/app/views/Calendar.svelte"
import ChannelCreate from "src/app/views/ChannelCreate.svelte"
import ChannelsDetail from "src/app/views/ChannelsDetail.svelte"
import ChannelsList from "src/app/views/ChannelsList.svelte"
import DataExport from "src/app/views/DataExport.svelte"
import DataImport from "src/app/views/DataImport.svelte"
import EventDelete from "src/app/views/EventDelete.svelte"
import EventDetail from "src/app/views/EventDetail.svelte"
import EventEdit from "src/app/views/EventEdit.svelte"
import FeedCreate from "src/app/views/FeedCreate.svelte"
import FeedEdit from "src/app/views/FeedEdit.svelte"
import FeedList from "src/app/views/FeedList.svelte"
Expand Down Expand Up @@ -101,7 +97,6 @@
router.register("/about", About)
router.register("/search", Search)
router.register("/events", Calendar)
router.register("/channels", ChannelsList, {
requireSigner: true,
Expand All @@ -119,22 +114,6 @@
},
})
router.register("/events/:address", EventDetail, {
serializers: {
address: asNaddr("address"),
},
})
router.register("/events/:address/edit", EventEdit, {
serializers: {
address: asNaddr("address"),
},
})
router.register("/events/:address/delete", EventDelete, {
serializers: {
address: asNaddr("address"),
},
})
router.register("/groups", GroupList)
router.register("/help/:topic", Help)
Expand Down
100 changes: 0 additions & 100 deletions src/app/shared/Calendar.svelte

This file was deleted.

43 changes: 0 additions & 43 deletions src/app/shared/EventActions.svelte

This file was deleted.

27 changes: 4 additions & 23 deletions src/app/shared/EventInfo.svelte
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
<script lang="ts">
import cx from "classnames"
import {fromPairs} from "ramda"
import {Tags, getAddress} from "@welshman/util"
import {Tags} from "@welshman/util"
import {deriveIsDeletedByAddress} from "@welshman/store"
import {repository, pubkey} from "@welshman/app"
import {repository} from "@welshman/app"
import {secondsToDate, formatTimestamp, formatTimestampAsDate, getLocale} from "src/util/misc"
import Anchor from "src/partials/Anchor.svelte"
import Chip from "src/partials/Chip.svelte"
import PersonLink from "src/app/shared/PersonLink.svelte"
import EventActions from "src/app/shared/EventActions.svelte"
import NoteContentKind1 from "src/app/shared/NoteContentKind1.svelte"
import {router} from "src/app/util/router"
import {getSetting} from "src/engine"
export let event
export let showDate = false
export let actionsInline = false
const address = getAddress(event)
const timeFmt = new Intl.DateTimeFormat(getLocale(), {timeStyle: "short"})
const datetimeFmt = new Intl.DateTimeFormat(getLocale(), {dateStyle: "short", timeStyle: "short"})
const detailPath = router.at("events").of(address).toString()
const editLink = router.at("events").of(address).at("edit").toString()
const deleteLink = router.at("events").of(address).at("delete").toString()
const deleted = deriveIsDeletedByAddress(repository, event)
$: tags = Tags.fromEvent(event)
Expand All @@ -39,24 +31,13 @@
<div class="flex flex-grow flex-col gap-2">
<div class="flex items-center justify-between">
<div class="flex items-center gap-3">
<Anchor class={cx("text-2xl", {"line-through": $deleted})} href={detailPath}>
<div class="text-2xl" class:line-through={$deleted}>
{title || name}
</Anchor>
</div>
{#if $deleted}
<Chip danger small>Deleted</Chip>
{/if}
{#if actionsInline && event.pubkey === $pubkey && !$deleted}
<Anchor modal stopPropagation href={editLink} class="flex items-center">
<i class="fa fa-edit text-base text-neutral-200" />
</Anchor>
<Anchor modal stopPropagation href={deleteLink} class="flex items-center">
<i class="fa fa-trash text-base text-neutral-200" />
</Anchor>
{/if}
</div>
{#if !actionsInline}
<EventActions {event} />
{/if}
</div>
<div class="flex items-center gap-2 text-sm text-neutral-200">
{#if event.wrap}
Expand Down
7 changes: 1 addition & 6 deletions src/app/views/Bech32Entity.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import Spinner from "src/partials/Spinner.svelte"
import NoteDetail from "src/app/views/NoteDetail.svelte"
import PersonDetail from "src/app/views/PersonDetail.svelte"
import EventDetail from "src/app/views/EventDetail.svelte"
export let entity, type, data, relays
</script>
Expand All @@ -21,11 +20,7 @@
...(data.relays || []),
...Array.from(ctx.app.router.FromPubkey(data.pubkey).getUrls()),
]}
{#if data.kind === 31923}
<EventDetail {address} {relays} />
{:else}
<NoteDetail {address} {relays} />
{/if}
<NoteDetail {address} {relays} />
{:else if type === "nprofile"}
<PersonDetail pubkey={data.pubkey} {relays} />
{:else if type === "npub"}
Expand Down
10 changes: 0 additions & 10 deletions src/app/views/Calendar.svelte

This file was deleted.

29 changes: 0 additions & 29 deletions src/app/views/EventDelete.svelte

This file was deleted.

Loading

0 comments on commit 8578c36

Please sign in to comment.