Commit Graph

65 Commits

Author SHA1 Message Date
Keyan 15b038cd78
refactor embeds to be reused (#1368)
* refactor embeds to be reused

* adjust the meaning of settings for embeds

* add wavlake embed (close #1359)

* add spotify embed (closes #1360)

* fix 'format' appearing in srcSet

* add nostr embed

* refine nostr embed

* Update components/media-or-link.js

Co-authored-by: ekzyis <ek@stacker.news>

* Update pages/settings/index.js

Co-authored-by: ekzyis <ek@stacker.news>

* ek suggestions

---------

Co-authored-by: ekzyis <ek@stacker.news>
2024-09-07 12:07:10 -05:00
Keyan c6554d3ca7
Referral Rewards (#1262)
* referral rewards

* make referral notifications consistent

* remove plpgsql from earn job

* remove dead code

* remove debug logging
2024-07-10 19:23:05 -05:00
keyan f2ba61e64b enhance navigation 2024-03-26 18:36:31 -05:00
ekzyis 687012d1a0
API Keys (#915)
* Generate API key in settings

* Check x-api-key for GraphQL API requests

* Don't fallback to cookie if x-api-key header was provided

* Select all session fields

* Fix error if API key not found

* Fix style in settings via form-label className

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
2024-03-14 15:32:34 -05:00
keyan 86e8350994 autowithdraw to lightning address 2024-01-11 13:10:07 -06:00
keyan c597acfb8f add mempool link 2024-01-02 16:35:01 -06:00
keyan e20adaebdc pwa prompt on iOS 2023-12-27 19:06:12 -06:00
keyan 10203f565c territories 2023-12-04 21:34:06 -06:00
ekzyis 8566644ea1
Add QR code scanner for withdrawal invoices (#600)
Co-authored-by: ekzyis <ek@stacker.news>
2023-11-08 18:55:06 -06:00
keyan cf5b296a9f add prism logo 2023-09-26 16:44:57 -05:00
keyan ccb1c07c3f use code icon for contibutors 2023-09-18 14:17:22 -05:00
keyan 7235a4a54f restyle ad to be clearer 2023-08-16 17:53:51 -05:00
keyan 68f298fc21 add simple badge to ad 2023-08-16 14:39:01 -05:00
keyan e4831e65d5 show sources and history of rewards 2023-08-15 12:41:51 -05:00
ekzyis b9461b7eb3
Allow zapping, posting and commenting without funds or an account (#336)
* Add anon zaps

* Add anon comments and posts (link, discussion, poll)

* Use payment hash instead of invoice id as proof of payment

Our invoice IDs can be enumerated.
So there is a - even though very rare - chance that an attacker could find a paid invoice which is not used yet and use it for himself.
Random payment hashes prevent this.

Also, since we delete invoices after use, using database IDs as proof of payments are not suitable.
If a user tells us an invoice ID after we deleted it, we can no longer tell if the invoice was paid or not since the LN node only knows about payment hashes but nothing about the database IDs.

* Allow pay per invoice for stackers

The modal which pops up if the stacker does not have enough sats now has two options: "fund wallet" and "pay invoice"

* Fix onSuccess called twice

For some reason, when calling `showModal`, `useMemo` in modal.js and the code for the modal component (here: <Invoice>) is called twice.

This leads to the `onSuccess` callback being called twice and one failing since the first one deletes the invoice.

* Keep invoice modal open if focus is lost

* Skip anon user during trust calculation

* Add error handling

* Skip 'invoice not found' errors

* Remove duplicate insufficient funds handling

* Fix insufficient funds error detection

* Fix invoice amount for comments

* Allow pay per invoice for bounty and job posts

* Also strike on payment after short press

* Fix unexpected token 'export'

* Fix eslint

* Remove unused id param

* Fix comment copy-paste error

* Rename to useInvoiceable

* Fix unexpected token 'export'

* Fix onConfirmation called at every render

* Add invoice HMAC

This prevents entities which know the invoice hash (like all LN nodes on the payment path) from using the invoice hash on SN.

Only the user which created the invoice knows the HMAC and thus can use the invoice hash.

* make anon posting less hidden, add anon info button explainer

* Fix anon users can't zap other anon users

* Always show repeat and contacts on action error

* Keep track of modal stack

* give anon an icon

* add generic date pivot helper

* make anon user's invoices expire in 5 minutes

* fix forgotten find and replace

* use datePivot more places

* add sat amounts to invoices

* reduce anon invoice expiration to 3 minutes

* don't abbreviate

* Fix [object Object] as error message

Any errors thrown here are already objects of shape { message: string }

* Fix empty invoice creation attempts

I stumbled across this while checking if anons can edit their items.

I monkey patched the code to make it possible (so they can see the 'edit' button) and tried to edit an item but I got this error:

  Variable "$amount" of required type "Int!" was not provided.

I fixed this even though this function should never be called without an amount anyway. It will return a sane error in that case now.

* anon func mods, e.g. inv limits

* anon tips should be denormalized

* remove redundant meTotalSats

* correct overlay zap text for anon

* exclude anon from trust graph before algo runs

* remove balance limit on anon

* give anon a bio and remove cowboy hat/top stackers;

* make anon hat appear on profile

* concat hash and hmac and call it a token

* Fix localStorage cleared because error were swallowed

* fix qr layout shift

* restyle fund error modal

* Catch invoice errors in fund error modal

* invoice check backoff

* anon info typo

* make invoice expiration times have saner defaults

* add comma to anon info

* use builtin copy input label

---------

Co-authored-by: ekzyis <ek@stacker.news>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2023-08-11 18:50:57 -05:00
ekzyis 7369bd819d
Add nostr login (#367)
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2023-08-07 19:50:01 -05:00
keyan 59f7b6ff26 Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades""
This reverts commit 18910fa2ed.
2023-07-23 10:08:43 -05:00
keyan 18910fa2ed Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"
This reverts commit d0314ab73c.
2023-07-23 09:16:12 -05:00
keyan d0314ab73c shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades 2023-07-21 17:33:11 -05:00
keyan 3c711b6083 enhance image detection and proxy 2023-07-13 15:18:04 -05:00
keyan 747371a4e4 snl live banner 2023-06-20 09:57:06 -05:00
keyan aef1163ea0 add amboss link in footer 2023-05-05 16:22:22 -05:00
keyan 4e817a232d sub related enchancements 2023-05-02 11:55:10 -05:00
ekzyis 7b838cdeb2
Implement bookmarking of posts and comments (#235) 2023-02-16 16:23:59 -06:00
keyan 072e60c954 streaks 2023-02-01 17:40:49 -06:00
Austin Kelsay e13e37744e
stackernews bounties (#227)
bounties
2023-01-26 10:11:55 -06:00
keyan 9644a9f867 slashtags auth 2023-01-18 12:49:20 -06:00
keyan e2d7506ebf lightning login copy 2023-01-10 12:55:17 -06:00
keyan 2080cb896d lexical beta test url 2023-01-05 13:24:09 -06:00
keyan 41226245c5 referrals 2022-12-19 16:27:52 -06:00
keyan dbf66b4dd7 allow lightning animation to be disabled 2022-10-04 17:34:28 -05:00
keyan 7faae425b3 wild west mode 2022-09-21 14:57:36 -05:00
keyan 82280b0966 add polls 2022-07-30 08:51:04 -05:00
keyan cb313429d5 job board enhancements 2022-07-21 17:55:05 -05:00
keyan 70cbdd057a add table of contents 2022-07-18 16:24:28 -05:00
keyan beef34abfa linkable headers 2022-07-17 10:35:50 -05:00
Keyan dd4be45ae8
Merge pull request #161 from kerooke/patch-2
Update notification-4-fill.svg
2022-06-08 16:22:28 -05:00
kerooke 4f9419b374
Update notification-4-fill.svg
The current notification bell icon does not resemble a bell, this change makes the icon easier to identify.
2022-06-07 16:49:57 -04:00
kerooke f748d54260
Update pushpin-fill.svg
The current pin logo is hard to identify as a pin, and is angled in the opposite direction of the other Lightning icons on the site.
2022-06-07 15:23:01 -04:00
keyan 29fb37b763 profile photos 2022-05-16 15:51:22 -05:00
keyan 9abc41b7b2 image uploading backend 2022-05-12 13:44:21 -05:00
keyan 74b191837e refine reply-only notifications 2022-04-21 12:48:27 -05:00
keyan 291eab6ada move notifications to icon 2022-04-19 16:37:05 -05:00
keyan b954186d31 jobs w/o payments yet 2022-02-24 13:05:57 -06:00
keyan cc567d301e search bar ui 2022-01-26 15:43:18 -06:00
keyan 5750537cbd filled pushpin icon in grey 2022-01-10 12:53:51 -06:00
keyan 143f5a3463 better pin icon 2022-01-08 09:30:59 -06:00
keyan c3e6627cea support pinned posts + recurring pins 2022-01-07 10:32:31 -06:00
keyan 1a3fdda382 new bolt 2021-12-05 11:37:55 -06:00
keyan cb3a731785 change tip upvote icon 2021-11-26 13:24:51 -06:00