ai/at
1
0

custom social-app service view

This commit is contained in:
2026-02-16 02:22:13 +09:00
parent 8b26cf9452
commit d77cdc5c0d
3 changed files with 79 additions and 19 deletions

View File

@@ -1,16 +1,13 @@
diff --git a/src/screens/Profile/Header/ProfileHeaderStandard.tsx b/src/screens/Profile/Header/ProfileHeaderStandard.tsx --- a/src/screens/Profile/Header/ProfileHeaderStandard.tsx 2026-02-16 02:12:39
--- a/src/screens/Profile/Header/ProfileHeaderStandard.tsx +++ b/src/screens/Profile/Header/ProfileHeaderStandard.tsx 2026-02-16 02:13:56
+++ b/src/screens/Profile/Header/ProfileHeaderStandard.tsx @@ -1,5 +1,5 @@
@@ -1,25 +1,27 @@
import {memo, useMemo, useState} from 'react' import {memo, useMemo, useState} from 'react'
-import {View} from 'react-native' -import {View} from 'react-native'
+import {Image, Pressable, View} from 'react-native' +import {Image, Pressable, View} from 'react-native'
import { import {
type AppBskyActorDefs, type AppBskyActorDefs,
moderateProfile, moderateProfile,
type ModerationDecision, @@ -9,9 +9,11 @@
type ModerationOpts,
type RichText as RichTextAPI,
} from '@atproto/api' } from '@atproto/api'
import {msg, Trans} from '@lingui/macro' import {msg, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react' import {useLingui} from '@lingui/react'
@@ -22,8 +19,7 @@ diff --git a/src/screens/Profile/Header/ProfileHeaderStandard.tsx b/src/screens/
import {sanitizeDisplayName} from '#/lib/strings/display-names' import {sanitizeDisplayName} from '#/lib/strings/display-names'
import {sanitizeHandle} from '#/lib/strings/handles' import {sanitizeHandle} from '#/lib/strings/handles'
import {logger} from '#/logger' import {logger} from '#/logger'
import {type Shadow, useProfileShadow} from '#/state/cache/profile-shadow' @@ -20,7 +22,7 @@
import {
useProfileBlockMutationQueue, useProfileBlockMutationQueue,
useProfileFollowMutationQueue, useProfileFollowMutationQueue,
} from '#/state/queries/profile' } from '#/state/queries/profile'
@@ -31,10 +27,12 @@ diff --git a/src/screens/Profile/Header/ProfileHeaderStandard.tsx b/src/screens/
+import {useAgent, useRequireAuth, useSession} from '#/state/session' +import {useAgent, useRequireAuth, useSession} from '#/state/session'
import {ProfileMenu} from '#/view/com/profile/ProfileMenu' import {ProfileMenu} from '#/view/com/profile/ProfileMenu'
import {atoms as a, platform, useBreakpoints, useTheme} from '#/alf' import {atoms as a, platform, useBreakpoints, useTheme} from '#/alf'
@@ -45,6 +47,71 @@ import {SubscribeProfileButton} from '#/components/activity-notifications/SubscribeProfileButton'
@@ -45,6 +47,83 @@
import {ProfileHeaderMetrics} from './Metrics'
import {ProfileHeaderShell} from './Shell' import {ProfileHeaderShell} from './Shell'
import {AnimatedProfileHeaderSuggestedFollows} from './SuggestedFollows' import {ProfileHeaderSuggestedFollows} from './SuggestedFollows'
+
+const SERVICE_FAVICONS: Record<string, any> = { +const SERVICE_FAVICONS: Record<string, any> = {
+ 'syui.ai': require('../../../../assets/favicons/syui.ai.png'), + 'syui.ai': require('../../../../assets/favicons/syui.ai.png'),
+ 'bsky.app': require('../../../../assets/favicons/bsky.app.png'), + 'bsky.app': require('../../../../assets/favicons/bsky.app.png'),
@@ -81,17 +79,29 @@ diff --git a/src/screens/Profile/Header/ProfileHeaderStandard.tsx b/src/screens/
+ `https://syui.ai/@${profile.handle}/at/service/${service}`, + `https://syui.ai/@${profile.handle}/at/service/${service}`,
+ ) + )
+ } + }
+ style={[a.flex_row, a.align_center, a.gap_xs]}> + style={[
+ a.flex_row,
+ a.align_center,
+ a.gap_xs,
+ a.rounded_full,
+ t.atoms.bg_contrast_50,
+ {paddingVertical: 6, paddingHorizontal: 10},
+ ]}>
+ <Image + <Image
+ source={ + source={
+ SERVICE_FAVICONS[service] || { + SERVICE_FAVICONS[service] || {
+ uri: `https://www.google.com/s2/favicons?domain=${service}&sz=32`, + uri: `https://www.google.com/s2/favicons?domain=${service}&sz=32`,
+ } + }
+ } + }
+ style={{width: 16, height: 16, borderRadius: 4}} + style={{width: 14, height: 14, borderRadius: 3}}
+ accessibilityIgnoresInvertColors + accessibilityIgnoresInvertColors
+ /> + />
+ <Text style={[a.text_xs, {color: t.palette.primary_500}]}> + <Text
+ style={[
+ a.text_xs,
+ a.font_medium,
+ t.atoms.text_contrast_medium,
+ ]}>
+ {service} + {service}
+ </Text> + </Text>
+ </Pressable> + </Pressable>
@@ -99,11 +109,10 @@ diff --git a/src/screens/Profile/Header/ProfileHeaderStandard.tsx b/src/screens/
+ </View> + </View>
+ ) + )
+} +}
+
interface Props { interface Props {
profile: AppBskyActorDefs.ProfileViewDetailed profile: AppBskyActorDefs.ProfileViewDetailed
descriptionRT: RichTextAPI | null @@ -151,6 +230,7 @@
@@ -150,6 +217,7 @@
{!isPlaceholderProfile && !isBlockedUser && ( {!isPlaceholderProfile && !isBlockedUser && (
<View style={a.gap_md}> <View style={a.gap_md}>
<ProfileHeaderMetrics profile={profile} /> <ProfileHeaderMetrics profile={profile} />

View File

@@ -0,0 +1,50 @@
--- a/src/view/com/posts/PostFeed.tsx 2026-02-16 02:19:59
+++ b/src/view/com/posts/PostFeed.tsx 2026-02-16 02:20:13
@@ -519,16 +519,17 @@
key: 'liveEventFeedsAndTrendingBanner-' + sliceIndex,
})
// Show composer prompt for Discover and Following feeds
- if (
- hasSession &&
- (feedUriOrActorDid === DISCOVER_FEED_URI ||
- feed === 'following')
- ) {
- arr.push({
- type: 'composerPrompt',
- key: 'composerPrompt-' + sliceIndex,
- })
- }
+ // Disabled: hide composer prompt
+ // if (
+ // hasSession &&
+ // (feedUriOrActorDid === DISCOVER_FEED_URI ||
+ // feed === 'following')
+ // ) {
+ // arr.push({
+ // type: 'composerPrompt',
+ // key: 'composerPrompt-' + sliceIndex,
+ // })
+ // }
} else if (sliceIndex === 15) {
if (areVideoFeedsEnabled && !trendingVideoDisabled) {
arr.push({
@@ -545,12 +546,13 @@
} else if (feedKind === 'following') {
if (sliceIndex === 0) {
// Show composer prompt for Following feed
- if (hasSession) {
- arr.push({
- type: 'composerPrompt',
- key: 'composerPrompt-' + sliceIndex,
- })
- }
+ // Disabled: hide composer prompt
+ // if (hasSession) {
+ // arr.push({
+ // type: 'composerPrompt',
+ // key: 'composerPrompt-' + sliceIndex,
+ // })
+ // }
}
} else if (feedKind === 'profile') {
if (sliceIndex === 5) {

View File

@@ -47,6 +47,7 @@ PATCH_FILES_IOS=(
"037-social-app-ios-disable-contacts-nux.patch" "037-social-app-ios-disable-contacts-nux.patch"
"038-social-app-ios-profile-services.patch" "038-social-app-ios-profile-services.patch"
"039-social-app-ios-hide-feed-controls.patch" "039-social-app-ios-hide-feed-controls.patch"
"040-social-app-ios-hide-composer-prompt.patch"
) )
function ios-env() { function ios-env() {