stacker.news/api
mzivil 46a0af19eb
Make poll expiration configurable (#860)
* add poll expires at column to Item table

* update upsertPoll mutation for pollExpiresAt param

* use pollExpiresAt to show time left for poll

* correctly pluralize days for timeLeft

* correctly update pollExpiresAt when item is updated to remove poll expiration

* add DateTimePicker and DateTimeInput components to select datetimes

* update pollExpiresAt to be nullable and more than 1 day in the future

* hide time left text if poll has no expiration

* initialize pollExpiresAt with current value or default of 25 hours in the future

we add a one hour time buffer so that the user doesn't get a validation error
for pollExpiresAt if they post their poll within an hour from creation. there's
still a chance they'll hit the validation error but they should see the error
message toast

* add DateTimeInput into the options part of the poll form

add right padding to make room for the "clear" button.

allow field to be cleared (i.e. null pollExpiresAt) to allow
non-ending polls.

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
2024-02-21 12:18:43 -06:00
..
lnd Add docs for local LND setup 2023-05-19 18:28:46 -05:00
models refine module instantiation 2022-04-27 17:06:42 -05:00
resolvers Make poll expiration configurable (#860) 2024-02-21 12:18:43 -06:00
s3 Fix image deletion batch size (#769) 2024-01-28 12:29:56 -06:00
search semantic search 2024-01-15 17:22:57 -06:00
slack Add setting to send diagnostics back to SN (#463) 2023-09-18 18:00:16 -05:00
typeDefs Make poll expiration configurable (#860) 2024-02-21 12:18:43 -06:00
webPush Territory post notifications (#745) 2024-01-11 11:27:54 -06:00
package.json Convert worker to ESM (#500) 2023-09-23 20:19:35 -05:00
ssrApollo.js Add chain fees to price carousel (#658) 2023-12-20 16:06:22 -06:00