Commit Graph

1540 Commits

Author SHA1 Message Date
ekzyis 8f229c51bf Remove duplicate slack env vars 2023-10-13 22:09:17 +02:00
ekzyis 942b1e07e9 Fix earn push notifications 2023-10-13 21:46:07 +02:00
keyan 8f034f0e0a fix corner cases in lightning address autosuggestions 2023-10-12 15:29:22 -05:00
keyan 6516ce9c9e don't immediate clear mention suggestions on blur (in case clicking a suggestion) 2023-10-12 13:45:29 -05:00
Keyan 676d30f9bf
Merge pull request #554 from SatsAllDay/537-self-mention
Self mentions
2023-10-12 13:26:14 -05:00
Keyan a37c0ef14a
Merge pull request #553 from SatsAllDay/autocomplete-ln-addr
Add auto-complete support when withdrawing to ln addr
2023-10-12 13:18:29 -05:00
Keyan 6cb813f421
Merge branch 'master' into autocomplete-ln-addr 2023-10-12 13:16:54 -05:00
Keyan 672adf260d
Merge pull request #559 from SatsAllDay/seed-large-discussion
Add a discussion post with a lot of comments to the seed file to help debug in dev
2023-10-12 13:08:49 -05:00
Keyan ad9465acda
Merge pull request #556 from AustinKelsay/bugfix-crosspost-remove-a-tag
Removing a tag, retested crossposts and edits
2023-10-12 13:08:20 -05:00
Keyan e792d18467
Merge pull request #551 from AustinKelsay/bugfix-adv-post-form-crosspost-checkbox
crosspost to nostr checkbox only appears on discussion forms
2023-10-12 13:07:45 -05:00
keyan a7e016e9ba fix? markdown input rerendering more than needed 2023-10-12 12:46:22 -05:00
Satoshi Nakamoto 99ce6c6e45 Add a discussion post with a lot of comments to help debug in dev to the seed file 2023-10-12 12:15:11 -04:00
austinkelsay cdd3e4fdd4 Removing a tag, retested crossposts and edits 2023-10-11 17:26:25 -05:00
Satoshi Nakamoto 0b8316d08c Don't create mentions when mentioning yourself
By extension, also don't send yourself a push notification when
mentioning yourself
2023-10-11 16:07:48 -04:00
Satoshi Nakamoto e907b40845 * Hide suggestions if the user is typing a ln addr that is not on stacker.news
* Don't select suggestion with tab in this particular instance of InputUseSuggest
2023-10-10 19:15:10 -04:00
Satoshi Nakamoto 6d3482a288 Add auto-complete support when withdrawing to ln addr
adds auto-complete support for other stacker.news users when withdrawing
to a lightning address

implemented via adding an optional `transformUser` prop to the `UserSuggest` and `InputUserSuggest`
components, which allows you to transform fetched user results before displaying in the suggestion
dropdown

this is used to transform a user nym to nym@stacker.news, the corresponding
lightning address

by default, `transformUser` is an identity fn aka no transformation

