Commit Graph

26 Commits (a1b1f3baee124f12aca5c5099dbd462cd218eb4c)

Author SHA1 Message Date
OFF0 a1b1f3baee
nip-13: mine pow async in worker any only invoke noxy with pow
added pow to text notes, reactions and metadata events. pow is
mined async in a worker so that the main process does not freeze.

noxy profile images, link and image previews are now now only
invoked if an event has some valid work proof. noxy can decide
if there is enough work and whether or not to serve data for a
certain event.

target difficulty can be implemented in a later step, this change
only check if there is any valid nonce tag with commitment target
greater than 0.
1 year ago
alex 9b11459f2d
css: temporary disable image previews until things calm down
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/tag/woodpecker Pipeline was successful Details
there's too much porn spam at the moment.
revert this when we find an alternative.
1 year ago
OFF0 cd99b5e5c1
feed: add deeplinking and browser history
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details
Added deeplinks with browser history support. Each note and author
have now a detail view under nostr.ch/<event-id-or-pubkey> in a
future commit also /e/<event-id> and /p/<pubkey> could be supported.

User can now navigate with browser back (with the expection of the
settings overlay).

Not everything is supported in the detail view (yet) i.e reply and
stars are partially working (dont update visually), leaving this as
open bug. This should fix itself once only 1 render container is
used instead of different divs in the html for each view.

Ideally the detail view should also query for related events,
something to add in a future commit
1 year ago
OFF0 9df0f723f2
preview: dont render empty meta fields
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details
Metadata can contain empty fields or broken images. Improved
rendering of meta preview links with missing info, also added a
subtile transparent dark background color to preview images, as
some images contain white text on transparent background and are
invisible in light mode.
1 year ago
OFF0 ff0ba4f6e6
preview: show the full preview image
Was set to cover, which is nice but cuts off some sides,
especially since image dimensions are not known.
1 year ago
OFF0 9250ccf287
preview: fix limit width of large images 1 year ago
OFF0 2d2643c2c8
feed: display link preview with noxy
fetches the first link and shows it below a text note, all
resources are prxied through noxy.

see nostr/noxy#2
1 year ago
OFF0 16eb14d08e
layout: add dummy profile pic to recommend server
ci/woodpecker/push/woodpecker Pipeline was successful Details
Recommend server events looked broken and still showed the old
bubble. Fixed layout and also use dummy pic for recommend server
events.
1 year ago
OFF0 2e94d59028
feed: fix expand long notes
Text notes longer than 280 are shortened and appended with '…' to
indicate that this note can be expanded, but this dotdotdot was
real text and was not removed once the note is expanded.

Changed to showing the dots through CSS and only if the attribute
exists, so it does not show on expanded notes.
1 year ago
OFF0 b4392bf215
layout: highlight kind 0 name and dummy profile pics
- added experimental dummy profile pics
- highlight kind 0 usernames
- improved dark mode colors
1 year ago
OFF0 fecbb8ff50
feed: show picture (kind 0) with noyx
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details
Loading images from random url leaks meta data to other servers.

Enabled showing kind 0 picture from noxy (nostr proxy),
see https://git.qcode.ch/nostr/noxy

Only href that are a valid url and use http(s) should be allowed
to prevent malicious urls such as 'javascript:alert(1)'.

Kept the fallback to the speak bubble if there is no kind 0 event
for this pubkey or picture is missing.
1 year ago
OFF0 4576355b03
layout: visual interface improvements
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details
- writing a new message is now presented in full-screen, so that
  there are no distractions, i.e. other posts
- added back button and listen to esc key to close new message
- on portrait mode the navigation buttons are now positioned at
  the bottom of the screen
- write new message botton (bubble) is also positioned bottomright
- replies now use a line to the last reply instead of indentation,
  better use of available space, especially on small screen
- ignore newlines at the end of a post
- added subtile growin effect to the multiline textfield, to hint
  that the textarea is growing with more content
1 year ago
OFF0 4a710ee5d1
getting ready
- added favicon.ico to get rid of anoying logs in the future
- clicking the idea bubble brings back the text input field
- stop accidentally submitting the reply form
- updated idea cloud to dark/light mode neutral gray
- contact list not needed yet, disabled
- add a detailed list of reactions in star tooltip
- removed debug debounce was for testing chronological feed order
- started username prototype
2 years ago
OFF0 e7ad8e468b
feed: handle reactions (kind 7)
Added support for starring.

Stores recation events in a reactionMap, so rendering can use it
later.

Improved reply to replies, by keeping a separate replyDomMap.

Changed from heart to star, reason: thumbsup or a heart are good
for positive events, but not so suitable to react to a bad event.
So currently negavtive votes are just counted as a star as well.

Did not add another dom map, but just querySelector in case an
existing star needs to be updated later.
2 years ago
OFF0 13b3db4302
layout: update navigation and add icons
Used different CSS-only tab technique. The implementation before
messed up the whole height of the page and used unnecessary
absolute positioning.

Added comment icon from MFG Labs iconset (SIL)
- https://github.com/MfgLabs/mfglabs-iconset

Added outlined and filled heart from Elusiv icons (SIL)
- https://github.com/dovy/elusive-iconfont

Time ago seconds should be rounded.
2 years ago
OFF0 a71de21302
feed: playing with ui
- shorten text notes after 280 chars
- add expand button to shortened text
- play around with profile image and username layout
2 years ago
OFF0 2d8e60a6df
feed: support reply and render incoming replies
Keeping current reply info so it can be accessed later to
publish the reply.

Before only known replies were rendered, now incoming replies
get added to the existing text note  instantly. This needs to
create a reply container if this is the first reply of this event.

Added time ago formatting and a helper function that switches
between relative time (if event < 24h) or absolute formatted time
(if older than 1 day).
2 years ago
OFF0 397df6d5a4
feed: show replies
Render known replies, also added debounce debug info to test
chronological order and keep an eye on.
2 years ago
OFF0 a2a5cfa341
refactoring: eleanup part I
Styled profile image to be aligned at the top together with the
event metadata and content.

Still need to decide on which relays to enable.

JavaScript lint fixes.
2 years ago
OFF0 380b79038d
feed: change recommend server styling to show on oneline
As recommend servers is secondary meta information, it is enough to
show it smaller and on one line.
2 years ago
OFF0 69afa63201
feed: style text note reply
Indent textNotes that are replies to an event.
2 years ago
OFF0 7621989b43
layout update
- limit max width of feed content
- better profile image positioning
2 years ago
OFF0 f9fcb1131e
ui: update settings and feed
ci/woodpecker/push/woodpecker Pipeline was successful Details
- changed private-key input to type password
- added toggle to show private-key
- added key-generated, key-saved success messages
- changed global font size
- upadted colors (especially light mode)
- unsubscribe after a few messages for testing
2 years ago
OFF0 2ee2b69da4
feed: refactor render and add recommend server event
Added event for recommend server (NIP-01 recommend_server event).
2 years ago
OFF0 7a705cd4ab
add profile images for users
Note: users can configure different images on each relay, added
userList with a metadata to keep a map of of different settings
of each releay.
2 years ago
alex 8d60bf871c initial 2 years ago