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
 | 
			
		||||
- helpfulness
 | 
			
		||||
 | 
			
		||||
[View a current list of granted awards](awards.csv)
 | 
			
		||||
 | 
			
		||||
<br>
 | 
			
		||||
 | 
			
		||||
## Just in case
 | 
			
		||||
 | 
			
		||||
@ -457,7 +457,8 @@ export default {
 | 
			
		||||
                    LEFT JOIN "Sub" ON "Sub"."name" = "Item"."subName"
 | 
			
		||||
                    ${joinZapRankPersonalView(me, models)}
 | 
			
		||||
                    ${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"."parentId" IS NULL',
 | 
			
		||||
                      '"Item".bio = false',
 | 
			
		||||
 | 
			
		||||
@ -64,6 +64,7 @@ export default gql`
 | 
			
		||||
  input SettingsInput {
 | 
			
		||||
    autoDropBolt11s: Boolean!
 | 
			
		||||
    diagnostics: Boolean!
 | 
			
		||||
    noReferralLinks: Boolean!
 | 
			
		||||
    fiatCurrency: String!
 | 
			
		||||
    greeterMode: Boolean!
 | 
			
		||||
    hideBookmarks: Boolean!
 | 
			
		||||
@ -128,6 +129,7 @@ export default gql`
 | 
			
		||||
    """
 | 
			
		||||
    autoDropBolt11s: Boolean!
 | 
			
		||||
    diagnostics: Boolean!
 | 
			
		||||
    noReferralLinks: Boolean!
 | 
			
		||||
    fiatCurrency: String!
 | 
			
		||||
    greeterMode: Boolean!
 | 
			
		||||
    hideBookmarks: Boolean!
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
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
 | 
			
		||||
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'
 | 
			
		||||
 | 
			
		||||
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) {
 | 
			
		||||
    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 [copied, setCopied] = useState(false)
 | 
			
		||||
    const id = useMemo(() =>
 | 
			
		||||
      noFragments ? undefined : slugger?.slug(toString(node).replace(/[^\w\-\s]+/gi, '')), [node, noFragments, slugger])
 | 
			
		||||
    const nodeText = toString(node)
 | 
			
		||||
    const id = useMemo(() => noFragments ? undefined : slugger?.slug(nodeText.replace(/[^\w\-\s]+/gi, '')), [nodeText, noFragments, slugger])
 | 
			
		||||
    const h = useMemo(() => {
 | 
			
		||||
      if (topLevel) {
 | 
			
		||||
        return node?.TagName
 | 
			
		||||
 | 
			
		||||
@ -12,6 +12,7 @@ export const ME = gql`
 | 
			
		||||
      privates {
 | 
			
		||||
        autoDropBolt11s
 | 
			
		||||
        diagnostics
 | 
			
		||||
        noReferralLinks
 | 
			
		||||
        fiatCurrency
 | 
			
		||||
        greeterMode
 | 
			
		||||
        hideCowboyHat
 | 
			
		||||
@ -87,6 +88,7 @@ export const SETTINGS_FIELDS = gql`
 | 
			
		||||
      imgproxyOnly
 | 
			
		||||
      hideWalletBalance
 | 
			
		||||
      diagnostics
 | 
			
		||||
      noReferralLinks
 | 
			
		||||
      nostrPubkey
 | 
			
		||||
      nostrCrossposting
 | 
			
		||||
      nostrRelays
 | 
			
		||||
 | 
			
		||||
@ -531,6 +531,7 @@ export const settingsSchema = object({
 | 
			
		||||
  hideTwitter: boolean(),
 | 
			
		||||
  hideWalletBalance: boolean(),
 | 
			
		||||
  diagnostics: boolean(),
 | 
			
		||||
  noReferralLinks: boolean(),
 | 
			
		||||
  hideIsContributor: boolean()
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -94,7 +94,8 @@ export default function Settings ({ ssrData }) {
 | 
			
		||||
            hideBookmarks: settings?.hideBookmarks,
 | 
			
		||||
            hideWalletBalance: settings?.hideWalletBalance,
 | 
			
		||||
            diagnostics: settings?.diagnostics,
 | 
			
		||||
            hideIsContributor: settings?.hideIsContributor
 | 
			
		||||
            hideIsContributor: settings?.hideIsContributor,
 | 
			
		||||
            noReferralLinks: settings?.noReferralLinks
 | 
			
		||||
          }}
 | 
			
		||||
          schema={settingsSchema}
 | 
			
		||||
          onSubmit={async ({ tipDefault, withdrawMaxFeeDefault, nostrPubkey, nostrRelays, ...values }) => {
 | 
			
		||||
@ -410,6 +411,11 @@ export default function Settings ({ ssrData }) {
 | 
			
		||||
              </div>
 | 
			
		||||
            }
 | 
			
		||||
            name='diagnostics'
 | 
			
		||||
            groupClassName='mb-0'
 | 
			
		||||
          />
 | 
			
		||||
          <Checkbox
 | 
			
		||||
            label={<>don't create referral links on copy</>}
 | 
			
		||||
            name='noReferralLinks'
 | 
			
		||||
          />
 | 
			
		||||
          <div className='form-label'>content</div>
 | 
			
		||||
          <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)
 | 
			
		||||
  hideNostr                 Boolean              @default(true)
 | 
			
		||||
  hideTwitter               Boolean              @default(true)
 | 
			
		||||
  noReferralLinks           Boolean              @default(false)
 | 
			
		||||
  githubId                  String?
 | 
			
		||||
  twitterId                 String?
 | 
			
		||||
  followers                 UserSubscription[]   @relation("follower")
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user