Bluesky app fork with some witchin' additions 💫 witchsky.app
bluesky fork client
141
fork

Configure Feed

Select the types of activity you want to include in your feed.

tweak to disable email verification reminder popup

this also changes the popup a bit for more of a witchsky style, please read the code comments i left in src/alf/tokens.ts and src/components/dialogs/EmailDialog/screens/VerificationReminder.tsx

this does not bypass any feature on bluesky that is locked behind a email verification if the pds is setup that way, this only gets rid of the reminder so if ur using a bluesky pds that doesnt have email verification but fully functions without a verified email, u dont need to get a pointless reminder every day

praying nothing goes wrong, still cant fork the repo

+105 -12
+4 -1
src/Navigation.tsx
··· 43 43 import {bskyTitle} from '#/lib/strings/headings' 44 44 import {logger} from '#/logger' 45 45 import {isNative, isWeb} from '#/platform/detection' 46 + import {useDisableVerifyEmailReminder} from '#/state/preferences/disable-verify-email-reminder' 46 47 import {useUnreadNotifications} from '#/state/queries/notifications/unread' 47 48 import {useSession} from '#/state/session' 48 49 import { ··· 867 868 const emailDialogControl = useEmailDialogControl() 868 869 const closeAllActiveElements = useCloseAllActiveElements() 869 870 871 + const disableVerifyEmailReminder = useDisableVerifyEmailReminder() 872 + 870 873 /** 871 874 * Handle navigation to a conversation, or prepares for account switch. 872 875 * ··· 955 958 956 959 function onReady() { 957 960 prevLoggedRouteName.current = getCurrentRouteName() 958 - if (currentAccount && shouldRequestEmailConfirmation(currentAccount)) { 961 + if (currentAccount && shouldRequestEmailConfirmation(currentAccount) && !disableVerifyEmailReminder) { 959 962 emailDialogControl.open({ 960 963 id: EmailDialogScreenID.VerificationReminder, 961 964 })
+2
src/alf/tokens.ts
··· 7 7 temp_purple_dark: tokens.labelerColor.purple_dark, 8 8 } as const 9 9 10 + // FIXME: some of these should probs be changed up for witchsky branding reasons, they should also work with all the other themes 11 + 10 12 export const gradients = { 11 13 primary: { 12 14 values: [
+7 -2
src/components/dialogs/EmailDialog/screens/VerificationReminder.tsx
··· 24 24 25 25 const dialogPadding = gtMobile ? a.p_2xl.padding : a.p_xl.padding 26 26 27 + // FIXME: the usage of "tokens.gradients.summer" here is temporary, 28 + // its the closest thats built into bluesky that matches witchskys color scheme 29 + // someone, preferbly xan, should edit src/alf/tokens.ts to have proper witchsky colors 30 + // maybe even support all the other themes too? 31 + 27 32 return ( 28 33 <View style={[a.gap_lg]}> 29 34 <View ··· 50 55 borderTopRightRadius: a.rounded_md.borderRadius, 51 56 }, 52 57 ]}> 53 - <GradientFill gradient={tokens.gradients.primary} /> 58 + <GradientFill gradient={tokens.gradients.summer} /> 54 59 <ShieldIcon width={64} fill="white" style={[a.z_10]} /> 55 60 </View> 56 61 </View> ··· 64 69 <Text style={[a.text_sm, a.leading_snug, t.atoms.text_contrast_medium]}> 65 70 <Trans> 66 71 Your email has not yet been verified. Please verify your email in 67 - order to enjoy all the features of Bluesky. 72 + order to enjoy all the features of Witchsky. 68 73 </Trans> 69 74 </Text> 70 75 </View>
+34 -8
src/screens/Settings/DeerSettings.tsx
··· 30 30 useSetDirectFetchRecords, 31 31 } from '#/state/preferences/direct-fetch-records' 32 32 import { 33 + useDisableFollowedByMetrics, 34 + useSetDisableFollowedByMetrics 35 + } from '#/state/preferences/disable-followed-by-metrics' 36 + import { 33 37 useDisableFollowersMetrics, 34 38 useSetDisableFollowersMetrics 35 39 } from '#/state/preferences/disable-followers-metrics' ··· 38 42 useSetDisableFollowingMetrics 39 43 } from '#/state/preferences/disable-following-metrics' 40 44 import { 41 - useDisableFollowedByMetrics, 42 - useSetDisableFollowedByMetrics 43 - } from '#/state/preferences/disable-followed-by-metrics' 44 - import { 45 45 useDisableLikesMetrics, 46 46 useSetDisableLikesMetrics, 47 47 } from '#/state/preferences/disable-likes-metrics' 48 48 import { 49 + useDisablePostsMetrics, 50 + useSetDisablePostsMetrics, 51 + } from '#/state/preferences/disable-posts-metrics' 52 + import { 49 53 useDisableQuotesMetrics, 50 54 useSetDisableQuotesMetrics, 51 55 } from '#/state/preferences/disable-quotes-metrics' ··· 54 58 useSetDisableReplyMetrics, 55 59 } from '#/state/preferences/disable-reply-metrics' 56 60 import { 57 - useDisablePostsMetrics, 58 - useSetDisablePostsMetrics, 59 - } from '#/state/preferences/disable-posts-metrics' 60 - import { 61 61 useDisableRepostsMetrics, 62 62 useSetDisableRepostsMetrics, 63 63 } from '#/state/preferences/disable-reposts-metrics' ··· 65 65 useDisableSavesMetrics, 66 66 useSetDisableSavesMetrics, 67 67 } from '#/state/preferences/disable-saves-metrics' 68 + import { 69 + useDisableVerifyEmailReminder, 70 + useSetDisableVerifyEmailReminder, 71 + } from '#/state/preferences/disable-verify-email-reminder' 68 72 import { 69 73 useDisableViaRepostNotification, 70 74 useSetDisableViaRepostNotification, ··· 319 323 const enableSquareButtons = useEnableSquareButtons() 320 324 const setEnableSquareButtons = useSetEnableSquareButtons() 321 325 326 + const disableVerifyEmailReminder = useDisableVerifyEmailReminder() 327 + const setDisableVerifyEmailReminder = useSetDisableVerifyEmailReminder() 328 + 322 329 const constellationInstance = useConstellationInstance() 323 330 const setConstellationInstanceControl = Dialog.useDialogControl() 324 331 ··· 617 624 </Toggle.LabelText> 618 625 <Toggle.Platform /> 619 626 </Toggle.Item> 627 + 628 + <Toggle.Item 629 + name="disable_verify_email_reminder" 630 + label={_(msg`Disable verify email reminder`)} 631 + value={disableVerifyEmailReminder} 632 + onChange={value => setDisableVerifyEmailReminder(value)} 633 + style={[a.w_full]}> 634 + <Toggle.LabelText style={[a.flex_1]}> 635 + <Trans>Disable verify email reminder</Trans> 636 + </Toggle.LabelText> 637 + <Toggle.Platform /> 638 + </Toggle.Item> 639 + <Admonition type="warning" style={[a.flex_1]}> 640 + <Trans> 641 + This only gets rid of the reminder on app launch, 642 + useful if your PDS does not have email verification setup.\nThis 643 + does NOT give access to features locked behind email verification. 644 + </Trans> 645 + </Admonition> 620 646 </SettingsList.Group> 621 647 622 648 <SettingsList.Group contentContainerStyle={[a.gap_sm]}>
+2
src/state/persisted/schema.ts
··· 158 158 hideSimilarAccountsRecomm: z.boolean().optional(), 159 159 enableSquareAvatars: z.boolean().optional(), 160 160 enableSquareButtons: z.boolean().optional(), 161 + disableVerifyEmailReminder: z.boolean().optional(), 161 162 deerVerification: z 162 163 .object({ 163 164 enabled: z.boolean(), ··· 245 246 hideSimilarAccountsRecomm: true, 246 247 enableSquareAvatars: false, 247 248 enableSquareButtons: false, 249 + disableVerifyEmailReminder: false, 248 250 deerVerification: { 249 251 enabled: false, 250 252 // https://witchsky.app/profile/did:plc:p2cp5gopk7mgjegy6wadk3ep/post/3lndyqyyr4k2k
+52
src/state/preferences/disable-verify-email-reminder.tsx
··· 1 + import React from 'react' 2 + 3 + import * as persisted from '#/state/persisted' 4 + 5 + // Preference: disableVerifyEmailReminder – when true, disables the "verify email" reminder that you get on boot on mobile, useful if you are on a PDS without any email verification setup 6 + 7 + type StateContext = persisted.Schema['disableVerifyEmailReminder'] 8 + // Same setter signature used across other preference modules 9 + type SetContext = (v: persisted.Schema['disableVerifyEmailReminder']) => void 10 + 11 + const stateContext = React.createContext<StateContext>( 12 + persisted.defaults.disableVerifyEmailReminder, 13 + ) 14 + const setContext = React.createContext<SetContext>( 15 + (_: persisted.Schema['disableVerifyEmailReminder']) => {}, 16 + ) 17 + 18 + export function Provider({children}: React.PropsWithChildren<{}>) { 19 + const [state, setState] = React.useState( 20 + persisted.get('disableVerifyEmailReminder'), 21 + ) 22 + 23 + const setStateWrapped = React.useCallback( 24 + (value: persisted.Schema['disableVerifyEmailReminder']) => { 25 + setState(value) 26 + persisted.write('disableVerifyEmailReminder', value) 27 + }, 28 + [setState], 29 + ) 30 + 31 + React.useEffect(() => { 32 + return persisted.onUpdate('disableVerifyEmailReminder', next => { 33 + setState(next) 34 + }) 35 + }, [setStateWrapped]) 36 + 37 + return ( 38 + <stateContext.Provider value={state}> 39 + <setContext.Provider value={setStateWrapped}> 40 + {children} 41 + </setContext.Provider> 42 + </stateContext.Provider> 43 + ) 44 + } 45 + 46 + export function useDisableVerifyEmailReminder() { 47 + return React.useContext(stateContext) 48 + } 49 + 50 + export function useSetDisableVerifyEmailReminder() { 51 + return React.useContext(setContext) 52 + }
+4 -1
src/state/preferences/index.tsx
··· 16 16 import {Provider as DisableReplyMetricsProvider} from './disable-reply-metrics' 17 17 import {Provider as DisableRepostsMetricsProvider} from './disable-reposts-metrics' 18 18 import {Provider as DisableSavesMetricsProvider} from './disable-saves-metrics' 19 + import {Provider as DisableVerifyEmailReminderProvider} from './disable-verify-email-reminder' 19 20 import {Provider as DisableViaRepostNotificationProvider} from './disable-via-repost-notification' 20 21 import {Provider as EnableSquareAvatarsProvider} from './enable-square-avatars' 21 22 import {Provider as EnableSquareButtonsProvider} from './enable-square-buttons' ··· 97 98 <HideSimilarAccountsRecommProvider> 98 99 <EnableSquareAvatarsProvider> 99 100 <EnableSquareButtonsProvider> 100 - {children} 101 + <DisableVerifyEmailReminderProvider> 102 + {children} 103 + </DisableVerifyEmailReminderProvider> 101 104 </EnableSquareButtonsProvider> 102 105 </EnableSquareAvatarsProvider> 103 106 </HideSimilarAccountsRecommProvider>