Commit Graph

19 Commits (master)

Author SHA1 Message Date
OFF0 bb8790e949
timeline: add route to show timeline of other users
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details
added experimental /timeline/npub... route, this currently does
not correctly reload as contacts of that npub are lost onload.
other than that it seems to work well, but needs more testing.
9 months ago
OFF0 fea8c0bd21
route: add contact list view
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details
added new route /contacts/npub... to show contact lists of users.
each user has about text, follow/unfollow buttons.

fixed CSS and JavaScript links in index.html to support deeper
path i.e. /contacts/npub... uri's.
9 months ago
OFF0 25d3283a80
routes: fix internal link detection
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline was successful Details
it just checked link length, but should at least ensure that the
condition which checks for internal links starts with a slash.
9 months ago
OFF0 7539d11a56
contact: show timeline of only followed contacts
added home and global feed, home will try to show timeline with
all followed contacts and fallback to global if there are no
followees.

in a future commit global tab could become search and have a
search field at the top.
9 months ago
OFF0 f92cfbbb31
contact: add follow and unfollow support
this creates a kind 3 event that includes a list of profiles that
the user is following.

the feed is still the public global feed and individual feed with
only events from followed pubkeys will be added in the next commit.

also:
- updated following and unfollwing wording
- added proper primary and secondary button styles.
9 months ago
OFF0 208ea6363a
profile: refactor
each view has it's own DOMMap to reference its own elements this
can us non-unique keys, i.e. each view can have a header key.

changed:
- use getViewElem instead of querying the dom
- access button.dataset.id directly before traversing the dom
9 months ago
OFF0 5039b3dece
profile: show following, contact-list changes and contact events
- added following count in profile header
- added contact-list changes events
- added new raw event detail view to visulaize event metadata and
  raw content
10 months ago
OFF0 5ef45d93d3
nav: add history entry only once onload
reloading the page always added a history entry breaking back
button functionality.

fixed by only adding a history entry on load if the history is
empty, so that reloads will not add the same entry over and over
again.
10 months ago
OFF0 3a1bf6f56f
feed: navigate by clicking on profile image and content
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details
before npub and note links was only supported on profile name and
date/time.

added support to click on profile image and note content (unless
a link was clicked).
10 months ago
OFF0 543d327b5c
feed: ignore shift click
the global click callback should ignore shift click which allows
to use native browser behavior (open link in new window).
10 months ago
OFF0 5e61dcef0c
feed: subscribe to pow events
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details
if difficulty-filter is set the subscription of the global feed
can filter only ids with 0-prefix to save bandwidth.

as there may not be many pow events within the last 24h, the
date range is now only enabled if there is no diffculty-filter
set so that the feed is not empty.

if this works as expected it could also only subscripe to
reactions and profile info with pow ids.

deps: update nostr-tools to 1.10.1

This version supports subscribing to prefixed ids, see
3bdb68020d
10 months ago
OFF0 30809ccbce
feed: update subscriptions
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details
playing around with subscriptions, feed now loads profile names,
profile views also show replied to notes and notes recursively
search for replies or replies.

this commit does too many subscriptions, ideally a max of three
subscriptions are done at once. in future commit it would be nice
to subscribe modularly, have done callbacks or push into subscribe
next queues.
1 year ago
OFF0 7113bf1a4d
feed: visually improve threads styling
CSS is a bit messy and should be redone, but threads are now styled
a bit as branches.
1 year ago
OFF0 c88cfa74bb
refactor: improve view and move code to ui and notes
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline was successful Details
cleanup code and move parts to ui.ts and notes.ts.

simplify view and fix some weird animation issue, it should run
pretty stable now.

updated color and spacings.

profile view now showing kind 0 name, but it is unnecessarily
re-rendering. this part should probably go to a custom profil
subscription callback in the future. keeping as is for now and
refactor later.
1 year ago
OFF0 42fbd7c4c8
feed: ignore ctrl click
ctrl/command click should do the native browser thing and not be
intercepted as normal click, i.e. ctrl click open-in-new-tab works
1 year ago
OFF0 77711d655d
feed: ignore vmess protocol messages
Drop encrypted vmess messages.
1 year ago
OFF0 aec72b6c62
refactor: function to es6 arrow functions
so that it doesnt depend on function hoisting.
1 year ago
OFF0 bbfa4ae545
main: fix global click handler
settings view and write new message didnt show. reason was typescript
expected an instance of an HTMLElement but this didnt allow for
SVG elements inside the write button. Another reason was that the
condition expected a parent with data-id which isn't the case for
settings button nor write-new-message.
1 year ago
OFF0 f9fe892937
main: convert remaining main to typescript 1 year ago