@@ -9,9 +9,16 @@ import {
9
9
useInAppBrowser ,
10
10
useSetInAppBrowser ,
11
11
} from '#/state/preferences/in-app-browser'
12
+ import {
13
+ useOptOutOfUtm ,
14
+ useSetOptOutOfUtm ,
15
+ } from '#/state/preferences/opt-out-of-utm'
12
16
import * as SettingsList from '#/screens/Settings/components/SettingsList'
17
+ import { atoms as a } from '#/alf'
18
+ import { Admonition } from '#/components/Admonition'
13
19
import * as Toggle from '#/components/forms/Toggle'
14
20
import { Bubbles_Stroke2_Corner2_Rounded as BubblesIcon } from '#/components/icons/Bubble'
21
+ import { ChainLink3_Stroke2_Corner0_Rounded as ChainLinkIcon } from '#/components/icons/ChainLink'
15
22
import { Hashtag_Stroke2_Corner0_Rounded as HashtagIcon } from '#/components/icons/Hashtag'
16
23
import { Home_Stroke2_Corner2_Rounded as HomeIcon } from '#/components/icons/Home'
17
24
import { Macintosh_Stroke2_Corner2_Rounded as MacintoshIcon } from '#/components/icons/Macintosh'
@@ -29,6 +36,8 @@ export function ContentAndMediaSettingsScreen({}: Props) {
29
36
const setAutoplayDisabledPref = useSetAutoplayDisabled ( )
30
37
const inAppBrowserPref = useInAppBrowser ( )
31
38
const setUseInAppBrowser = useSetInAppBrowser ( )
39
+ const optOutOfUtm = useOptOutOfUtm ( )
40
+ const setOptOutOfUtm = useSetOptOutOfUtm ( )
32
41
33
42
return (
34
43
< Layout . Screen >
@@ -68,6 +77,19 @@ export function ContentAndMediaSettingsScreen({}: Props) {
68
77
</ SettingsList . ItemText >
69
78
</ SettingsList . LinkItem >
70
79
< SettingsList . Divider />
80
+ < Toggle . Item
81
+ name = "disable_autoplay"
82
+ label = { _ ( msg `Autoplay videos and GIFs` ) }
83
+ value = { ! autoplayDisabledPref }
84
+ onChange = { value => setAutoplayDisabledPref ( ! value ) } >
85
+ < SettingsList . Item >
86
+ < SettingsList . ItemIcon icon = { PlayIcon } />
87
+ < SettingsList . ItemText >
88
+ < Trans > Autoplay videos and GIFs</ Trans >
89
+ </ SettingsList . ItemText >
90
+ < Toggle . Platform />
91
+ </ SettingsList . Item >
92
+ </ Toggle . Item >
71
93
{ isNative && (
72
94
< Toggle . Item
73
95
name = "use_in_app_browser"
@@ -83,19 +105,31 @@ export function ContentAndMediaSettingsScreen({}: Props) {
83
105
</ SettingsList . Item >
84
106
</ Toggle . Item >
85
107
) }
86
- < Toggle . Item
87
- name = "disable_autoplay"
88
- label = { _ ( msg `Autoplay videos and GIFs` ) }
89
- value = { ! autoplayDisabledPref }
90
- onChange = { value => setAutoplayDisabledPref ( ! value ) } >
108
+ { isNative && < SettingsList . Divider /> }
109
+ { isNative && (
110
+ < Toggle . Item
111
+ name = "allow_utm"
112
+ label = { _ ( msg `Specify Bluesky as a referer` ) }
113
+ value = { ! ( optOutOfUtm ?? false ) }
114
+ onChange = { value => setOptOutOfUtm ( ! value ) } >
115
+ < SettingsList . Item >
116
+ < SettingsList . ItemIcon icon = { ChainLinkIcon } />
117
+ < SettingsList . ItemText >
118
+ < Trans > Send Bluesky referrer</ Trans >
119
+ </ SettingsList . ItemText >
120
+ < Toggle . Platform />
121
+ </ SettingsList . Item >
122
+ </ Toggle . Item >
123
+ ) }
124
+ { isNative && (
91
125
< SettingsList . Item >
92
- < SettingsList . ItemIcon icon = { PlayIcon } / >
93
- < SettingsList . ItemText >
94
- < Trans > Autoplay videos and GIFs </ Trans >
95
- </ SettingsList . ItemText >
96
- < Toggle . Platform / >
126
+ < Admonition type = "info" style = { [ a . flex_1 ] } >
127
+ < Trans >
128
+ Helps external sites estimate traffic from Bluesky.
129
+ </ Trans >
130
+ </ Admonition >
97
131
</ SettingsList . Item >
98
- </ Toggle . Item >
132
+ ) }
99
133
</ SettingsList . Container >
100
134
</ Layout . Content >
101
135
</ Layout . Screen >
0 commit comments