Compare commits
5 Commits
7c225b22fc
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
16e11575f6
|
|||
|
a25ed0e92c
|
|||
|
d99ca3fd8b
|
|||
|
d735b1f214
|
|||
|
bab1e653d9
|
@@ -11,7 +11,7 @@
|
|||||||
|[at]mosphere|system|pds, bsky(appview), ozone, bgs, plc|
|
|[at]mosphere|system|pds, bsky(appview), ozone, bgs, plc|
|
||||||
|[a]uthenticated [t]ransfer|protocol|[did](https://www.w3.org/TR/did-core/)|
|
|[a]uthenticated [t]ransfer|protocol|[did](https://www.w3.org/TR/did-core/)|
|
||||||
|
|
||||||
- https://atproto.com/ja/guides/glossary
|
- https://atproto.com/guides/glossary
|
||||||
|
|
||||||
## account
|
## account
|
||||||
|
|
||||||
@@ -41,8 +41,8 @@ $ curl -sL "syu.is/xrpc/com.atproto.repo.listRecords?repo=${handle}&collection=a
|
|||||||
|
|
||||||
> at://did:plc:6qyecktefllvenje24fcxnie/app.bsky.feed.generator/app
|
> at://did:plc:6qyecktefllvenje24fcxnie/app.bsky.feed.generator/app
|
||||||
|
|
||||||
- https://syu.is/profile/ai.syui.ai/feed/app
|
- https://syu.is/profile/did:plc:6qyecktefllvenje24fcxnie/feed/app
|
||||||
- https://feed.syu.is/xrpc/app.bsky.feed.getFeedSkeleton?feed=at://did:plc:4hqjfn7m6n5hno3doamuhgef/app.bsky.feed.generator/app
|
- https://feed.syu.is/xrpc/app.bsky.feed.getFeedSkeleton?feed=at://did:plc:6qyecktefllvenje24fcxnie/app.bsky.feed.generator/app
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
|||||||
70
install.zsh
70
install.zsh
@@ -54,10 +54,8 @@ function at-repos-env() {
|
|||||||
dport=5000
|
dport=5000
|
||||||
|
|
||||||
typeset -A PINNED_COMMITS
|
typeset -A PINNED_COMMITS
|
||||||
PINNED_COMMITS=(
|
PINNED_COMMITS=()
|
||||||
[indigo]="d49b454196351c988ceb5ce1f5e21b689487b5ab"
|
#PINNED_COMMITS=( [indigo]="d49b454196351c988ceb5ce1f5e21b689487b5ab" [atproto]="104e6ed37b0589cc000109dc76316be35b2257e1")
|
||||||
[atproto]="104e6ed37b0589cc000109dc76316be35b2257e1"
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Arrays for patch management
|
# Arrays for patch management
|
||||||
@@ -77,6 +75,7 @@ PATCH_FILES=(
|
|||||||
"disable-statsig-sdk.diff"
|
"disable-statsig-sdk.diff"
|
||||||
"140-social-app-yarn-network-timeout.patch"
|
"140-social-app-yarn-network-timeout.patch"
|
||||||
"130-atproto-ozone-enable-daemon-v2.patch"
|
"130-atproto-ozone-enable-daemon-v2.patch"
|
||||||
|
"152-indigo-newpds-dayper-limit-pr707.diff"
|
||||||
"190-bgs-disable-ratelimit.patch"
|
"190-bgs-disable-ratelimit.patch"
|
||||||
"200-feed-generator-custom.patch"
|
"200-feed-generator-custom.patch"
|
||||||
)
|
)
|
||||||
@@ -266,16 +265,21 @@ function at-repos-patch-apply-all() {
|
|||||||
local repo=""
|
local repo=""
|
||||||
|
|
||||||
# Determine repo from filename
|
# Determine repo from filename
|
||||||
|
# Note: check indigo/bgs BEFORE pds to avoid "newpds" matching "pds"
|
||||||
if [[ $filename == *"social-app"* || $filename == *"statsig"* ]]; then
|
if [[ $filename == *"social-app"* || $filename == *"statsig"* ]]; then
|
||||||
repo="social-app"
|
repo="social-app"
|
||||||
|
elif [[ $filename == *"indigo"* || $filename == *"bgs"* ]]; then
|
||||||
|
repo="indigo"
|
||||||
elif [[ $filename == *"atproto"* ]]; then
|
elif [[ $filename == *"atproto"* ]]; then
|
||||||
repo="atproto"
|
repo="atproto"
|
||||||
elif [[ $filename == *"pds"* ]]; then
|
elif [[ $filename == *"pds"* ]]; then
|
||||||
repo="atproto"
|
repo="atproto"
|
||||||
elif [[ $filename == *"indigo"* || $filename == *"bgs"* ]]; then
|
|
||||||
repo="indigo"
|
|
||||||
elif [[ $filename == *"feed"* ]]; then
|
elif [[ $filename == *"feed"* ]]; then
|
||||||
repo="feed-generator"
|
repo="feed-generator"
|
||||||
|
# feed-generatorパッチ適用前に既存のDockerfileを削除(upstreamと競合回避)
|
||||||
|
if [[ $filename == "200-feed-generator-custom.patch" ]]; then
|
||||||
|
rm -f "$d/repos/feed-generator/Dockerfile"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
patch-apply "$title" "$repo" "$filename"
|
patch-apply "$title" "$repo" "$filename"
|
||||||
@@ -331,6 +335,54 @@ export const SOCIAL_APP_DOMAIN =\
|
|||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function at-repos-feed-generator-newfiles() {
|
||||||
|
echo ""
|
||||||
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||||
|
echo "📝 Creating feed-generator new files..."
|
||||||
|
|
||||||
|
# Create app.ts
|
||||||
|
cat > $d/repos/feed-generator/src/algos/app.ts <<'EOF'
|
||||||
|
import { QueryParams } from '../lexicon/types/app/bsky/feed/getFeedSkeleton'
|
||||||
|
import { AppContext } from '../config'
|
||||||
|
|
||||||
|
// max 15 chars
|
||||||
|
export const shortname = 'app'
|
||||||
|
|
||||||
|
export const handler = async (ctx: AppContext, params: QueryParams) => {
|
||||||
|
let builder = ctx.db
|
||||||
|
.selectFrom('post')
|
||||||
|
.selectAll()
|
||||||
|
.orderBy('indexedAt', 'desc')
|
||||||
|
.orderBy('cid', 'desc')
|
||||||
|
.limit(params.limit)
|
||||||
|
|
||||||
|
if (params.cursor) {
|
||||||
|
const timeStr = new Date(parseInt(params.cursor, 10)).toISOString()
|
||||||
|
builder = builder.where('post.indexedAt', '<', timeStr)
|
||||||
|
}
|
||||||
|
const res = await builder.execute()
|
||||||
|
|
||||||
|
const feed = res.map((row) => ({
|
||||||
|
post: row.uri,
|
||||||
|
}))
|
||||||
|
|
||||||
|
let cursor: string | undefined
|
||||||
|
const last = res.at(-1)
|
||||||
|
if (last) {
|
||||||
|
cursor = new Date(last.indexedAt).getTime().toString(10)
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
cursor,
|
||||||
|
feed,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "✅ Created src/algos/app.ts"
|
||||||
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||||
|
}
|
||||||
|
|
||||||
function at-repos-build-docker-atproto() {
|
function at-repos-build-docker-atproto() {
|
||||||
cd $d
|
cd $d
|
||||||
docker image prune -a
|
docker image prune -a
|
||||||
@@ -430,7 +482,7 @@ function at-repos-reset-bgs-db() {
|
|||||||
result=$(curl -s -X POST "https://bgs.${host}/admin/pds/requestCrawl" \
|
result=$(curl -s -X POST "https://bgs.${host}/admin/pds/requestCrawl" \
|
||||||
-H "Authorization: Bearer ${BGS_ADMIN_KEY}" \
|
-H "Authorization: Bearer ${BGS_ADMIN_KEY}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "{\"hostname\":\"{$host}\"}" \
|
-d "{\"hostname\":\"${host}\"}" \
|
||||||
-w "%{http_code}" -o /dev/null)
|
-w "%{http_code}" -o /dev/null)
|
||||||
if [ "$result" = "200" ]; then
|
if [ "$result" = "200" ]; then
|
||||||
echo "✅ PDS crawl requested successfully"
|
echo "✅ PDS crawl requested successfully"
|
||||||
@@ -533,6 +585,7 @@ case "$1" in
|
|||||||
at-repos-social-app-ios-patch
|
at-repos-social-app-ios-patch
|
||||||
at-repos-patch-apply-all
|
at-repos-patch-apply-all
|
||||||
at-repos-ozone-patch
|
at-repos-ozone-patch
|
||||||
|
at-repos-feed-generator-newfiles
|
||||||
show-failed-patches
|
show-failed-patches
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
@@ -561,7 +614,7 @@ esac
|
|||||||
case "`cat /etc/hostname`" in
|
case "`cat /etc/hostname`" in
|
||||||
at)
|
at)
|
||||||
if [ "$1" = "bgs-reset" ];then
|
if [ "$1" = "bgs-reset" ];then
|
||||||
at-repos-reset-bgs-db
|
# at-repos-reset-bgs-db
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
at-repos-pull-docker
|
at-repos-pull-docker
|
||||||
@@ -574,6 +627,7 @@ case "`cat /etc/hostname`" in
|
|||||||
at-repos-social-app-ios-patch
|
at-repos-social-app-ios-patch
|
||||||
at-repos-patch-apply-all
|
at-repos-patch-apply-all
|
||||||
at-repos-ozone-patch
|
at-repos-ozone-patch
|
||||||
|
at-repos-feed-generator-newfiles
|
||||||
show-failed-patches
|
show-failed-patches
|
||||||
at-repos-build-docker-atproto
|
at-repos-build-docker-atproto
|
||||||
at-repos-push-docker
|
at-repos-push-docker
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
今回の./ios (social-app)開発の要点をまとめます。
|
今回の./ios (social-app)開発の要点をまとめます。
|
||||||
|
|
||||||
1. MITのライセンスを遵守すること、iosアプリとして出品しても問題ないようにすること
|
1. MITのライセンスを遵守すること、iosアプリとして出品しても問題ないようにすること
|
||||||
https://raw.githubusercontent.com/bluesky-social/social-app/refs/heads/main/LICENSE
|
|
||||||
|
|
||||||
2. "Bluesky"という名称を使用しないこと。アイコンの変更。リンクの変更
|
2. "Bluesky"という名称を使用しないこと。アイコンの変更。リンクの変更
|
||||||
|
3. selfhostでも動くこと。
|
||||||
|
|
||||||
3. selfhostでも動くこと。これはすでにpatchで実現しています。
|
https://raw.githubusercontent.com/bluesky-social/social-app/refs/heads/main/LICENSE
|
||||||
|
|
||||||
|
|||||||
@@ -78,11 +78,11 @@ function cleanup_build {
|
|||||||
|
|
||||||
# 3. CocoaPods
|
# 3. CocoaPods
|
||||||
echo "3. Installing CocoaPods..."
|
echo "3. Installing CocoaPods..."
|
||||||
# Ensure PATH includes Homebrew ruby gems if needed
|
if [ -z "$1" ];then
|
||||||
export PATH="/opt/homebrew/lib/ruby/gems/3.4.0/bin:$PATH"
|
|
||||||
cd ios
|
cd ios
|
||||||
pod install
|
pod install
|
||||||
cd ..
|
cd ..
|
||||||
|
fi
|
||||||
|
|
||||||
# 4. Signing (Automated)
|
# 4. Signing (Automated)
|
||||||
echo "4. Configuring Xcode Signing..."
|
echo "4. Configuring Xcode Signing..."
|
||||||
@@ -132,6 +132,9 @@ EOF
|
|||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
i)
|
i)
|
||||||
|
echo "Skipping cleanup_build..."
|
||||||
|
;;
|
||||||
|
*)
|
||||||
cleanup_build
|
cleanup_build
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -167,8 +170,15 @@ cp -R ${APP_NAME}.xcarchive/Products/Applications/${APP_NAME}.app Payload/
|
|||||||
# store.mobileprovisionの存在確認とコピー
|
# store.mobileprovisionの存在確認とコピー
|
||||||
# https://developer.apple.com/account/resources/profiles/list
|
# https://developer.apple.com/account/resources/profiles/list
|
||||||
if [ ! -f "$MOBILEPROVISION" ]; then
|
if [ ! -f "$MOBILEPROVISION" ]; then
|
||||||
echo "Error: store.mobileprovision not found at $MOBILEPROVISION"
|
# 親ディレクトリからコピーを試みる
|
||||||
|
PARENT_MOBILEPROVISION="$SCRIPT_DIR/../embedded.mobileprovision"
|
||||||
|
if [ -f "$PARENT_MOBILEPROVISION" ]; then
|
||||||
|
echo "Copying mobileprovision from $PARENT_MOBILEPROVISION to $MOBILEPROVISION"
|
||||||
|
cp "$PARENT_MOBILEPROVISION" "$MOBILEPROVISION"
|
||||||
|
else
|
||||||
|
echo "Error: store.mobileprovision not found at $MOBILEPROVISION or $PARENT_MOBILEPROVISION"
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp "$MOBILEPROVISION" Payload/${APP_NAME}.app/embedded.mobileprovision
|
cp "$MOBILEPROVISION" Payload/${APP_NAME}.app/embedded.mobileprovision
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ index 77f219e55..53f5e0cc0 100644
|
|||||||
- to="https://bsky.social/about/support/tos"
|
- to="https://bsky.social/about/support/tos"
|
||||||
+ label={_(msg`syu.is Terms of Service`)}
|
+ label={_(msg`syu.is Terms of Service`)}
|
||||||
+ to="https://syu.is/about/support/tos"
|
+ to="https://syu.is/about/support/tos"
|
||||||
style={[a.text_md, a.leading_normal]}>
|
style={[a.text_md, a.leading_snug]}>
|
||||||
- Bluesky Social Terms of Service
|
- Bluesky Social Terms of Service
|
||||||
+ syu.is Terms of Service
|
+ syu.is Terms of Service
|
||||||
</SimpleInlineLinkText>
|
</SimpleInlineLinkText>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
diff --git a/src/screens/Settings/Settings.tsx b/src/screens/Settings/Settings.tsx
|
diff --git a/src/screens/Settings/Settings.tsx b/src/screens/Settings/Settings.tsx
|
||||||
index 6b0e184c0..42b609c9e 100644
|
index 2fa5aa7de..3faf6a7b3 100644
|
||||||
--- a/src/screens/Settings/Settings.tsx
|
--- a/src/screens/Settings/Settings.tsx
|
||||||
+++ b/src/screens/Settings/Settings.tsx
|
+++ b/src/screens/Settings/Settings.tsx
|
||||||
@@ -203,24 +203,8 @@ export function SettingsScreen({}: Props) {
|
@@ -205,26 +205,8 @@ export function SettingsScreen({}: Props) {
|
||||||
<Trans>Notifications</Trans>
|
<Trans>Notifications</Trans>
|
||||||
</SettingsList.ItemText>
|
</SettingsList.ItemText>
|
||||||
</SettingsList.LinkItem>
|
</SettingsList.LinkItem>
|
||||||
@@ -14,7 +14,9 @@ index 6b0e184c0..42b609c9e 100644
|
|||||||
- <Trans>Content and media</Trans>
|
- <Trans>Content and media</Trans>
|
||||||
- </SettingsList.ItemText>
|
- </SettingsList.ItemText>
|
||||||
- </SettingsList.LinkItem>
|
- </SettingsList.LinkItem>
|
||||||
- {isNative && findContactsEnabled && (
|
- {isNative &&
|
||||||
|
- findContactsEnabled &&
|
||||||
|
- !gate('disable_settings_find_contacts') && (
|
||||||
- <SettingsList.LinkItem
|
- <SettingsList.LinkItem
|
||||||
- to="/settings/find-contacts"
|
- to="/settings/find-contacts"
|
||||||
- label={_(msg`Find friends from contacts`)}>
|
- label={_(msg`Find friends from contacts`)}>
|
||||||
@@ -24,12 +26,12 @@ index 6b0e184c0..42b609c9e 100644
|
|||||||
- </SettingsList.ItemText>
|
- </SettingsList.ItemText>
|
||||||
- </SettingsList.LinkItem>
|
- </SettingsList.LinkItem>
|
||||||
- )}
|
- )}
|
||||||
+{/* Content and media removed for syu.is */}
|
+ {/* Content and media removed for syu.is */}
|
||||||
+{/* Find friends from contacts removed for syu.is */}
|
+ {/* Find friends from contacts removed for syu.is */}
|
||||||
<SettingsList.LinkItem
|
<SettingsList.LinkItem
|
||||||
to="/settings/appearance"
|
to="/settings/appearance"
|
||||||
label={_(msg`Appearance`)}>
|
label={_(msg`Appearance`)}>
|
||||||
@@ -245,16 +229,6 @@ export function SettingsScreen({}: Props) {
|
@@ -249,16 +231,6 @@ export function SettingsScreen({}: Props) {
|
||||||
<Trans>Languages</Trans>
|
<Trans>Languages</Trans>
|
||||||
</SettingsList.ItemText>
|
</SettingsList.ItemText>
|
||||||
</SettingsList.LinkItem>
|
</SettingsList.LinkItem>
|
||||||
|
|||||||
@@ -1,17 +1,22 @@
|
|||||||
diff --git a/src/ageAssurance/index.tsx b/src/ageAssurance/index.tsx
|
diff --git a/src/ageAssurance/index.tsx b/src/ageAssurance/index.tsx
|
||||||
index 9a0a9c9d5..5a6563e52 100644
|
|
||||||
--- a/src/ageAssurance/index.tsx
|
--- a/src/ageAssurance/index.tsx
|
||||||
+++ b/src/ageAssurance/index.tsx
|
+++ b/src/ageAssurance/index.tsx
|
||||||
@@ -88,19 +88,16 @@ function InnerProvider({children}: {children: React.ReactNode}) {
|
@@ -90,25 +90,16 @@ function InnerProvider({children}: {children: React.ReactNode}) {
|
||||||
return (
|
return (
|
||||||
<AgeAssuranceStateContext.Provider
|
<AgeAssuranceStateContext.Provider
|
||||||
value={useMemo(() => {
|
value={useMemo(() => {
|
||||||
- const chatDisabled = state.access !== AgeAssuranceAccess.Full
|
- const chatDisabled = state.access !== AgeAssuranceAccess.Full
|
||||||
- const isUnderage = data?.birthdate
|
- const isUnderAdultAge = data?.birthdate
|
||||||
- ? isUserUnderAdultAge(data.birthdate)
|
- ? isUnderAge(data.birthdate, 18)
|
||||||
- : true
|
- : true
|
||||||
|
- const isOverRegionMinAccessAge = data?.birthdate
|
||||||
|
- ? !isUnderAge(data.birthdate, config.minAccessAge)
|
||||||
|
- : false
|
||||||
|
- const isOverAppMinAccessAge = data?.birthdate
|
||||||
|
- ? !isUnderAge(data.birthdate, MIN_ACCESS_AGE)
|
||||||
|
- : false
|
||||||
- const adultContentDisabled =
|
- const adultContentDisabled =
|
||||||
- state.access !== AgeAssuranceAccess.Full || isUnderage
|
- state.access !== AgeAssuranceAccess.Full || isUnderAdultAge
|
||||||
return {
|
return {
|
||||||
Access: AgeAssuranceAccess,
|
Access: AgeAssuranceAccess,
|
||||||
Status: AgeAssuranceStatus,
|
Status: AgeAssuranceStatus,
|
||||||
@@ -23,8 +28,12 @@ index 9a0a9c9d5..5a6563e52 100644
|
|||||||
flags: {
|
flags: {
|
||||||
- adultContentDisabled,
|
- adultContentDisabled,
|
||||||
- chatDisabled,
|
- chatDisabled,
|
||||||
|
- isOverRegionMinAccessAge,
|
||||||
|
- isOverAppMinAccessAge,
|
||||||
+ adultContentDisabled: false,
|
+ adultContentDisabled: false,
|
||||||
+ chatDisabled: false,
|
+ chatDisabled: false,
|
||||||
|
+ isOverRegionMinAccessAge: true,
|
||||||
|
+ isOverAppMinAccessAge: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}, [state, data])}>
|
}, [state, data, config])}>
|
||||||
|
|||||||
@@ -1,21 +1,35 @@
|
|||||||
diff --git a/src/screens/Signup/StepInfo/index.tsx b/src/screens/Signup/StepInfo/index.tsx
|
|
||||||
--- a/src/screens/Signup/StepInfo/index.tsx
|
--- a/src/screens/Signup/StepInfo/index.tsx
|
||||||
+++ b/src/screens/Signup/StepInfo/index.tsx
|
+++ b/src/screens/Signup/StepInfo/index.tsx
|
||||||
@@ -7,11 +7,9 @@
|
@@ -9,44 +9,17 @@
|
||||||
|
|
||||||
import {isEmailMaybeInvalid} from '#/lib/strings/email'
|
|
||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
-import {is13, is18, useSignupContext} from '#/screens/Signup/state'
|
import {isNative} from '#/platform/detection'
|
||||||
+import {useSignupContext} from '#/screens/Signup/state'
|
import {useSignupContext} from '#/screens/Signup/state'
|
||||||
import {Policies} from '#/screens/Signup/StepInfo/Policies'
|
-import {Policies} from '#/screens/Signup/StepInfo/Policies'
|
||||||
import {atoms as a, native} from '#/alf'
|
import {atoms as a, native} from '#/alf'
|
||||||
|
-import * as Admonition from '#/components/Admonition'
|
||||||
|
-import * as Dialog from '#/components/Dialog'
|
||||||
|
-import {DeviceLocationRequestDialog} from '#/components/dialogs/DeviceLocationRequestDialog'
|
||||||
-import * as DateField from '#/components/forms/DateField'
|
-import * as DateField from '#/components/forms/DateField'
|
||||||
-import {type DateFieldRef} from '#/components/forms/DateField/types'
|
-import {type DateFieldRef} from '#/components/forms/DateField/types'
|
||||||
import {FormError} from '#/components/forms/FormError'
|
import {FormError} from '#/components/forms/FormError'
|
||||||
import {HostingProvider} from '#/components/forms/HostingProvider'
|
import {HostingProvider} from '#/components/forms/HostingProvider'
|
||||||
import * as TextField from '#/components/forms/TextField'
|
import * as TextField from '#/components/forms/TextField'
|
||||||
@@ -22,16 +20,6 @@
|
import {Envelope_Stroke2_Corner0_Rounded as Envelope} from '#/components/icons/Envelope'
|
||||||
|
import {Lock_Stroke2_Corner0_Rounded as Lock} from '#/components/icons/Lock'
|
||||||
|
import {Ticket_Stroke2_Corner0_Rounded as Ticket} from '#/components/icons/Ticket'
|
||||||
|
-import {createStaticClick, SimpleInlineLinkText} from '#/components/Link'
|
||||||
|
import {Loader} from '#/components/Loader'
|
||||||
import {usePreemptivelyCompleteActivePolicyUpdate} from '#/components/PolicyUpdateOverlay/usePreemptivelyCompleteActivePolicyUpdate'
|
import {usePreemptivelyCompleteActivePolicyUpdate} from '#/components/PolicyUpdateOverlay/usePreemptivelyCompleteActivePolicyUpdate'
|
||||||
|
-import * as Toast from '#/components/Toast'
|
||||||
|
-import {
|
||||||
|
- isUnderAge,
|
||||||
|
- MIN_ACCESS_AGE,
|
||||||
|
- useAgeAssuranceRegionConfigWithFallback,
|
||||||
|
-} from '#/ageAssurance/util'
|
||||||
|
-import {
|
||||||
|
- useDeviceGeolocationApi,
|
||||||
|
- useIsDeviceGeolocationGranted,
|
||||||
|
-} from '#/geolocation'
|
||||||
import {BackNextButtons} from '../BackNextButtons'
|
import {BackNextButtons} from '../BackNextButtons'
|
||||||
|
|
||||||
-function sanitizeDate(date: Date): Date {
|
-function sanitizeDate(date: Date): Date {
|
||||||
@@ -31,26 +45,40 @@ diff --git a/src/screens/Signup/StepInfo/index.tsx b/src/screens/Signup/StepInfo
|
|||||||
export function StepInfo({
|
export function StepInfo({
|
||||||
onPressBack,
|
onPressBack,
|
||||||
isServerError,
|
isServerError,
|
||||||
@@ -55,7 +43,6 @@
|
@@ -70,21 +43,6 @@
|
||||||
|
|
||||||
const emailInputRef = useRef<TextInput>(null)
|
const emailInputRef = useRef<TextInput>(null)
|
||||||
const passwordInputRef = useRef<TextInput>(null)
|
const passwordInputRef = useRef<TextInput>(null)
|
||||||
- const birthdateInputRef = useRef<DateFieldRef>(null)
|
- const birthdateInputRef = useRef<DateFieldRef>(null)
|
||||||
|
-
|
||||||
|
- const aaRegionConfig = useAgeAssuranceRegionConfigWithFallback()
|
||||||
|
- const {setDeviceGeolocation} = useDeviceGeolocationApi()
|
||||||
|
- const locationControl = Dialog.useDialogControl()
|
||||||
|
- const isOverRegionMinAccessAge = state.dateOfBirth
|
||||||
|
- ? !isUnderAge(state.dateOfBirth.toISOString(), aaRegionConfig.minAccessAge)
|
||||||
|
- : true
|
||||||
|
- const isOverAppMinAccessAge = state.dateOfBirth
|
||||||
|
- ? !isUnderAge(state.dateOfBirth.toISOString(), MIN_ACCESS_AGE)
|
||||||
|
- : true
|
||||||
|
- const isOverMinAdultAge = state.dateOfBirth
|
||||||
|
- ? !isUnderAge(state.dateOfBirth.toISOString(), 18)
|
||||||
|
- : true
|
||||||
|
- const isDeviceGeolocationGranted = useIsDeviceGeolocationGranted()
|
||||||
|
|
||||||
const [hasWarnedEmail, setHasWarnedEmail] = React.useState<boolean>(false)
|
const [hasWarnedEmail, setHasWarnedEmail] = React.useState<boolean>(false)
|
||||||
|
|
||||||
@@ -76,10 +63,6 @@
|
@@ -105,10 +63,6 @@
|
||||||
const emailChanged = prevEmailValueRef.current !== email
|
const emailChanged = prevEmailValueRef.current !== email
|
||||||
const password = passwordValueRef.current
|
const password = passwordValueRef.current
|
||||||
|
|
||||||
- if (!is13(state.dateOfBirth)) {
|
- if (!isOverRegionMinAccessAge) {
|
||||||
- return
|
- return
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
if (state.serviceDescription?.inviteCodeRequired && !inviteCode) {
|
if (state.serviceDescription?.inviteCodeRequired && !inviteCode) {
|
||||||
return dispatch({
|
return dispatch({
|
||||||
type: 'setError',
|
type: 'setError',
|
||||||
@@ -246,44 +229,21 @@
|
@@ -275,107 +229,16 @@
|
||||||
secureTextEntry
|
secureTextEntry
|
||||||
autoComplete="new-password"
|
autoComplete="new-password"
|
||||||
autoCapitalize="none"
|
autoCapitalize="none"
|
||||||
@@ -83,18 +111,79 @@ diff --git a/src/screens/Signup/StepInfo/index.tsx b/src/screens/Signup/StepInfo
|
|||||||
- maximumDate={new Date()}
|
- maximumDate={new Date()}
|
||||||
- />
|
- />
|
||||||
- </View>
|
- </View>
|
||||||
<Policies
|
-
|
||||||
serviceDescription={state.serviceDescription}
|
- <View style={[a.gap_sm]}>
|
||||||
- needsGuardian={!is18(state.dateOfBirth)}
|
- <Policies serviceDescription={state.serviceDescription} />
|
||||||
- under13={!is13(state.dateOfBirth)}
|
-
|
||||||
+ needsGuardian={false}
|
- {!isOverRegionMinAccessAge || !isOverAppMinAccessAge ? (
|
||||||
+ under13={false}
|
- <Admonition.Outer type="error">
|
||||||
/>
|
- <Admonition.Row>
|
||||||
|
- <Admonition.Icon />
|
||||||
|
- <Admonition.Content>
|
||||||
|
- <Admonition.Text>
|
||||||
|
- {!isOverAppMinAccessAge ? (
|
||||||
|
- <Trans>
|
||||||
|
- You must be {MIN_ACCESS_AGE} years of age or older
|
||||||
|
- to create an account.
|
||||||
|
- </Trans>
|
||||||
|
- ) : (
|
||||||
|
- <Trans>
|
||||||
|
- You must be {aaRegionConfig.minAccessAge} years of
|
||||||
|
- age or older to create an account in your region.
|
||||||
|
- </Trans>
|
||||||
|
- )}
|
||||||
|
- </Admonition.Text>
|
||||||
|
- {isNative &&
|
||||||
|
- !isDeviceGeolocationGranted &&
|
||||||
|
- isOverAppMinAccessAge && (
|
||||||
|
- <Admonition.Text>
|
||||||
|
- <Trans>
|
||||||
|
- Have we got your location wrong?{' '}
|
||||||
|
- <SimpleInlineLinkText
|
||||||
|
- label={_(
|
||||||
|
- msg`Tap here to confirm your location with GPS.`,
|
||||||
|
- )}
|
||||||
|
- {...createStaticClick(() => {
|
||||||
|
- locationControl.open()
|
||||||
|
- })}>
|
||||||
|
- Tap here to confirm your location with GPS.
|
||||||
|
- </SimpleInlineLinkText>
|
||||||
|
- </Trans>
|
||||||
|
- </Admonition.Text>
|
||||||
|
- )}
|
||||||
|
- </Admonition.Content>
|
||||||
|
- </Admonition.Row>
|
||||||
|
- </Admonition.Outer>
|
||||||
|
- ) : !isOverMinAdultAge ? (
|
||||||
|
- <Admonition.Admonition type="warning">
|
||||||
|
- <Trans>
|
||||||
|
- If you are not yet an adult according to the laws of your
|
||||||
|
- country, your parent or legal guardian must read these Terms
|
||||||
|
- on your behalf.
|
||||||
|
- </Trans>
|
||||||
|
- </Admonition.Admonition>
|
||||||
|
- ) : undefined}
|
||||||
|
- </View>
|
||||||
|
-
|
||||||
|
- {isNative && (
|
||||||
|
- <DeviceLocationRequestDialog
|
||||||
|
- control={locationControl}
|
||||||
|
- onLocationAcquired={props => {
|
||||||
|
- props.closeDialog(() => {
|
||||||
|
- // set this after close!
|
||||||
|
- setDeviceGeolocation(props.geolocation)
|
||||||
|
- Toast.show(_(msg`Your location has been updated.`), {
|
||||||
|
- type: 'success',
|
||||||
|
- })
|
||||||
|
- })
|
||||||
|
- }}
|
||||||
|
- />
|
||||||
|
- )}
|
||||||
</>
|
</>
|
||||||
) : undefined}
|
) : undefined}
|
||||||
</View>
|
</View>
|
||||||
<BackNextButtons
|
<BackNextButtons
|
||||||
- hideNext={!is13(state.dateOfBirth)}
|
- hideNext={!isOverRegionMinAccessAge}
|
||||||
+ hideNext={false}
|
+ hideNext={false}
|
||||||
showRetry={isServerError}
|
showRetry={isServerError}
|
||||||
isLoading={state.isLoading}
|
isLoading={state.isLoading}
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
diff --git a/src/components/dialogs/nuxs/index.tsx b/src/components/dialogs/nuxs/index.tsx
|
diff --git a/src/components/dialogs/nuxs/FindContactsAnnouncement.tsx b/src/components/dialogs/nuxs/FindContactsAnnouncement.tsx
|
||||||
index 63e11a7f4..70fa993cf 100644
|
index 63e11a7f4..70fa993cf 100644
|
||||||
--- a/src/components/dialogs/nuxs/index.tsx
|
--- a/src/components/dialogs/nuxs/FindContactsAnnouncement.tsx
|
||||||
+++ b/src/components/dialogs/nuxs/index.tsx
|
+++ b/src/components/dialogs/nuxs/FindContactsAnnouncement.tsx
|
||||||
@@ -46,7 +46,7 @@ const queuedNuxs: {
|
@@ -25,7 +25,7 @@ export const enabled = createIsEnabledCheck(props => {
|
||||||
enabled: ({currentProfile}) => {
|
!IS_E2E &&
|
||||||
return (
|
|
||||||
isNative &&
|
isNative &&
|
||||||
- isExistingUserAsOf('2025-12-16T00:00:00.000Z', currentProfile.createdAt)
|
isExistingUserAsOf(
|
||||||
+ isExistingUserAsOf('2099-12-16T00:00:00.000Z', currentProfile.createdAt)
|
- '2025-12-16T00:00:00.000Z',
|
||||||
)
|
+ '2099-12-16T00:00:00.000Z',
|
||||||
},
|
props.currentProfile.createdAt,
|
||||||
},
|
) &&
|
||||||
|
isFindContactsFeatureEnabled(props.geolocation.countryCode)
|
||||||
|
|||||||
@@ -70,8 +70,6 @@ npx expo prebuild --platform ios --clean
|
|||||||
|
|
||||||
# 3. CocoaPods
|
# 3. CocoaPods
|
||||||
echo "3. Installing CocoaPods..."
|
echo "3. Installing CocoaPods..."
|
||||||
# Ensure PATH includes Homebrew ruby gems if needed
|
|
||||||
export PATH="/opt/homebrew/lib/ruby/gems/3.4.0/bin:$PATH"
|
|
||||||
cd ios
|
cd ios
|
||||||
pod install
|
pod install
|
||||||
cd ..
|
cd ..
|
||||||
|
|||||||
106
patching/152-indigo-newpds-dayper-limit-pr707.diff
Normal file
106
patching/152-indigo-newpds-dayper-limit-pr707.diff
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
diff --git a/bgs/bgs.go b/bgs/bgs.go
|
||||||
|
index 35dfab9d..7e225f6c 100644
|
||||||
|
--- a/bgs/bgs.go
|
||||||
|
+++ b/bgs/bgs.go
|
||||||
|
@@ -112,6 +112,7 @@ type BGSConfig struct {
|
||||||
|
DefaultRepoLimit int64
|
||||||
|
ConcurrencyPerPDS int64
|
||||||
|
MaxQueuePerPDS int64
|
||||||
|
+ InitialNewPDSPerDayLimit int64
|
||||||
|
NumCompactionWorkers int
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -122,6 +123,7 @@ func DefaultBGSConfig() *BGSConfig {
|
||||||
|
DefaultRepoLimit: 100,
|
||||||
|
ConcurrencyPerPDS: 100,
|
||||||
|
MaxQueuePerPDS: 1_000,
|
||||||
|
+ InitialNewPDSPerDayLimit: 10,
|
||||||
|
NumCompactionWorkers: 2,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -159,6 +161,7 @@ func NewBGS(db *gorm.DB, ix *indexer.Indexer, repoman *repomgr.RepoManager, evtm
|
||||||
|
slOpts.DefaultRepoLimit = config.DefaultRepoLimit
|
||||||
|
slOpts.ConcurrencyPerPDS = config.ConcurrencyPerPDS
|
||||||
|
slOpts.MaxQueuePerPDS = config.MaxQueuePerPDS
|
||||||
|
+ slOpts.DefaultNewPDSPerDayLimit = config.InitialNewPDSPerDayLimit
|
||||||
|
s, err := NewSlurper(db, bgs.handleFedEvent, slOpts)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
diff --git a/bgs/fedmgr.go b/bgs/fedmgr.go
|
||||||
|
index 42ce7407..9072ba05 100644
|
||||||
|
--- a/bgs/fedmgr.go
|
||||||
|
+++ b/bgs/fedmgr.go
|
||||||
|
@@ -45,6 +45,7 @@ type Slurper struct {
|
||||||
|
MaxQueuePerPDS int64
|
||||||
|
|
||||||
|
NewPDSPerDayLimiter *slidingwindow.Limiter
|
||||||
|
+ initialNewPDSPerDayLimit int64
|
||||||
|
|
||||||
|
newSubsDisabled bool
|
||||||
|
trustedDomains []string
|
||||||
|
@@ -70,6 +71,7 @@ type SlurperOptions struct {
|
||||||
|
DefaultRepoLimit int64
|
||||||
|
ConcurrencyPerPDS int64
|
||||||
|
MaxQueuePerPDS int64
|
||||||
|
+ DefaultNewPDSPerDayLimit int64
|
||||||
|
}
|
||||||
|
|
||||||
|
func DefaultSlurperOptions() *SlurperOptions {
|
||||||
|
@@ -82,6 +84,7 @@ func DefaultSlurperOptions() *SlurperOptions {
|
||||||
|
DefaultRepoLimit: 100,
|
||||||
|
ConcurrencyPerPDS: 100,
|
||||||
|
MaxQueuePerPDS: 1_000,
|
||||||
|
+ DefaultNewPDSPerDayLimit: 10,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -112,6 +115,7 @@ func NewSlurper(db *gorm.DB, cb IndexCallback, opts *SlurperOptions) (*Slurper,
|
||||||
|
ssl: opts.SSL,
|
||||||
|
shutdownChan: make(chan bool),
|
||||||
|
shutdownResult: make(chan []error),
|
||||||
|
+ initialNewPDSPerDayLimit: opts.DefaultNewPDSPerDayLimit,
|
||||||
|
}
|
||||||
|
if err := s.loadConfig(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
@@ -224,13 +228,15 @@ func (s *Slurper) loadConfig() error {
|
||||||
|
}
|
||||||
|
|
||||||
|
if sc.ID == 0 {
|
||||||
|
- if err := s.db.Create(&SlurpConfig{}).Error; err != nil {
|
||||||
|
+ sc.NewPDSPerDayLimit = s.initialNewPDSPerDayLimit
|
||||||
|
+ if err := s.db.Create(&SlurpConfig{ NewPDSPerDayLimit: s.initialNewPDSPerDayLimit, }).Error; err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
s.newSubsDisabled = sc.NewSubsDisabled
|
||||||
|
s.trustedDomains = sc.TrustedDomains
|
||||||
|
+ s.initialNewPDSPerDayLimit = sc.NewPDSPerDayLimit
|
||||||
|
|
||||||
|
s.NewPDSPerDayLimiter, _ = slidingwindow.NewLimiter(time.Hour*24, sc.NewPDSPerDayLimit, windowFunc)
|
||||||
|
|
||||||
|
diff --git a/cmd/bigsky/main.go b/cmd/bigsky/main.go
|
||||||
|
index 540796f5..cb946aed 100644
|
||||||
|
--- a/cmd/bigsky/main.go
|
||||||
|
+++ b/cmd/bigsky/main.go
|
||||||
|
@@ -195,6 +195,12 @@ func run(args []string) error {
|
||||||
|
EnvVars: []string{"RELAY_EVENT_PLAYBACK_TTL"},
|
||||||
|
Value: 72 * time.Hour,
|
||||||
|
},
|
||||||
|
+ &cli.Int64Flag{
|
||||||
|
+ Name: "newpds-perday-limit",
|
||||||
|
+ EnvVars: []string{"RELAY_NEWPDS_PERDAY_LIMIT"},
|
||||||
|
+ Value: 10,
|
||||||
|
+ Usage: "initial value for NewPDSPerDayLimit",
|
||||||
|
+ },
|
||||||
|
&cli.IntFlag{
|
||||||
|
Name: "num-compaction-workers",
|
||||||
|
EnvVars: []string{"RELAY_NUM_COMPACTION_WORKERS"},
|
||||||
|
@@ -418,6 +424,7 @@ func runBigsky(cctx *cli.Context) error {
|
||||||
|
bgsConfig.ConcurrencyPerPDS = cctx.Int64("concurrency-per-pds")
|
||||||
|
bgsConfig.MaxQueuePerPDS = cctx.Int64("max-queue-per-pds")
|
||||||
|
bgsConfig.DefaultRepoLimit = cctx.Int64("default-repo-limit")
|
||||||
|
+ bgsConfig.InitialNewPDSPerDayLimit = cctx.Int64("newpds-perday-limit")
|
||||||
|
bgsConfig.NumCompactionWorkers = cctx.Int("num-compaction-workers")
|
||||||
|
bgs, err := libbgs.NewBGS(db, ix, repoman, evtman, cachedidr, rf, hr, bgsConfig)
|
||||||
|
if err != nil {
|
||||||
Reference in New Issue
Block a user