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,7 +23,9 @@ const getColor = (meSats) => {
return Rainbow[idx] return Rainbow[idx]
} }
const UpvotePopover = ({ target, show, handleClose }) => ( const UpvotePopover = ({ target, show, handleClose }) => {
const me = useMe()
return (
<Overlay <Overlay
show={show} show={show}
target={target} target={target}
@ -34,12 +36,13 @@ const UpvotePopover = ({ target, show, handleClose }) => (
<button type='button' className='close' onClick={handleClose}><span aria-hidden='true'>×</span><span className='sr-only'>Close alert</span></button> <button type='button' className='close' onClick={handleClose}><span aria-hidden='true'>×</span><span className='sr-only'>Close alert</span></button>
</Popover.Title> </Popover.Title>
<Popover.Content> <Popover.Content>
<div className='mb-2'>Press the bolt again to tip 1 more sat.</div> <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> <div>Repeatedly press the bolt to tip more sats.</div>
</Popover.Content> </Popover.Content>
</Popover> </Popover>
</Overlay> </Overlay>
) )
}
const TipPopover = ({ target, show, handleClose }) => ( const TipPopover = ({ target, show, handleClose }) => (
<Overlay <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) freeComments Int @default(5)
freePosts Int @default(2) freePosts Int @default(2)
checkedNotesAt DateTime? checkedNotesAt DateTime?
tipDefault Int @default(1) tipDefault Int @default(10)
pubkey String? @unique pubkey String? @unique
trust Float @default(0) trust Float @default(0)
lastSeenAt DateTime? lastSeenAt DateTime?
@ -150,6 +150,7 @@ model Item {
@@index([statusUpdatedAt]) @@index([statusUpdatedAt])
@@index([subName]) @@index([subName])
@@index([pinId]) @@index([pinId])
@@index([path])
} }
enum PostType { enum PostType {