stacker.news/components
SatsAllDay 3da395a792
multiple forwards on a post (#403)
* multiple forwards on a post

first phase of the multi-forward support

* update the graphql mutation for discussion posts to accept and validate multiple forwards

* update the discussion form to allow multiple forwards in the UI

* start working on db schema changes

* uncomment db schema, add migration to create the new model, and update create_item, update_item
stored procedures

* Propagate updates from discussion to poll, link, and bounty forms

Update the create, update poll sql functions for multi forward support

* Update gql, typedefs, and resolver to return forwarded users in items responses

* UI changes to show multiple forward recipients, and conditional upvote logic changes

* Update notification text to reflect multiple forwards upon vote action

* Disallow duplicate stacker entries

* reduce duplication in populating adv-post-form initial values

* Update item_act sql function to implement multi-way forwarding

* Update referral functions to scale referral bonuses for forwarded users

* Update notification text to reflect non-100% forwarded sats cases

* Update wallet history sql queries to accommodate multi-forward use cases

* Block zaps for posts you are forwarded zaps at the API layer, in addition
to in the UI

* Delete fwdUserId column from Item table as part of migration

* Fix how we calculate stacked sats after partial forwards in wallet history

* Exclude entries from wallet history that are 0 stacked sats from posts with 100% forwarded to other users

* Fix wallet history query for forwarded stacked sats to be scaled by the fwd pct

* Reduce duplication in adv post form, and do some style tweaks for better layout

* Use MAX_FORWARDS constants

* Address various PR feedback

* first enhancement pass

* enhancement pass too

---------

Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
2023-08-23 17:44:17 -05:00
..
accordian-item.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
action-tooltip.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
adv-post-form.js multiple forwards on a post (#403) 2023-08-23 17:44:17 -05:00
avatar.js fix image uploading/edit 2023-08-13 14:12:18 -05:00
bookmark.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
bounty-form.js multiple forwards on a post (#403) 2023-08-23 17:44:17 -05:00
cancel-button.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
charts.js show sources and history of rewards 2023-08-15 12:41:51 -05:00
comment-edit.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
comment.js Remove OP badge for comments by anon on posts by anon (#422) 2023-08-19 16:03:07 -05:00
comment.module.css enhance styling 2023-07-25 13:32:48 -05:00
comments.js Singular/Plural "Sats" labels (#380) 2023-08-08 16:04:06 -05:00
countdown.js Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
dark-mode.js dark-mode needs to block block 2023-08-04 20:45:12 -05:00
delete.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
discussion-form.js multiple forwards on a post (#403) 2023-08-23 17:44:17 -05:00
dont-link-this.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
error-boundary.js upgrade to next-auth 4 (bonus: improve error pages) 2023-07-29 14:38:20 -05:00
fee-button.js Fix cost not set after form reset 2023-08-12 03:12:03 +02:00
fee-button.module.css make anon posting less hidden, add anon info button explainer 2023-08-10 14:41:56 -05:00
footer-rewards.js show sources and history of rewards 2023-08-15 12:41:51 -05:00
footer.js fix issues with new linting 2023-07-25 09:14:45 -05:00
footer.module.css fix dark mode 2023-08-04 19:21:51 -05:00
form.js multiple forwards on a post (#403) 2023-08-23 17:44:17 -05:00
form.module.css upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
fund-error.js Catch invoice errors in fund error modal 2023-08-12 00:35:24 +02:00
hat.js add simple badge to ad 2023-08-16 14:39:01 -05:00
header.js Fix link to profile matching current URL, not profile (#395) 2023-08-15 12:54:24 -05:00
header.module.css Fix link to profile matching current URL, not profile (#395) 2023-08-15 12:54:24 -05:00
info.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
invite.js full powered editing 2022-08-18 13:15:24 -05:00
invoice-status.js make anon posting less hidden, add anon info button explainer 2023-08-10 14:41:56 -05:00
invoice.js Save payment tokens in localStorage 2023-08-12 04:18:32 +02:00
invoice.module.css ready for invoices 2021-05-06 16:15:22 -05:00
item-act.js Fix localStorage cleared because error were swallowed 2023-08-11 23:36:53 +02:00
item-full.js multiple forwards on a post (#403) 2023-08-23 17:44:17 -05:00
item-info.js remove sats info from ads 2023-08-16 17:58:43 -05:00
item-job.js make anon hat appear on profile 2023-08-11 14:12:18 -05:00
item.js restyle ad to be clearer 2023-08-16 17:53:51 -05:00
item.module.css restyle ad to be clearer 2023-08-16 17:53:51 -05:00
items.js remove list jitter by initially preferring ssr 2023-08-06 13:04:25 -05:00
items.module.css working search 2022-01-27 13:18:48 -06:00
job-form.js fix image uploading/edit 2023-08-13 14:12:18 -05:00
layout.js Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
layout.module.css Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
lightning-auth.js remove slashtags completely 2023-08-17 13:40:21 -05:00
lightning-auth.module.css Notifications with nostr info (#368) 2023-08-08 13:19:31 -05:00
lightning.js fix issues with new linting 2023-07-25 09:14:45 -05:00
link-form.js multiple forwards on a post (#403) 2023-08-23 17:44:17 -05:00
login-button.js remove slashtags completely 2023-08-17 13:40:21 -05:00
login.js remove slashtags completely 2023-08-17 13:40:21 -05:00
login.module.css more invite work 2021-10-15 13:05:34 -05:00
me.js fix conditional nextFetchPolicy overriding cache-only on SSR and suppress time hydration warnings 2023-07-31 14:54:30 -05:00
modal.js Keep track of modal stack 2023-08-11 00:35:43 +02:00
more-footer.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
nostr-auth.js Add nostr login (#367) 2023-08-07 19:50:01 -05:00
notifications.js multiple forwards on a post (#403) 2023-08-23 17:44:17 -05:00
notifications.module.css remove list jitter by initially preferring ssr 2023-08-06 13:04:25 -05:00
page-loading.js Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
past-bounties.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
pay-bounty.js Singular/Plural "Sats" labels (#380) 2023-08-08 16:04:06 -05:00
pay-bounty.module.css upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
payment-tokens.js Save payment tokens in localStorage 2023-08-12 04:18:32 +02:00
poll-form.js multiple forwards on a post (#403) 2023-08-23 17:44:17 -05:00
poll.js handle all singular units appropriately 2023-08-08 16:47:27 -05:00
poll.module.css upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
post.js Add anon comments and posts (link, discussion, poll) 2023-07-30 23:45:07 +02:00
price.js fix conditional nextFetchPolicy overriding cache-only on SSR and suppress time hydration warnings 2023-07-31 14:54:30 -05:00
qr.js fix qr layout shift 2023-08-11 17:05:21 -05:00
recent-header.js fix back button behavior on select navigation 2023-07-25 15:29:45 -05:00
related.js more package updates 2023-07-24 19:50:55 -05:00
reply.js Fix localStorage cleared because error were swallowed 2023-08-11 23:36:53 +02:00
reply.module.css upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
root.js improve comment performance 2023-05-06 16:51:17 -05:00
search.js fix back button behavior on select navigation 2023-07-25 15:29:45 -05:00
search.module.css fix dark mode 2023-08-04 19:21:51 -05:00
seo.js handle all singular units appropriately 2023-08-08 16:47:27 -05:00
serviceworker.js handle when navigator controller isn't present 2023-08-08 16:55:53 -05:00
share.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
snl.js fix forgotten find and replace 2023-08-10 17:40:50 -05:00
sub-select-form.js fix undefined sub on post pre-form 2023-07-25 15:41:46 -05:00
subscribe.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
table-of-contents.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
text.js Fix click to load in preview (#427) 2023-08-23 15:30:38 -05:00
text.module.css Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
top-header.js fix top header/stat order on back/forward nav 2023-08-06 13:13:32 -05:00
upload.js fix issues with new linting 2023-07-25 09:14:45 -05:00
upvote.js multiple forwards on a post (#403) 2023-08-23 17:44:17 -05:00
upvote.module.css fix dark mode 2023-08-04 19:21:51 -05:00
usage-header.js fix back button behavior on select navigation 2023-07-25 15:29:45 -05:00
use-data.js remove list jitter by initially preferring ssr 2023-08-06 13:04:25 -05:00
user-header.js make anon hat appear on profile 2023-08-11 14:12:18 -05:00
user-header.module.css upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
user-list.js make anon hat appear on profile 2023-08-11 14:12:18 -05:00