up default tip to 10

This commit is contained in:
keyan 2022-04-12 16:09:12 -05:00
parent 501b7bd941
commit bc9f602d13
4 changed files with 26 additions and 18 deletions

View File

@ -23,23 +23,26 @@ const getColor = (meSats) => {
return Rainbow[idx]
}
const UpvotePopover = ({ target, show, handleClose }) => (
<Overlay
show={show}
target={target}
placement='right'
>
<Popover id='popover-basic'>
<Popover.Title className='d-flex justify-content-between alert-dismissible' as='h3'>Tipping
<button type='button' className='close' onClick={handleClose}><span aria-hidden='true'>×</span><span className='sr-only'>Close alert</span></button>
</Popover.Title>
<Popover.Content>
<div className='mb-2'>Press the bolt again to tip 1 more sat.</div>
<div>Repeatedly press the bolt to tip more sats.</div>
</Popover.Content>
</Popover>
</Overlay>
)
const UpvotePopover = ({ target, show, handleClose }) => {
const me = useMe()
return (
<Overlay
show={show}
target={target}
placement='right'
>
<Popover id='popover-basic'>
<Popover.Title className='d-flex justify-content-between alert-dismissible' as='h3'>Tipping
<button type='button' className='close' onClick={handleClose}><span aria-hidden='true'>×</span><span className='sr-only'>Close alert</span></button>
</Popover.Title>
<Popover.Content>
<div className='mb-2'>Press the bolt again to tip {me?.tipDefault || 1} more sat{me?.tipDefault > 1 ? 's' : ''}.</div>
<div>Repeatedly press the bolt to tip more sats.</div>
</Popover.Content>
</Popover>
</Overlay>
)
}
const TipPopover = ({ target, show, handleClose }) => (
<Overlay

View File

@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "users" ALTER COLUMN "tipDefault" SET DEFAULT 10;

View File

@ -0,0 +1,2 @@
-- AlterIndex
ALTER INDEX "item_gist_path_index" RENAME TO "Item.path_index";

View File

@ -34,7 +34,7 @@ model User {
freeComments Int @default(5)
freePosts Int @default(2)
checkedNotesAt DateTime?
tipDefault Int @default(1)
tipDefault Int @default(10)
pubkey String? @unique
trust Float @default(0)
lastSeenAt DateTime?
@ -150,6 +150,7 @@ model Item {
@@index([statusUpdatedAt])
@@index([subName])
@@index([pinId])
@@index([path])
}
enum PostType {