users? => stackers?
This commit is contained in:
parent
4e9138dfdc
commit
e8aa0a4dae
|
@ -25,7 +25,7 @@ The site is written in javascript using Next.js, a React framework. The backend
|
|||
There are two. 1. the web app and 2. the worker, which dequeues jobs sent to it by the web app, e.g. polling lnd for invoice/payment status
|
||||
|
||||
# wallet transaction safety
|
||||
To ensure user balances are kept sane, all wallet updates are run in serializable transactions at the database level. Because prisma has relatively poor support for transactions all wallet touching code is written in plpgsql stored procedures and can be found in the prisma/migrations folder.
|
||||
To ensure stackers balances are kept sane, all wallet updates are run in serializable transactions at the database level. Because prisma has relatively poor support for transactions all wallet touching code is written in plpgsql stored procedures and can be found in the prisma/migrations folder.
|
||||
|
||||
# code
|
||||
The code is linted with standardjs.
|
||||
|
|
|
@ -34,7 +34,7 @@ export default function AdvPostForm ({ edit }) {
|
|||
<li>i.e. boost votes fall out of ranking faster</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>100% of sats from boost are given back to top users as rewards</li>
|
||||
<li>100% of sats from boost are given back to top stackers as rewards</li>
|
||||
</ol>
|
||||
</Info>
|
||||
</div>
|
||||
|
@ -46,7 +46,7 @@ export default function AdvPostForm ({ edit }) {
|
|||
<InputUserSuggest
|
||||
label={<>forward sats to</>}
|
||||
name='forward'
|
||||
hint={<span className='text-muted'>100% of sats will be sent to this user</span>}
|
||||
hint={<span className='text-muted'>100% of sats will be sent to this stacker</span>}
|
||||
prepend={<InputGroup.Text>@</InputGroup.Text>}
|
||||
showValid
|
||||
/>
|
||||
|
|
|
@ -179,9 +179,9 @@ const AnalyticsPopover = (
|
|||
visitors
|
||||
</a>
|
||||
<span className='mx-2 text-muted'> \ </span>
|
||||
<Link href='/users/day' passHref>
|
||||
<Link href='/stackers/day' passHref>
|
||||
<a className='nav-link p-0 d-inline-flex'>
|
||||
users
|
||||
stackers
|
||||
</a>
|
||||
</Link>
|
||||
</Popover.Content>
|
||||
|
|
|
@ -33,7 +33,7 @@ export default function ItemInfo ({ item, pendingSats, full, commentsText, class
|
|||
<div className={className || `${styles.other}`}>
|
||||
{!item.position &&
|
||||
<>
|
||||
<span title={`from ${item.upvotes} users ${item.mine ? `\\ ${item.meSats} sats to post` : `(${item.meSats + pendingSats} sats from me)`} `}>{abbrNum(item.sats + pendingSats)} sats</span>
|
||||
<span title={`from ${item.upvotes} stackers ${item.mine ? `\\ ${item.meSats} sats to post` : `(${item.meSats + pendingSats} sats from me)`} `}>{abbrNum(item.sats + pendingSats)} sats</span>
|
||||
<span> \ </span>
|
||||
</>}
|
||||
{item.boost > 0 &&
|
||||
|
|
|
@ -129,7 +129,7 @@ function EarnNotification ({ n }) {
|
|||
{n.sources.tipComments > 0 && <span>{(n.sources.comments > 0 || n.sources.posts > 0 || n.sources.tipPosts > 0) && ' \\ '}{n.sources.tipComments} sats for zapping top comments early</span>}
|
||||
</div>}
|
||||
<div className='pb-1' style={{ lineHeight: '140%' }}>
|
||||
SN distributes the sats it earns back to its best users daily. These sats come from <Link href='/~jobs' passHref><a>jobs</a></Link>, boosts, posting fees, and donations. You can see the daily rewards pool and make a donation <Link href='/rewards' passHref><a>here</a></Link>.
|
||||
SN distributes the sats it earns back to its best stackers daily. These sats come from <Link href='/~jobs' passHref><a>jobs</a></Link>, boosts, posting fees, and donations. You can see the daily rewards pool and make a donation <Link href='/rewards' passHref><a>here</a></Link>.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -142,7 +142,7 @@ function Invitification ({ n }) {
|
|||
return (
|
||||
<NotificationLayout onClick={() => router.push('/invites')}>
|
||||
<small className='font-weight-bold text-secondary ml-2'>
|
||||
your invite has been redeemed by {n.invite.invitees.length} users
|
||||
your invite has been redeemed by {n.invite.invitees.length} stackers
|
||||
</small>
|
||||
<div className='ml-4 mr-2 mt-1'>
|
||||
<Invite
|
||||
|
|
|
@ -30,10 +30,10 @@ export default function Search ({ sub }) {
|
|||
}
|
||||
|
||||
if (values.q?.trim() !== '') {
|
||||
if (values.what === 'users') {
|
||||
if (values.what === 'stackers') {
|
||||
await router.push({
|
||||
pathname: '/users/search',
|
||||
query: { q, what: 'users' }
|
||||
pathname: '/stackers/search',
|
||||
query: { q, what: 'stackers' }
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -73,9 +73,9 @@ export default function Search ({ sub }) {
|
|||
onChange={(formik, e) => search({ ...formik?.values, what: e.target.value })}
|
||||
name='what'
|
||||
size='sm'
|
||||
items={['all', 'posts', 'comments', 'users']}
|
||||
items={['all', 'posts', 'comments', 'stackers']}
|
||||
/>
|
||||
{router.query.what !== 'users' &&
|
||||
{router.query.what !== 'stackers' &&
|
||||
<>
|
||||
by
|
||||
<Select
|
||||
|
|
|
@ -21,8 +21,8 @@ export default function TopHeader ({ sub, cat }) {
|
|||
|
||||
if (typeof query.sort !== 'undefined') {
|
||||
if (query.sort === '' ||
|
||||
(what === 'users' && !USER_SORTS.includes(query.sort)) ||
|
||||
(what !== 'users' && !ITEM_SORTS.includes(query.sort))) {
|
||||
(what === 'stackers' && !USER_SORTS.includes(query.sort)) ||
|
||||
(what !== 'stackers' && !ITEM_SORTS.includes(query.sort))) {
|
||||
delete query.sort
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ export default function TopHeader ({ sub, cat }) {
|
|||
onChange={(formik, e) => top({ ...formik?.values, what: e.target.value })}
|
||||
name='what'
|
||||
size='sm'
|
||||
items={router?.query?.sub ? ['posts', 'comments'] : ['posts', 'comments', 'users', 'cowboys']}
|
||||
items={router?.query?.sub ? ['posts', 'comments'] : ['posts', 'comments', 'stackers', 'cowboys']}
|
||||
/>
|
||||
{cat !== 'cowboys' &&
|
||||
<>
|
||||
|
@ -61,7 +61,7 @@ export default function TopHeader ({ sub, cat }) {
|
|||
onChange={(formik, e) => top({ ...formik?.values, sort: e.target.value })}
|
||||
name='sort'
|
||||
size='sm'
|
||||
items={cat === 'users' ? USER_SORTS : ITEM_SORTS}
|
||||
items={cat === 'stackers' ? USER_SORTS : ITEM_SORTS}
|
||||
/>
|
||||
for
|
||||
<Select
|
||||
|
|
|
@ -11,14 +11,14 @@ export function UsageHeader () {
|
|||
}}
|
||||
>
|
||||
<div className='text-muted font-weight-bold my-3 d-flex align-items-center'>
|
||||
user analytics for
|
||||
stacker analytics for
|
||||
<Select
|
||||
groupClassName='mb-0 ml-2'
|
||||
className='w-auto'
|
||||
name='when'
|
||||
size='sm'
|
||||
items={['day', 'week', 'month', 'year', 'forever']}
|
||||
onChange={(formik, e) => router.push(`/users/${e.target.value}`)}
|
||||
onChange={(formik, e) => router.push(`/stackers/${e.target.value}`)}
|
||||
/>
|
||||
</div>
|
||||
</Form>
|
||||
|
|
|
@ -77,7 +77,7 @@ export function advPostSchemaMembers (client) {
|
|||
if (!name || !name.length) return true
|
||||
return await usernameExists(client, name)
|
||||
},
|
||||
message: 'user does not exist'
|
||||
message: 'stacker does not exist'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ export default function User ({ data: { user } }) {
|
|||
size='md' variant='secondary'
|
||||
>create bio
|
||||
</Button>
|
||||
<small className='d-block mt-3 text-muted'>your bio is also a post introducing yourself to other users</small>
|
||||
<small className='d-block mt-3 text-muted'>your bio is also a post introducing yourself to other stackers</small>
|
||||
</div>
|
||||
)}
|
||||
</div>)}
|
||||
|
|
|
@ -285,7 +285,7 @@ const newUserHtml = ({ url, site, email }) => {
|
|||
const dailyUrl = replaceCb('/daily')
|
||||
const guideUrl = replaceCb('/guide')
|
||||
const faqUrl = replaceCb('/faq')
|
||||
const topUrl = replaceCb('/top/users/forever')
|
||||
const topUrl = replaceCb('/top/stackers/forever')
|
||||
const postUrl = replaceCb('/post')
|
||||
|
||||
// Some simple styling options
|
||||
|
|
|
@ -92,7 +92,7 @@ function Detail ({ fact }) {
|
|||
return (
|
||||
<>
|
||||
<div className={satusClass(fact.status)}>
|
||||
SN distributes the sats it earns back to its best users daily. These sats come from <Link href='/~jobs' passHref><a>jobs</a></Link>, boosts, posting fees, and donations. You can see the daily rewards pool and make a donation <Link href='/rewards' passHref><a>here</a></Link>.
|
||||
SN distributes the sats it earns back to its best stackers daily. These sats come from <Link href='/~jobs' passHref><a>jobs</a></Link>, boosts, posting fees, and donations. You can see the daily rewards pool and make a donation <Link href='/rewards' passHref><a>here</a></Link>.
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
|
|
|
@ -204,7 +204,7 @@ export default function Settings ({ data: { settings } }) {
|
|||
groupClassName='mb-0'
|
||||
/>
|
||||
<Checkbox
|
||||
label={<>hide me from <Link href='/top/users/day' passHref><a>top users</a></Link></>}
|
||||
label={<>hide me from <Link href='/top/stackers/day' passHref><a>top stackers</a></Link></>}
|
||||
name='hideFromTopUsers'
|
||||
groupClassName='mb-0'
|
||||
/>
|
||||
|
@ -233,7 +233,7 @@ export default function Settings ({ data: { settings } }) {
|
|||
<Info>
|
||||
<ul className='font-weight-bold'>
|
||||
<li>see and screen free posts and comments</li>
|
||||
<li>help onboard users to SN and Lightning</li>
|
||||
<li>help onboard new stackers to SN and Lightning</li>
|
||||
<li>you might be subject to more spam</li>
|
||||
</ul>
|
||||
</Info>
|
||||
|
|
|
@ -22,7 +22,7 @@ export default function Index ({ data: { topUsers: { users, cursor } } }) {
|
|||
|
||||
return (
|
||||
<Layout>
|
||||
<TopHeader cat='users' />
|
||||
<TopHeader cat='stackers' />
|
||||
<UserList users={users} />
|
||||
<MoreFooter cursor={cursor} fetchMore={fetchMore} Skeleton={UsersSkeleton} />
|
||||
</Layout>
|
Loading…
Reference in New Issue