this change also clears suggestions when the surrounding input field is blurred, which
is a better UX IMO
2023-10-10 11:15:59 -04:00
austinkelsay 06c55be6a5 crosspost to nostr checkbox only appears on discussion forms 2023-10-09 16:08:33 -05:00
keyan 8ace053be5 remove freebie tag from pinned items 2023-10-06 19:32:48 -05:00
keyan a474b6b94e temp remove broken rewards notifications 2023-10-06 19:28:05 -05:00
keyan 91ccc80a97 fix issues related to syntax highlighting 2023-10-06 18:51:38 -05:00
keyan 9aa8d8a688 trigger autocomplete with just 2023-10-06 18:20:12 -05:00
keyan dc1fda64dc remove unused debounce callback deps 2023-10-06 16:34:16 -05:00
keyan 58c5844492 fix mention regex 2023-10-06 16:01:19 -05:00
keyan b995b7dd3b raise nofollow limits 2023-10-06 15:54:46 -05:00
Keyan 6d370aa019
Merge pull request #548 from SatsAllDay/copy-ln-addr
Copy lightning address on click
2023-10-06 15:23:18 -05:00
Keyan 33325f7c17
Merge pull request #545 from SatsAllDay/lud18-fixes
LUD-18 fixes
2023-10-06 15:15:33 -05:00
keyan 1b283fbe94 fix treating ref as primitive 2023-10-06 15:04:50 -05:00
keyan 8ca8bb985e reuse debounce hook more places 2023-10-06 15:01:51 -05:00
Satoshi Nakamoto c073847eb7 Copy ln addr when you click on the ln addr button on user profile 2023-10-06 09:24:40 -04:00
keyan 0a35bca650 memoize debounced function 2023-10-05 21:14:57 -05:00
keyan d1a7dca46b use and make a debounce callback hook 2023-10-05 20:33:14 -05:00
Keyan 4595dfdda5
Merge branch 'master' into lud18-fixes 2023-10-05 19:33:22 -05:00
SatsAllDay 6b8820b7ab
Fix quote selection reply in iOS Safari (#544)
* Handle quote reply of selections in iOS Safari

Approach borrowed from https://stackoverflow.com/a/72537632

Basically this makes a copy of the selection when the "touchend" event
occurs, so we can use it for processing later

This code listens to that event for each instance of the reply component,
removing the event listener on unmount

* Update docker-compose up command in dev notes

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
2023-10-05 19:32:54 -05:00
keyan 707fa33552 tag freebies appropriately 2023-10-05 18:40:30 -05:00
Satoshi Nakamoto e9c0c06779 Various LUD-18 fixes
* Debounce the `onAddrChange` event handler when sending to a LN Address,
so we more accurately display the input form for LUD-12 and LUD-18 options

* Remove explicit URI encoding of Payer Data when sending to a LN Addr, since we're getting encoding for free via URLSearchParams

* Append `@stacker.news` to identifier values sent in payer data

* Don't do extra decoding when receiving LUD-18 data
2023-10-05 10:27:01 -04:00
keyan c77d761ab6 Merge branch 'fix' 2023-10-04 19:35:09 -05:00
keyan 0767b23d80 remove payer data encoding before going to db 2023-10-04 19:34:32 -05:00
ekzyis 425220d8cb
More push notification types (#530)
* Add push notifications for referrals

* Add push notifications for daily rewards

* Add push notifications for deposits

* Add push notifications for earning cowboy hats

* Use streak id to synchronize blurb

* Fix usage of magic number for blurbs

* Fix missing catch

* Add push notification for losing cowboy hats

* Fix null in deposit push notification

* Add push notification for invites

* Don't replace streak push notifications

* Fix missing unit in daily reward push notification title

* Attach sats to payload options instead of parsing title

---------

Co-authored-by: ekzyis <ek@stacker.news>
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
2023-10-04 18:20:52 -05:00
keyan b3e8280d76 random rewards 2023-10-04 15:56:18 -05:00
SatsAllDay 502bfee072
Mention auto-complete (#532)
* uber rough first pass at mention autocompletes

* support custom limit on topUsers query

* hot keys for selecting user suggestion in markdown input

* query top stackers for mentions with no search query

* refactor UserSuggestion to help with reusability

textarea-caret for placing the user suggest dropdown appropriately

other various code cleanup items to make it easier to use

off by one errors are fun!

various code cleanup and reuse the UserSuggest component in InputUserSuggest to reduce duplication

* change default users to week query

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2023-10-04 15:10:56 -05:00
SatsAllDay e76b8a2915
Add useful dev commands doc for others to reference (#543) 2023-10-04 14:45:21 -05:00
rleed 247744a83c
Add a date selector to the search function (#494)
* add date picker

* lint

* add date picker

* lint

* refine

* fix/finish the date picker UI part

* finish query parameter passing & incremental cleanup

* fix/finish the date picker UI part

* finish query parameter passing & incremental cleanup

* fix bad merge

* fix linting errors

* wrap for mobile

* add date picker

* lint

* add date picker

* lint

* refine

* fix/finish the date picker UI part

* finish query parameter passing & incremental cleanup

* fix/finish the date picker UI part

* finish query parameter passing & incremental cleanup

* fix bad merge

* fix linting errors

* wrap for mobile

* merge glitch?

* enhance a little

---------

Co-authored-by: rleed <rleed1@pm.me>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
2023-10-04 14:44:06 -05:00
Austin Kelsay b3aee502a0
Crosspost discussion items to nostr (#522)
* Crossposting discussion function, crossposting setting migration

* Passing in id, adding relays to test

* Adding checkbox setting for crossposting enabled

* Adding paramaterized event fields to crosspostDiscussion, successfully crossposting discussions

* Cleaning up for rebase

* Removing nostrRelays

* Retry crosspost toast

* Adding nostrCrossposting to settings, fixing migration

* Full flow is working with error surfacing, retries, and skips for a retry

* Updates to error handling/retries for crossposting, fixing settings for crossposting

* Allowing recursive retries for crossposting to specific relays

* Fixing / syncing crossposting settings, cleaning up and seperating out nostr functions

* Cleaning up

* Running linter

* make nostr crossposter a hook

---------

Co-authored-by: Austin <austin@pop-os.localdomain>
Co-authored-by: plebdev <plebdev@plebdevs-MacBook-Pro.local>
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2023-10-04 13:47:09 -05:00
SatsAllDay f6141a6965
Quote reply support on text-based posts and comments (#526)
* Quote reply support on text-based posts and comments

* Clean up the `onQuoteReply` prop usage

* Refactor to use `useImperativeHandle` for Reply

* quote selected text if any, otherwise quote whole item

* Only quote selected text if it's from the item we're replying to, not just any selected text

* add trailing newline to copied text

* onPointerDown for mobile, quote+reply quotes text

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2023-10-03 20:12:12 -05:00
SatsAllDay 362f95add9
LUD-18 Wallet implementation (#531)
* LUD-18 Wallet implementation

Query the lightning address provider client-side to learn of capabilities

Conditionally render LUD-12 and LUD-18 fields based on what the remote
server says is supported

Allow identifier, name, and email to be sent from the SN side during the withdrawal flow. Auth seems too complicated for our use case, and idk about pubkey?

* Clear inputs if the new ln addr provier doesn't support those fields

* various ux improvements

* dynamic client-side validation for required payer data

* don't re-init form state on error

* correct min and max amount values

* only send applicable data to graphql api based on payerdata schema

* input type for numeric values (amount, max fee)

* update step for amount and max fee

* Fix identifier optional and field blur

* reuse more code

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2023-10-03 18:22:56 -05:00
SatsAllDay 3acaee377b
LUD-18 Service Support (#518)
* first pass of LUD-18 support

* Various LUD-18 updates

* don't cache the well-known response, since it includes randomly generated single use values

* validate k1 from well-known response to pay URL

* only keep k1's for 10 minutes if they go unused

* fix validation logic to make auth object optional

* Various LUD18 updates

* move k1 cache to database

* store payer data in invoice db table

* show payer data in invoices on satistics page

* show comments and payer data on invoice page

* Show lud18 data in invoice notification

* PayerData component for easier display of info in invoice, notification, wallet history

* `payerData` -> `invoicePayerData` in fact schema

* Merge prisma migrations

* lint fixes

* worker job to clear out unused lnurlp requests after 30 minutes

* More linting

* Move migration to older

* WIP review

* enhance lud-18

* refine notification ui

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2023-10-03 14:35:53 -05:00
ekzyis 1e417ba670
Image refactor refactor (#541)
* Remove outdated comments about srcSet value

We no longer distinguish between `undefined` and `null` for `srcSet`.

* Fix misleading URL shown

* Update/fix comments in <ImageOriginal>

* Simplify condition when to show image

I think this is not required since `showImage` will always stay false if tab !== 'preview' or me?.clickToLoadImg are true.

* Rename to imgproxyOnly

* Add info to imgproxyOnly setting

* Fix text of markdown links not used on imgproxy errors

* Fix rendering markdown links with text as images

---------

Co-authored-by: ekzyis <ek@stacker.news>
2023-10-03 13:05:04 -05:00
keyan 33c1adde3d use match_phrase_prefix instead 2023-10-02 19:56:54 -05:00
rleed 073fc6b848
allow seaching longer urls (#521)
Co-authored-by: rleed <rleed1@pm.me>
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
2023-10-02 19:55:51 -05:00
ekzyis c0c691eda5
Add category tag to RSS feed (#534)
Co-authored-by: ekzyis <ek@stacker.news>
2023-10-02 19:20:13 -05:00