Merge branch 'master' into sndev-profiles
This commit is contained in:
commit
501ca3c0a2
@ -154,6 +154,8 @@ We want your help.
|
|||||||
- improvements to development documentation
|
- improvements to development documentation
|
||||||
- helpfulness
|
- helpfulness
|
||||||
|
|
||||||
|
[View a current list of granted awards](awards.csv)
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
## Just in case
|
## Just in case
|
||||||
|
@ -457,7 +457,8 @@ export default {
|
|||||||
LEFT JOIN "Sub" ON "Sub"."name" = "Item"."subName"
|
LEFT JOIN "Sub" ON "Sub"."name" = "Item"."subName"
|
||||||
${joinZapRankPersonalView(me, models)}
|
${joinZapRankPersonalView(me, models)}
|
||||||
${whereClause(
|
${whereClause(
|
||||||
'"Item"."pinId" IS NULL',
|
// in "home" (sub undefined), we want to show pinned items (but without the pin icon)
|
||||||
|
sub ? '"Item"."pinId" IS NULL' : '',
|
||||||
'"Item"."deletedAt" IS NULL',
|
'"Item"."deletedAt" IS NULL',
|
||||||
'"Item"."parentId" IS NULL',
|
'"Item"."parentId" IS NULL',
|
||||||
'"Item".bio = false',
|
'"Item".bio = false',
|
||||||
|
@ -64,6 +64,7 @@ export default gql`
|
|||||||
input SettingsInput {
|
input SettingsInput {
|
||||||
autoDropBolt11s: Boolean!
|
autoDropBolt11s: Boolean!
|
||||||
diagnostics: Boolean!
|
diagnostics: Boolean!
|
||||||
|
noReferralLinks: Boolean!
|
||||||
fiatCurrency: String!
|
fiatCurrency: String!
|
||||||
greeterMode: Boolean!
|
greeterMode: Boolean!
|
||||||
hideBookmarks: Boolean!
|
hideBookmarks: Boolean!
|
||||||
@ -128,6 +129,7 @@ export default gql`
|
|||||||
"""
|
"""
|
||||||
autoDropBolt11s: Boolean!
|
autoDropBolt11s: Boolean!
|
||||||
diagnostics: Boolean!
|
diagnostics: Boolean!
|
||||||
|
noReferralLinks: Boolean!
|
||||||
fiatCurrency: String!
|
fiatCurrency: String!
|
||||||
greeterMode: Boolean!
|
greeterMode: Boolean!
|
||||||
hideBookmarks: Boolean!
|
hideBookmarks: Boolean!
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
name,type,pr id,issue ids,difficulty,priority,changes requested,notes,amount,receive method,date paid
|
name,type,pr id,issue ids,difficulty,priority,changes requested,notes,amount,receive method,date paid
|
||||||
jp-melanson,pr,#898,#680,good-first-issue,,,,20k,jpmelanson@getalby.com,2024-03-16
|
jp-melanson,pr,#898,#680,good-first-issue,,,,20k,jpmelanson@getalby.com,2024-03-16
|
||||||
NEEDcreations,issue,,#680,good-first-issue,,,,2k,NEEDcreations@stacker.news,2024-03-16
|
NEEDcreations,issue,,#680,good-first-issue,,,,2k,NEEDcreations@stacker.news,2024-03-16
|
||||||
SatsAllDay,docs,#925,,,,,typo,200,weareallsatoshi@getalby.com,2024-03-16
|
SatsAllDay,docs,#925,,,,,typo,100,weareallsatoshi@getalby.com,2024-03-16
|
||||||
|
|
@ -9,7 +9,8 @@ import { commentSubTreeRootId } from '../lib/item'
|
|||||||
import { useRouter } from 'next/router'
|
import { useRouter } from 'next/router'
|
||||||
|
|
||||||
const referrurl = (ipath, me) => {
|
const referrurl = (ipath, me) => {
|
||||||
const path = `${ipath}${me ? `/r/${me.name}` : ''}`
|
const referral = me && !me.privates?.noReferralLinks
|
||||||
|
const path = `${ipath}${referral ? `/r/${me.name}` : ''}`
|
||||||
if (!SSR) {
|
if (!SSR) {
|
||||||
return `${window.location.protocol}//${window.location.host}${path}`
|
return `${window.location.protocol}//${window.location.host}${path}`
|
||||||
}
|
}
|
||||||
|
@ -80,8 +80,8 @@ export default memo(function Text ({ rel, imgproxyUrls, children, tab, itemId, o
|
|||||||
|
|
||||||
const Heading = useCallback(({ children, node, ...props }) => {
|
const Heading = useCallback(({ children, node, ...props }) => {
|
||||||
const [copied, setCopied] = useState(false)
|
const [copied, setCopied] = useState(false)
|
||||||
const id = useMemo(() =>
|
const nodeText = toString(node)
|
||||||
noFragments ? undefined : slugger?.slug(toString(node).replace(/[^\w\-\s]+/gi, '')), [node, noFragments, slugger])
|
const id = useMemo(() => noFragments ? undefined : slugger?.slug(nodeText.replace(/[^\w\-\s]+/gi, '')), [nodeText, noFragments, slugger])
|
||||||
const h = useMemo(() => {
|
const h = useMemo(() => {
|
||||||
if (topLevel) {
|
if (topLevel) {
|
||||||
return node?.TagName
|
return node?.TagName
|
||||||
|
@ -12,6 +12,7 @@ export const ME = gql`
|
|||||||
privates {
|
privates {
|
||||||
autoDropBolt11s
|
autoDropBolt11s
|
||||||
diagnostics
|
diagnostics
|
||||||
|
noReferralLinks
|
||||||
fiatCurrency
|
fiatCurrency
|
||||||
greeterMode
|
greeterMode
|
||||||
hideCowboyHat
|
hideCowboyHat
|
||||||
@ -87,6 +88,7 @@ export const SETTINGS_FIELDS = gql`
|
|||||||
imgproxyOnly
|
imgproxyOnly
|
||||||
hideWalletBalance
|
hideWalletBalance
|
||||||
diagnostics
|
diagnostics
|
||||||
|
noReferralLinks
|
||||||
nostrPubkey
|
nostrPubkey
|
||||||
nostrCrossposting
|
nostrCrossposting
|
||||||
nostrRelays
|
nostrRelays
|
||||||
|
@ -531,6 +531,7 @@ export const settingsSchema = object({
|
|||||||
hideTwitter: boolean(),
|
hideTwitter: boolean(),
|
||||||
hideWalletBalance: boolean(),
|
hideWalletBalance: boolean(),
|
||||||
diagnostics: boolean(),
|
diagnostics: boolean(),
|
||||||
|
noReferralLinks: boolean(),
|
||||||
hideIsContributor: boolean()
|
hideIsContributor: boolean()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -94,7 +94,8 @@ export default function Settings ({ ssrData }) {
|
|||||||
hideBookmarks: settings?.hideBookmarks,
|
hideBookmarks: settings?.hideBookmarks,
|
||||||
hideWalletBalance: settings?.hideWalletBalance,
|
hideWalletBalance: settings?.hideWalletBalance,
|
||||||
diagnostics: settings?.diagnostics,
|
diagnostics: settings?.diagnostics,
|
||||||
hideIsContributor: settings?.hideIsContributor
|
hideIsContributor: settings?.hideIsContributor,
|
||||||
|
noReferralLinks: settings?.noReferralLinks
|
||||||
}}
|
}}
|
||||||
schema={settingsSchema}
|
schema={settingsSchema}
|
||||||
onSubmit={async ({ tipDefault, withdrawMaxFeeDefault, nostrPubkey, nostrRelays, ...values }) => {
|
onSubmit={async ({ tipDefault, withdrawMaxFeeDefault, nostrPubkey, nostrRelays, ...values }) => {
|
||||||
@ -410,6 +411,11 @@ export default function Settings ({ ssrData }) {
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
name='diagnostics'
|
name='diagnostics'
|
||||||
|
groupClassName='mb-0'
|
||||||
|
/>
|
||||||
|
<Checkbox
|
||||||
|
label={<>don't create referral links on copy</>}
|
||||||
|
name='noReferralLinks'
|
||||||
/>
|
/>
|
||||||
<div className='form-label'>content</div>
|
<div className='form-label'>content</div>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
|
@ -0,0 +1,2 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "users" ADD COLUMN "noReferralLinks" BOOLEAN NOT NULL DEFAULT false;
|
@ -98,6 +98,7 @@ model User {
|
|||||||
hideGithub Boolean @default(true)
|
hideGithub Boolean @default(true)
|
||||||
hideNostr Boolean @default(true)
|
hideNostr Boolean @default(true)
|
||||||
hideTwitter Boolean @default(true)
|
hideTwitter Boolean @default(true)
|
||||||
|
noReferralLinks Boolean @default(false)
|
||||||
githubId String?
|
githubId String?
|
||||||
twitterId String?
|
twitterId String?
|
||||||
followers UserSubscription[] @relation("follower")
|
followers UserSubscription[] @relation("follower")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user