Commit Graph

2448 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
ekzyis f05b29717a
Fix grammar in autodelete invoices info (#1371) 2024-09-07 10:01:27 -05:00
ekzyis 54f8a61483
Random CSS fixes (#1370)
* Fix missing margin-left for invoice status in /satistics

* Fix margin-bottom not applied in invoice info

* Only apply margin-left if there is something left
2024-09-07 10:01:00 -05:00
k00b 6b27f54502 fix improxy container 2024-09-06 10:04:03 -05:00
Keyan 2f546facb2
get dimensions for video and refactor images (#1366)
* get dimensions for video and refactor images

* improve rendering performance

* more rendering perf enhancements
2024-09-06 09:34:44 -05:00
ekzyis 3f0499b96e
Fix ephemeral events missed (#1367)
* Fix ephemeral events missed

The spec mentions the following:

> for kind n such that 20000 <= n < 30000, events are ephemeral, which means they are not expected to be stored by relays.

This applies to NWC events. This means that we need to subscribe _before_ we publish the request.

See https://github.com/nostr-protocol/nips/blob/master/01.md

* Verify events before accepting them
2024-09-06 08:20:49 -05:00
k00b fe717e0169 fix image/video clicks in notifications 2024-09-04 13:36:56 -05:00
k00b 1cc897a7a3 don't enforce min-width on videos 2024-09-04 11:00:54 -05:00
k00b 5a00f7b825 allow video in CSP 2024-09-04 09:58:05 -05:00
Keyan 07b98c3253
Optout of display of images and video (show them as links) (#1358)
* optout of display of images/video

* fix disableFreebies warning in settings

* preview trusted images

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

---------

Co-authored-by: ekzyis <ek@stacker.news>
2024-09-04 09:23:06 -05:00
Keyan 6f68a700ce
recognize video links (#1357) 2024-09-03 18:35:14 -05:00
Keyan adcf048f4e
improve dupes (#1356) 2024-09-03 14:29:45 -05:00
ekzyis d9024ff837
Reinitialize wallet form if initial values change + fix readOnly hydration error (#1354)
* Reinitialize wallet form if initial values change

This fixes that enabled is not set on first render if only recv is configured

* Remove unnecessary old usage of ClientCheckbox

This isn't needed even without enableReinitialize since for send, enabled is correctly set on first render.

It was needed in the past when we were still validating wallets before enabling them on first page load but now, we simply load the configuration from localStorage which is immediately available on the client.

* Fix readOnly hydration error

* Replace repetitive isMounted logic with useIsClient hook
2024-09-03 09:15:04 -05:00
k00b 69916117b1 refine popover close timing 2024-09-02 18:25:02 -05:00
k00b 67799a508a image loading fixes (fixes #1345) 2024-09-02 18:15:21 -05:00
ekzyis 7428738b23
Update wallets/README.md (#1353)
* Remove warning about send+recv not tested

* Add file comment

* Fix createInvoice description
2024-09-02 17:15:46 -05:00
ekzyis a7066a34cd
Use default-src 'self' a.stacker.news (#1349)
This should fix CSP errors in Firefox because scripts fetched via <link rel="prefetch"> don't use script-src.
2024-09-02 12:58:14 -05:00
ekzyis 07ebc60bc3
Use undefined instead of empty function for onHide (#1348) 2024-09-02 12:57:16 -05:00
ekzyis 5e77106297
Undelete bio items (#1346) 2024-09-02 12:02:47 -05:00
ekzyis c43a171794
Fix onHide is not a function (#1347) 2024-09-02 09:33:17 -05:00
k00b f42344497e update newsletter script 2024-08-31 14:04:49 -05:00
k00b 6dedda577b only queue autowithdraw if a wallet is enabled 2024-08-29 16:13:16 -05:00
k00b b6e4f97668 fix env loading in worker 2024-08-28 09:38:41 -05:00
ekzyis 17da24ce24
Add a.stacker.news to script-src (#1339) 2024-08-28 09:33:26 -05:00
ekzyis ae8cadd4be
Switch NWC from Damus to Primal relay (#1340) 2024-08-28 09:32:29 -05:00
ekzyis 2503a3cb6a
Update wallet security banner (#1338)
* fix condition
* update text
2024-08-27 17:16:41 -05:00
Keyan 3af43d74d3
Update awards.csv 2024-08-27 11:22:34 -05:00
ekzyis 4cec369005
Support Tor for LNbits recv (#1336)
* Add tor support to LNbits recv

* Only return agent
2024-08-27 11:16:02 -05:00
ekzyis d09f7c5427
Fix websocket leaks (#1334) 2024-08-27 11:15:00 -05:00
ekzyis ec6124ca62
NWC hardcoded keys (#1335)
* Include keys.json in NWC container image

* Update NWC ATTACH.md
2024-08-27 11:14:35 -05:00
ekzyis 9f194c5d8e
Fix preimage undefined in wallet logs (#1337)
* Fix preimage undefined in NWC wallet logs

* Return preimage as string
2024-08-27 11:13:52 -05:00
Keyan 266e9a892d
Improve freebies (#1333)
* remove free posts

* deleted and freebie comments are always last
2024-08-26 19:23:07 -05:00
ekzyis cc003a9a3e
Phoenixd send+recv (#1322)
* Add genwallet script

* Add phoenixd as send+recv wallet

* phoenixd passwords are 64 hex chars
2024-08-26 18:20:45 -05:00
k00b 5cfefc1ca8 cancelled failed payment if not showing qr 2024-08-26 13:58:37 -05:00
k00b 5ae3084e53 remove defunct chats from footer 2024-08-26 12:59:39 -05:00
ekzyis 48d0cd1086
Fix full config saved on client on priority change (#1329)
* Fix full config saved on client on priority change

* Fix WebLN disabled on priority change

* Always merge configs
2024-08-25 18:40:55 -05:00
ekzyis 203db13553
Fix cost not shown in comment details (#1330) 2024-08-25 18:40:02 -05:00
k00b 467a9d6a76 fix lnc by always reusing the same lnc object 2024-08-24 18:56:15 -05:00
ekzyis c0de29cb82
Rename NWC primary key column from 'int' to 'id' (#1328) 2024-08-23 10:11:13 -05:00
ekzyis 66cf97e832
Skip wallet tests on priority update (#1327)
* Skip wallet connection tests if only priority is changed

* Fix server priority overrides client priority

* Also add priorityOnly as last argument in generateMutation
2024-08-22 20:08:02 -05:00
ekzyis 382f16643d
Ignore no rows found in disableFreebies (#1326) 2024-08-22 18:09:22 -05:00
ekzyis 82788b35bf
Show item details via context menu (#1325)
* Show item details via context

* Use zappers instead of upvotes

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
2024-08-21 20:35:13 -05:00
ekzyis 896265a4a8
Update QA question in PR template (#1324) 2024-08-21 19:30:06 -05:00
k00b c4a96af5d3 fix crossposting toast 2024-08-21 14:59:28 -05:00
Keyan df62cfb28c
paid action limits (#1323) 2024-08-21 14:45:51 -05:00
ekzyis 67d71ef0c8
Rename LNbits primary key column from 'int' to 'id' (#1321)
* Rename LNbits primary key column from 'int' to 'id'

* fix migration

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: k00b <k00b@stacker.news>
2024-08-21 10:49:48 -05:00
ekzyis 789d7626f7
Support receiving with NWC (#1310)
* Add NWC receives

* Refactor sendPayment+createInvoice with nwcCall function

* Update badge

* Add method support checks

* Add timeout to NWC test invoice

* Fix NWC isConfigured state

All NWC fields are marked as optional but NWC should only be considered configured if one of them is set.

* Fix relay.fetch() throws 'crypto is not defined' in node

nip04.encrypt() was failing in worker because 'crypto is not defined'. Updating to nostr-tools v2.7.2 fixed that.

However, now crypto.randomUUID() in relay.fetch() was throwing 'crypto is not defined'. Importing crypto from 'crypto' fixed that.

However, with the import, randomUUID() does not work so I switched to randomBytes().

Running relay.fetch() now works in browser and node.

* recv must not support pay_invoice

* Fix Relay connection check

* this.url was undefined
* error was an object

* Fix additional isConfigured check runs always

It was meant to only catch false positives, not turn negatives into false positives.

* Rename testConnectServer to testCreateInvoice

* Rename testConnectClient to testSendPayment

* Only run testSendPayment if send is configured

The return value of testSendPayment was used before but it only returned something for LNC.

And for LNC, we only wanted to save the transformation during validation, so it was not needed.

* Always use withTimeout in NWC test functions

* Fix fragment name

* Use get_info command exclusively

* Check permissions more efficiently

* Log NWC request-response flow

* Fix variable name

* Call ws.send after listener is added

* Fix websocket not closed after timeout

* Also check that pay_keysend etc. are not supported

* fix lnc session key save

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: k00b <k00b@stacker.news>
2024-08-21 10:13:27 -05:00
Keyan bc94ec7d28
disable freebies setting (#1320)
* disable freebies setting

* await in disableFreebie resolver + better info modal
2024-08-21 09:37:25 -05:00
k00b 555601c7de no bios in random 2024-08-20 21:12:39 -05:00
k00b 85e91ede47 show only active items with comments on random 2024-08-20 21:09:52 -05:00