stacker.news/api/resolvers
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
..
admin.js snl live banner 2023-06-20 09:57:06 -05:00
blockHeight.js Add block height to price carousel (#484) 2023-09-12 10:56:02 -05:00
chainFee.js Add chain fees to price carousel (#658) 2023-12-20 16:06:22 -06:00
growth.js Add ranked territories to 'top' page (#828) 2024-02-14 14:27:00 -06:00
image.js Image uploads (#576) 2023-11-06 14:53:33 -06:00
index.js Add chain fees to price carousel (#658) 2023-12-20 16:06:22 -06:00
invite.js upgrade to prisma 4 2023-07-26 19:18:42 -05:00
item.js Make poll expiration configurable (#860) 2024-02-21 12:18:43 -06:00
lnurl.js gofac yourself 2023-12-14 11:30:51 -06:00
message.js Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
notifications.js Territory post notifications (#745) 2024-01-11 11:27:54 -06:00
ofac.js mute territories 2023-12-30 17:16:09 -06:00
price.js require sub selection, allow editting 2023-05-10 19:30:51 -05:00
referrals.js fix custom dates to use ms since epoch 2023-11-14 10:23:44 -06:00
rewards.js remove debug log message 2023-10-24 14:10:54 -05:00
search.js Improved ux for domain only searches (#782) 2024-02-07 18:45:11 -06:00
serial.js refine serialization retries 2024-01-28 13:26:32 -06:00
sub.js Make territory billing period changeable (#840) 2024-02-16 12:25:12 -06:00
upload.js Image uploads (#576) 2023-11-06 14:53:33 -06:00
user.js fix reference to old materialized view 2024-02-16 12:58:50 -06:00
wallet.js handle other possible base64-like string encodings 2024-02-18 15:08:55 -06:00