From 3858f83106b92f87e59e1f6c2ceb0c83a26c5c29 Mon Sep 17 00:00:00 2001 From: syui Date: Tue, 3 Feb 2026 10:35:37 +0900 Subject: [PATCH] fix social-app patch support page --- ios/patching/002-social-app-ios-lib.patch | 6 +- ios/patching/004-social-app-ios-core.patch | 26 ++-- ios/patching/005-social-app-ios-screens.patch | 113 +++++++++++------- ios/patching/006-social-app-ios-shell.patch | 4 +- ios/patching/007-social-app-ios-misc.patch | 4 +- ...social-app-ios-splash-license-footer.patch | 4 +- ...social-app-ios-bskyweb-support-pages.patch | 52 ++------ 7 files changed, 104 insertions(+), 105 deletions(-) diff --git a/ios/patching/002-social-app-ios-lib.patch b/ios/patching/002-social-app-ios-lib.patch index ee04f7b..1c1eb89 100644 --- a/ios/patching/002-social-app-ios-lib.patch +++ b/ios/patching/002-social-app-ios-lib.patch @@ -38,7 +38,7 @@ index 231447b4f..a44b3da05 100644 -const HELP_DESK_LANG = 'en-us' -export const HELP_DESK_URL = `https://blueskyweb.zendesk.com/hc/${HELP_DESK_LANG}` +const HELP_DESK_LANG = 'ja-jp' -+export const HELP_DESK_URL = 'https://syu.is/about/support/help' ++export const HELP_DESK_URL = '/support/help' export const EMBED_SERVICE = 'https://embed.bsky.app' export const EMBED_SCRIPT = `${EMBED_SERVICE}/static/embed.js` export const BSKY_DOWNLOAD_URL = 'https://bsky.app/download' @@ -102,8 +102,8 @@ index 231447b4f..a44b3da05 100644 export const webLinks = { - tos: `https://bsky.social/about/support/tos`, - privacy: `https://bsky.social/about/support/privacy-policy`, -+ tos: `https://syu.is/about/support/tos`, -+ privacy: `https://syu.is/about/support/privacy-policy`, ++ tos: `/support/tos`, ++ privacy: `/support/privacy-policy`, community: `https://bsky.social/about/support/community-guidelines`, communityDeprecated: `https://bsky.social/about/support/community-guidelines-deprecated`, } diff --git a/ios/patching/004-social-app-ios-core.patch b/ios/patching/004-social-app-ios-core.patch index c4183f3..73513c9 100644 --- a/ios/patching/004-social-app-ios-core.patch +++ b/ios/patching/004-social-app-ios-core.patch @@ -9,7 +9,7 @@ index 2c4d6fa41..b69e2b18d 100644 -prefetchAgeAssuranceConfig() +// // // prefetchAgeAssuranceConfig() prefetchLiveEvents() - + function InnerApp() { diff --git a/src/routes.ts b/src/routes.ts index f325539c7..3e2c7b3eb 100644 @@ -21,11 +21,11 @@ index f325539c7..3e2c7b3eb 100644 Support: '/support', - PrivacyPolicy: '/support/privacy', - TermsOfService: '/support/tos', -+ PrivacyPolicy: 'https://syu.is/about/support/privacy-policy', -+ TermsOfService: 'https://syu.is/about/support/tos', ++ PrivacyPolicy: ['/support/privacy-policy', '/about/support/privacy-policy'], ++ TermsOfService: ['/support/tos', '/about/support/tos'], CommunityGuidelines: '/support/community-guidelines', -+ License: 'https://syu.is/about/support/license', -+ AppInfo: 'https://syu.is/about/support/app', ++ License: ['/support/license', '/about/support/license'], ++ AppInfo: '/support/app', CopyrightPolicy: '/support/copyright', // hashtags Hashtag: '/hashtag/:tag', @@ -35,41 +35,41 @@ index 5c8ce3b97..ee85beb08 100644 +++ b/src/state/session/agent.ts @@ -47,7 +47,8 @@ export function createPublicAgent() { configureModerationForGuest() // Side effect but only relevant for tests - + const agent = new BskyAppAgent({service: PUBLIC_BSKY_SERVICE}) - agent.configureProxy(BLUESKY_PROXY_HEADER.get()) + // Disable proxy for self-hosted environments + // agent.configureProxy(BLUESKY_PROXY_HEADER.get()) return agent } - + @@ -88,7 +89,8 @@ export async function createAgentAndResume( // after session is attached const aa = prefetchAgeAssuranceData({agent}) - + - agent.configureProxy(BLUESKY_PROXY_HEADER.get()) + // Disable proxy for self-hosted environments + // agent.configureProxy(BLUESKY_PROXY_HEADER.get()) - + return agent.prepare({ resolvers: [gates, moderation, aa], @@ -127,7 +129,8 @@ export async function createAgentAndLogin( const moderation = configureModerationForAccount(agent, account) const aa = prefetchAgeAssuranceData({agent}) - + - agent.configureProxy(BLUESKY_PROXY_HEADER.get()) + // Disable proxy for self-hosted environments + // agent.configureProxy(BLUESKY_PROXY_HEADER.get()) - + return agent.prepare({ resolvers: [gates, moderation, aa], @@ -299,7 +302,8 @@ export async function createAgentAndCreateAccount( logger.error(e, {message: `session: failed snoozeEmailConfirmationPrompt`}) } - + - agent.configureProxy(BLUESKY_PROXY_HEADER.get()) + // Disable proxy for self-hosted environments + // agent.configureProxy(BLUESKY_PROXY_HEADER.get()) - + return agent.prepare({ resolvers: [gates, moderation, aa], diff --git a/ios/patching/005-social-app-ios-screens.patch b/ios/patching/005-social-app-ios-screens.patch index 3998040..efd8648 100644 --- a/ios/patching/005-social-app-ios-screens.patch +++ b/ios/patching/005-social-app-ios-screens.patch @@ -7,7 +7,7 @@ index 6b8257b91..48ba7909e 100644 @@ -16,7 +16,7 @@ index 6b8257b91..48ba7909e 100644 @@ -31,7 +31,7 @@ index 77f219e55..53f5e0cc0 100644 - label={_(msg`Bluesky Social Terms of Service`)} - to="https://bsky.social/about/support/tos" + label={_(msg`syu.is Terms of Service`)} -+ to="https://syu.is/about/support/tos" ++ to="/support/tos" style={[a.text_md, a.leading_snug]}> - Bluesky Social Terms of Service + syu.is Terms of Service @@ -42,12 +42,14 @@ diff --git a/src/view/screens/PrivacyPolicy.tsx b/src/view/screens/PrivacyPolicy index a89eaadc4..1da393f03 100644 --- a/src/view/screens/PrivacyPolicy.tsx +++ b/src/view/screens/PrivacyPolicy.tsx -@@ -1,52 +1,13 @@ +@@ -1,52 +1,38 @@ import React from 'react' -import {View} from 'react-native' -import {msg, Trans} from '@lingui/macro' -import {useLingui} from '@lingui/react' --import {useFocusEffect} from '@react-navigation/native' ++import {View, ScrollView} from 'react-native' ++import {msg} from '@lingui/macro' + import {useFocusEffect} from '@react-navigation/native' - -import {usePalette} from '#/lib/hooks/usePalette' -import { @@ -55,31 +57,32 @@ index a89eaadc4..1da393f03 100644 - type NativeStackScreenProps, -} from '#/lib/routes/types' -import {s} from '#/lib/styles' --import {useSetMinimalShellMode} from '#/state/shell' ++import {useLingui} from '@lingui/react' + import {useSetMinimalShellMode} from '#/state/shell' -import {TextLink} from '#/view/com/util/Link' -import {Text} from '#/view/com/util/text/Text' -import {ScrollView} from '#/view/com/util/Views' -+import { WebView } from 'react-native-webview' import * as Layout from '#/components/Layout' -import {ViewHeader} from '../com/util/ViewHeader' -- ++import {Text} from '#/components/Typography' ++import {atoms as a, useTheme} from '#/alf' + -type Props = NativeStackScreenProps -export const PrivacyPolicyScreen = (_props: Props) => { - const pal = usePalette('default') -- const {_} = useLingui() -- const setMinimalShellMode = useSetMinimalShellMode() -- -- useFocusEffect( -- React.useCallback(() => { -- setMinimalShellMode(false) -- }, [setMinimalShellMode]), -- ) -+import {useSetTitle} from '#/lib/hooks/useSetTitle' - +export function PrivacyPolicyScreen() { -+ useSetTitle('Privacy Policy') ++ const t = useTheme() + const {_} = useLingui() + const setMinimalShellMode = useSetMinimalShellMode() +- + useFocusEffect( + React.useCallback(() => { + setMinimalShellMode(false) + }, [setMinimalShellMode]), + ) +- return ( - +- - - - @@ -93,10 +96,23 @@ index a89eaadc4..1da393f03 100644 - /> - - -- ++ ++ ++ ++ ++ {_(msg`Privacy Policy`)} ++ ++ ++ ++ ++ ++ ++ syu.is respects your privacy. We collect minimal data necessary to provide the service. Your posts and interactions are stored on the AT Protocol network. For questions, contact the administrator. ++ + - - -+ ++ ) } @@ -104,12 +120,14 @@ diff --git a/src/view/screens/TermsOfService.tsx b/src/view/screens/TermsOfServi index d843c713c..b81767bd5 100644 --- a/src/view/screens/TermsOfService.tsx +++ b/src/view/screens/TermsOfService.tsx -@@ -1,50 +1,13 @@ +@@ -1,50 +1,38 @@ import React from 'react' -import {View} from 'react-native' -import {msg, Trans} from '@lingui/macro' -import {useLingui} from '@lingui/react' --import {useFocusEffect} from '@react-navigation/native' ++import {View, ScrollView} from 'react-native' ++import {msg} from '@lingui/macro' + import {useFocusEffect} from '@react-navigation/native' - -import {usePalette} from '#/lib/hooks/usePalette' -import { @@ -117,31 +135,33 @@ index d843c713c..b81767bd5 100644 - type NativeStackScreenProps, -} from '#/lib/routes/types' -import {s} from '#/lib/styles' --import {useSetMinimalShellMode} from '#/state/shell' ++import {useLingui} from '@lingui/react' + import {useSetMinimalShellMode} from '#/state/shell' -import {TextLink} from '#/view/com/util/Link' -import {Text} from '#/view/com/util/text/Text' -import {ScrollView} from '#/view/com/util/Views' -+import { WebView } from 'react-native-webview' import * as Layout from '#/components/Layout' -import {ViewHeader} from '../com/util/ViewHeader' -- ++import {Text} from '#/components/Typography' ++import {atoms as a, useTheme} from '#/alf' + -type Props = NativeStackScreenProps -export const TermsOfServiceScreen = (_props: Props) => { - const pal = usePalette('default') - const setMinimalShellMode = useSetMinimalShellMode() -- const {_} = useLingui() -- -- useFocusEffect( -- React.useCallback(() => { -- setMinimalShellMode(false) -- }, [setMinimalShellMode]), -- ) -+import {useSetTitle} from '#/lib/hooks/useSetTitle' - +export function TermsOfServiceScreen() { -+ useSetTitle('Terms of Service') ++ const t = useTheme() + const {_} = useLingui() +- ++ const setMinimalShellMode = useSetMinimalShellMode() + useFocusEffect( + React.useCallback(() => { + setMinimalShellMode(false) + }, [setMinimalShellMode]), + ) +- return ( - +- - - - @@ -153,10 +173,23 @@ index d843c713c..b81767bd5 100644 - text="bsky.social/about/support/tos" - /> - -- ++ ++ ++ ++ ++ {_(msg`Terms of Service`)} ++ ++ ++ ++ ++ ++ ++ By using syu.is, you agree to use the service responsibly. Do not post illegal content, spam, or harass others. The administrator reserves the right to suspend accounts that violate these terms. This service is provided as-is without warranty. ++ + - - -+ ++ ) } diff --git a/ios/patching/006-social-app-ios-shell.patch b/ios/patching/006-social-app-ios-shell.patch index 399df6f..0731048 100644 --- a/ios/patching/006-social-app-ios-shell.patch +++ b/ios/patching/006-social-app-ios-shell.patch @@ -44,13 +44,13 @@ index f76147ccf..36b4d7de1 100644 style={[a.text_md]} label={_(msg`Terms of Service`)} - to="https://bsky.social/about/support/tos"> -+ to="https://syu.is/about/support/tos"> ++ to="/support/tos"> Terms of Service Privacy Policy diff --git a/ios/patching/007-social-app-ios-misc.patch b/ios/patching/007-social-app-ios-misc.patch index 7dc2352..f25533e 100644 --- a/ios/patching/007-social-app-ios-misc.patch +++ b/ios/patching/007-social-app-ios-misc.patch @@ -20,13 +20,13 @@ index 8365057e8..59c8506a2 100644 terms: { overridePresentation: false, - to: `https://bsky.social/about/support/tos`, -+ to: `https://syu.is/about/support/tos`, ++ to: `/support/tos`, label: _(msg`Terms of Service`), }, privacy: { overridePresentation: false, - to: `https://bsky.social/about/support/privacy-policy`, -+ to: `https://syu.is/about/support/privacy-policy`, ++ to: `/support/privacy-policy`, label: _(msg`Privacy Policy`), }, copyright: { diff --git a/ios/patching/011-social-app-ios-splash-license-footer.patch b/ios/patching/011-social-app-ios-splash-license-footer.patch index 71ec697..f8fe46a 100644 --- a/ios/patching/011-social-app-ios-splash-license-footer.patch +++ b/ios/patching/011-social-app-ios-splash-license-footer.patch @@ -5,7 +5,7 @@ index 3442d1bdf..8ed9e3d0d 100644 @@ -1,5 +1,6 @@ import {useMemo} from 'react' -import {Image as RNImage, View} from 'react-native' -+import {Image as RNImage, View, Pressable, Linking} from 'react-native' ++import {Image as RNImage, View, Pressable} from 'react-native' +import {Text} from '#/components/Typography' import Animated, {FadeIn, FadeOut} from 'react-native-reanimated' import {Image} from 'expo-image' @@ -15,7 +15,7 @@ index 3442d1bdf..8ed9e3d0d 100644 + -+ Linking.openURL('https://syu.is/about/support/license')}> ++ navigation.navigate('License')}> +