fix social-app web icon
This commit is contained in:
@@ -38,11 +38,14 @@ PATCH_FILES_IOS=(
|
||||
"023-social-app-ios-disable-dm.patch"
|
||||
"024-social-app-ios-disable-external-services.patch"
|
||||
"025-social-app-ios-bskyweb-title.patch"
|
||||
"026-social-app-ios-serverinput-label.patch"
|
||||
"027-social-app-ios-remove-birthdate.patch"
|
||||
"028-social-app-ios-remove-discover-feeds.patch"
|
||||
"029-social-app-ios-remove-feeds-discover.patch"
|
||||
"030-social-app-ios-appinfo.patch"
|
||||
"032-social-app-ios-feed-loggedout.patch"
|
||||
"033-social-app-ios-hide-profile-tabs.patch"
|
||||
"036-social-app-ios-homeheader-loggedout.patch"
|
||||
"037-social-app-ios-disable-contacts-nux.patch"
|
||||
)
|
||||
|
||||
function ios-env() {
|
||||
@@ -64,14 +67,6 @@ function apply-patch() {
|
||||
|
||||
pushd ${target_dir} > /dev/null
|
||||
|
||||
# Check if patch is already applied (reverse dry-run succeeds)
|
||||
if patch -f --dry-run -p1 -R < ${patch_file} > /dev/null 2>&1; then
|
||||
echo "✅ Already applied - skipping"
|
||||
popd > /dev/null
|
||||
echo ""
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Check if patch can be applied (forward dry-run succeeds)
|
||||
if patch --dry-run -p1 < ${patch_file} > /dev/null 2>&1; then
|
||||
echo "🔧 Applying patch..."
|
||||
@@ -179,6 +174,25 @@ function ios-copy-new-files() {
|
||||
echo "✅ Copied License.tsx"
|
||||
fi
|
||||
|
||||
# Copy AppInfo.tsx
|
||||
if [ -f "$patching_dir/AppInfo.tsx" ]; then
|
||||
mkdir -p "$target_dir/src/view/screens"
|
||||
cp "$patching_dir/AppInfo.tsx" "$target_dir/src/view/screens/AppInfo.tsx"
|
||||
echo "✅ Copied AppInfo.tsx"
|
||||
fi
|
||||
|
||||
# Copy pre-generated favicons for bskyweb
|
||||
local favicon_src="$d/ios/assets/favicons"
|
||||
local bskyweb_static="$target_dir/bskyweb/static"
|
||||
if [ -d "$favicon_src" ] && [ -d "$bskyweb_static" ]; then
|
||||
cp -f "$d/ios/assets/logo.png" "$bskyweb_static/app.png"
|
||||
cp -f "$favicon_src/favicon.png" "$bskyweb_static/favicon.png"
|
||||
cp -f "$favicon_src/favicon-16x16.png" "$bskyweb_static/favicon-16x16.png"
|
||||
cp -f "$favicon_src/favicon-32x32.png" "$bskyweb_static/favicon-32x32.png"
|
||||
cp -f "$favicon_src/apple-touch-icon.png" "$bskyweb_static/apple-touch-icon.png"
|
||||
echo "✅ Copied favicons to bskyweb/static"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
}
|
||||
|
||||
@@ -191,6 +205,53 @@ function ios-setup-clone() {
|
||||
echo "Repository found: $target_dir"
|
||||
}
|
||||
|
||||
# Generate bskyweb templates from html/ source
|
||||
# html/ is the source of truth, bskyweb templates are generated
|
||||
function ios-generate-bskyweb-templates() {
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "🌐 Generating bskyweb templates from html/..."
|
||||
|
||||
local html_src="$d/html/about/support"
|
||||
local templates="$target_dir/bskyweb/templates"
|
||||
local static_src="$d/html/static"
|
||||
local static_out="$target_dir/bskyweb/static"
|
||||
|
||||
# Check if html source exists
|
||||
if [ ! -d "$html_src" ]; then
|
||||
echo "⚠️ html/about/support not found, skipping template generation"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Create output directory
|
||||
mkdir -p "$templates"
|
||||
mkdir -p "$static_out"
|
||||
|
||||
# Convert html/ to bskyweb templates
|
||||
# Add {{ staticCDNHost }} prefix to /static/ paths
|
||||
for html_file in privacy.html license.html tos.html help.html app.html; do
|
||||
if [ -f "$html_src/$html_file" ]; then
|
||||
local template_name="about-${html_file}"
|
||||
sed 's|href="/static/|href="{{ staticCDNHost }}/static/|g; s|src="/static/|src="{{ staticCDNHost }}/static/|g' \
|
||||
"$html_src/$html_file" > "$templates/$template_name"
|
||||
fi
|
||||
done
|
||||
|
||||
# Also generate about-app.html from index.html if exists
|
||||
if [ -f "$d/html/index.html" ]; then
|
||||
sed 's|href="/static/|href="{{ staticCDNHost }}/static/|g; s|src="/static/|src="{{ staticCDNHost }}/static/|g' \
|
||||
"$d/html/index.html" > "$templates/about-app.html"
|
||||
fi
|
||||
|
||||
# Copy static assets
|
||||
if [ -d "$static_src" ]; then
|
||||
cp -f "$static_src/"* "$static_out/" 2>/dev/null
|
||||
fi
|
||||
|
||||
echo "✅ Generated bskyweb templates"
|
||||
echo " - about-privacy.html, about-tos.html, etc."
|
||||
echo ""
|
||||
}
|
||||
|
||||
function ios-setup-reset() {
|
||||
echo "Resetting social-app repository..."
|
||||
cd $target_dir
|
||||
@@ -209,6 +270,7 @@ case "$1" in
|
||||
ios-patch-apply-all
|
||||
ios-restore-build-placeholder
|
||||
ios-copy-new-files
|
||||
ios-generate-bskyweb-templates
|
||||
show-failed-patches
|
||||
exit
|
||||
;;
|
||||
@@ -216,12 +278,18 @@ case "$1" in
|
||||
ios-setup-reset
|
||||
exit
|
||||
;;
|
||||
html)
|
||||
# Generate bskyweb templates only (requires patches to be applied first)
|
||||
ios-generate-bskyweb-templates
|
||||
exit
|
||||
;;
|
||||
*)
|
||||
ios-setup-clone
|
||||
ios-generate-build-number
|
||||
ios-patch-apply-all
|
||||
ios-restore-build-placeholder
|
||||
ios-copy-new-files
|
||||
ios-generate-bskyweb-templates
|
||||
show-failed-patches
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user