Skip to content

Commit

Permalink
Merge branch 'bluesky-social:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
imertz authored Dec 11, 2024
2 parents 889c4aa + 48c5341 commit 6404510
Show file tree
Hide file tree
Showing 306 changed files with 71,578 additions and 28,243 deletions.
157 changes: 112 additions & 45 deletions app.config.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
const pkg = require('./package.json')

const SPLASH_CONFIG = {
backgroundColor: '#ffffff',
image: './assets/splash.png',
resizeMode: 'cover',
}
const DARK_SPLASH_CONFIG = {
backgroundColor: '#001429',
image: './assets/splash-dark.png',
resizeMode: 'cover',
}

const SPLASH_CONFIG_ANDROID = {
backgroundColor: '#0c7cff',
image: './assets/splash.png',
resizeMode: 'cover',
}
const DARK_SPLASH_CONFIG_ANDROID = {
backgroundColor: '#0f141b',
image: './assets/splash-dark.png',
resizeMode: 'cover',
}
const DARK_SPLASH_ANDROID_BACKGROUND = '#0f141b'

module.exports = function (config) {
/**
Expand Down Expand Up @@ -71,10 +51,8 @@ module.exports = function (config) {
policy: 'appVersion',
},
orientation: 'portrait',
icon: './assets/icon.png',
icon: './assets/app-icons/ios_icon_default_light.png',
userInterfaceStyle: 'automatic',
splash: SPLASH_CONFIG,
// hsl(211, 99%, 53%), same as palette.default.brandText
primaryColor: '#1083fe',
ios: {
supportsTablet: false,
Expand All @@ -95,34 +73,35 @@ module.exports = function (config) {
CFBundleSpokenName: 'Blue Sky',
CFBundleLocalizations: [
'en',
'an',
'ast',
'ca',
'de',
'es',
'fi',
'fr',
'ga',
'gl',
'hi',
'hu',
'id',
'it',
'ja',
'ko',
'nl',
'pl',
'pt',
'pt-BR',
'ru',
'th',
'tr',
'uk',
'zh_CN',
'zh_HK',
'zh_TW',
'vi',
'yue-Hant',
'zh-Hans',
'zh-Hant',
],
},
associatedDomains: ASSOCIATED_DOMAINS,
splash: {
...SPLASH_CONFIG,
dark: DARK_SPLASH_CONFIG,
},
entitlements: {
'com.apple.developer.kernel.increased-memory-limit': true,
'com.apple.developer.kernel.extended-virtual-addressing': true,
Expand Down Expand Up @@ -159,10 +138,10 @@ module.exports = function (config) {
// Dark nav bar in light mode is better than light nav bar in dark mode
androidNavigationBar: {
barStyle: 'light-content',
backgroundColor: DARK_SPLASH_CONFIG_ANDROID.backgroundColor,
backgroundColor: DARK_SPLASH_ANDROID_BACKGROUND,
},
android: {
icon: './assets/icon.png',
icon: './assets/app-icons/android_icon_default_light.png',
adaptiveIcon: {
foregroundImage: './assets/icon-android-foreground.png',
monochromeImage: './assets/icon-android-foreground.png',
Expand All @@ -188,10 +167,6 @@ module.exports = function (config) {
category: ['BROWSABLE', 'DEFAULT'],
},
],
splash: {
...SPLASH_CONFIG_ANDROID,
dark: DARK_SPLASH_CONFIG_ANDROID,
},
},
web: {
favicon: './assets/favicon.png',
Expand Down Expand Up @@ -231,10 +206,9 @@ module.exports = function (config) {
newArchEnabled: false,
},
android: {
compileSdkVersion: 34,
targetSdkVersion: 34,
buildToolsVersion: '34.0.0',
kotlinVersion: '1.8.0',
compileSdkVersion: 35,
targetSdkVersion: 35,
buildToolsVersion: '35.0.0',
newArchEnabled: false,
},
},
Expand All @@ -251,7 +225,6 @@ module.exports = function (config) {
'./plugins/starterPackAppClipExtension/withStarterPackAppClip.js',
'./plugins/withAndroidManifestPlugin.js',
'./plugins/withAndroidManifestFCMIconPlugin.js',
'./plugins/withAndroidStylesWindowBackgroundPlugin.js',
'./plugins/withAndroidStylesAccentColorPlugin.js',
'./plugins/withAndroidSplashScreenStatusBarTranslucentPlugin.js',
'./plugins/shareExtension/withShareExtensions.js',
Expand All @@ -261,8 +234,8 @@ module.exports = function (config) {
'expo-font',
{
fonts: [
'./assets/fonts/inter/InterVariable.ttf',
'./assets/fonts/inter/InterVariable-Italic.ttf',
'./assets/fonts/inter/InterVariable.woff2',
'./assets/fonts/inter/InterVariable-Italic.woff2',
// Android only
'./assets/fonts/inter/Inter-Regular.otf',
'./assets/fonts/inter/Inter-Italic.otf',
Expand All @@ -273,6 +246,100 @@ module.exports = function (config) {
],
},
],
[
'expo-splash-screen',
{
ios: {
enableFullScreenImage_legacy: true,
backgroundColor: '#ffffff',
image: './assets/splash.png',
resizeMode: 'cover',
dark: {
enableFullScreenImage_legacy: true,
backgroundColor: '#001429',
image: './assets/splash-dark.png',
resizeMode: 'cover',
},
},
android: {
backgroundColor: '#0c7cff',
image: './assets/splash-android-icon.png',
imageWidth: 150,
dark: {
backgroundColor: '#0c2a49',
image: './assets/splash-android-icon-dark.png',
imageWidth: 150,
},
},
},
],
[
'@mozzius/expo-dynamic-app-icon',
{
/**
* Default set
*/
default_light: {
ios: './assets/app-icons/ios_icon_default_light.png',
android: './assets/app-icons/android_icon_default_light.png',
prerendered: true,
},
default_dark: {
ios: './assets/app-icons/ios_icon_default_dark.png',
android: './assets/app-icons/android_icon_default_dark.png',
prerendered: true,
},

/**
* Bluesky+ core set
*/
core_aurora: {
ios: './assets/app-icons/ios_icon_core_aurora.png',
android: './assets/app-icons/android_icon_core_aurora.png',
prerendered: true,
},
core_bonfire: {
ios: './assets/app-icons/ios_icon_core_bonfire.png',
android: './assets/app-icons/android_icon_core_bonfire.png',
prerendered: true,
},
core_sunrise: {
ios: './assets/app-icons/ios_icon_core_sunrise.png',
android: './assets/app-icons/android_icon_core_sunrise.png',
prerendered: true,
},
core_sunset: {
ios: './assets/app-icons/ios_icon_core_sunset.png',
android: './assets/app-icons/android_icon_core_sunset.png',
prerendered: true,
},
core_midnight: {
ios: './assets/app-icons/ios_icon_core_midnight.png',
android: './assets/app-icons/android_icon_core_midnight.png',
prerendered: true,
},
core_flat_blue: {
ios: './assets/app-icons/ios_icon_core_flat_blue.png',
android: './assets/app-icons/android_icon_core_flat_blue.png',
prerendered: true,
},
core_flat_white: {
ios: './assets/app-icons/ios_icon_core_flat_white.png',
android: './assets/app-icons/android_icon_core_flat_white.png',
prerendered: true,
},
core_flat_black: {
ios: './assets/app-icons/ios_icon_core_flat_black.png',
android: './assets/app-icons/android_icon_core_flat_black.png',
prerendered: true,
},
core_classic: {
ios: './assets/app-icons/ios_icon_core_classic.png',
android: './assets/app-icons/android_icon_core_classic.png',
prerendered: true,
},
},
],
].filter(Boolean),
extra: {
eas: {
Expand Down
Binary file added assets/app-icons/android_icon_core_aurora.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/android_icon_core_bonfire.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/android_icon_core_classic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/android_icon_core_flat_black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/android_icon_core_flat_blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/android_icon_core_flat_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/android_icon_core_midnight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/android_icon_core_sunrise.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/android_icon_core_sunset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/android_icon_default_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/android_icon_default_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/ios_icon_core_aurora.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/ios_icon_core_bonfire.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/ios_icon_core_classic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/ios_icon_core_flat_black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/ios_icon_core_flat_blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/ios_icon_core_flat_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/ios_icon_core_midnight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/ios_icon_core_sunrise.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/ios_icon_core_sunset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/ios_icon_default_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-icons/ios_icon_default_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/fonts/inter/Inter-Black.woff2
Binary file not shown.
Binary file added assets/fonts/inter/Inter-BlackItalic.woff2
Binary file not shown.
Binary file added assets/fonts/inter/Inter-Bold.woff2
Binary file not shown.
Binary file added assets/fonts/inter/Inter-BoldItalic.woff2
Binary file not shown.
Binary file added assets/fonts/inter/Inter-ExtraBold.woff2
Binary file not shown.
Binary file added assets/fonts/inter/Inter-ExtraBoldItalic.woff2
Binary file not shown.
Binary file added assets/fonts/inter/Inter-ExtraLight.woff2
Binary file not shown.
Binary file added assets/fonts/inter/Inter-ExtraLightItalic.woff2
Binary file not shown.
Binary file added assets/fonts/inter/Inter-Italic.woff2
Binary file not shown.
Binary file added assets/fonts/inter/Inter-Light.woff2
Binary file not shown.
Binary file added assets/fonts/inter/Inter-LightItalic.woff2
Binary file not shown.
Binary file added assets/fonts/inter/Inter-Medium.woff2
Binary file not shown.
Binary file added assets/fonts/inter/Inter-MediumItalic.woff2
Binary file not shown.
Binary file added assets/fonts/inter/Inter-Regular.woff2
Binary file not shown.
Binary file added assets/fonts/inter/Inter-SemiBold.woff2
Binary file not shown.
Binary file added assets/fonts/inter/Inter-SemiBoldItalic.woff2
Binary file not shown.
Binary file added assets/fonts/inter/Inter-Thin.woff2
Binary file not shown.
Binary file added assets/fonts/inter/Inter-ThinItalic.woff2
Binary file not shown.
Binary file added assets/fonts/inter/InterVariable-Italic.woff2
Binary file not shown.
Binary file added assets/fonts/inter/InterVariable.woff2
Binary file not shown.
Binary file removed assets/icon.png
Binary file not shown.
1 change: 1 addition & 0 deletions assets/icons/android_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/apple_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion assets/icons/chainLink3_stroke2_corner0_rounded.svg
Diff not rendered.
1 change: 1 addition & 0 deletions assets/icons/clock_stroke2_corner0_rounded.svg
1 change: 1 addition & 0 deletions assets/icons/floppyDisk_stroke2_corner0_rounded.svg
1 change: 1 addition & 0 deletions assets/icons/gift1_filled_corner0_rounded.svg
1 change: 1 addition & 0 deletions assets/icons/logomark.svg
Binary file added assets/splash-android-icon-dark.png
Binary file added assets/splash-android-icon.png
1 change: 1 addition & 0 deletions bskyweb/cmd/bskyweb/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ func serve(cctx *cli.Context) error {
e.GET("/settings/privacy-and-security", server.WebGeneric)
e.GET("/settings/content-and-media", server.WebGeneric)
e.GET("/settings/about", server.WebGeneric)
e.GET("/settings/app-icon", server.WebGeneric)
e.GET("/sys/debug", server.WebGeneric)
e.GET("/sys/debug-mod", server.WebGeneric)
e.GET("/sys/log", server.WebGeneric)
Expand Down
4 changes: 3 additions & 1 deletion bskyweb/cmd/embedr/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ type OEmbedResponse struct {
Version string `json:"version"`
AuthorName string `json:"author_name,omitempty"`
AuthorURL string `json:"author_url,omitempty"`
ProviderName string `json:"provider_url,omitempty"`
ProviderName string `json:"provider_name,omitempty"`
ProviderURL string `json:"provider_url,omitempty"`
CacheAge int `json:"cache_age,omitempty"`
Width *int `json:"width"`
Height *int `json:"height"`
Expand Down Expand Up @@ -170,6 +171,7 @@ func (srv *Server) WebOEmbed(c echo.Context) error {
AuthorName: "@" + post.Author.Handle,
AuthorURL: fmt.Sprintf("https://bsky.app/profile/%s", post.Author.Handle),
ProviderName: "Bluesky Social",
ProviderURL: "https://bsky.app",
CacheAge: 86400,
Width: &width,
Height: nil,
Expand Down
12 changes: 10 additions & 2 deletions bskyweb/static/iframe/youtube.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,21 @@

let player
function onYouTubeIframeAPIReady() {
let videoId = url.searchParams.get('videoId')
videoId = decodeURIComponent(videoId)
videoId = videoId.replace(/[^a-zA-Z0-9_-]/g, "")
if (videoId.length !== 11) throw new Error("Invalid video ID")

let start = url.searchParams.get('start')
start = start.replace(/[^0-9]/g, "")

player = new YT.Player('player', {
width: "1000",
height: "1000",
videoId: url.searchParams.get('videoId'),
videoId,
playerVars: {
autoplay: 1,
start: url.searchParams.get('start'),
start,
rel: 0,
loop: 0,
playsinline: 1,
Expand Down
Binary file not shown.
Binary file not shown.
16 changes: 10 additions & 6 deletions bskyweb/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@

<!-- Hello Humans! API docs at https://atproto.com -->

<link rel="preload" as="font" type="font/ttf" href="{{ staticCDNHost }}/static/media/InterVariable.c9f788f6e7ebaec75d7c.ttf">
<link rel="preload" as="font" type="font/ttf" href="{{ staticCDNHost }}/static/media/InterVariable-Italic.55d6a3f35e9b605ba6f4.ttf">
<link rel="preload" as="font" type="font/ttf" href="{{ staticCDNHost }}/static/media/InterVariable.c504db5c06caaf7cdfba.woff2">

<style>
/**
Expand All @@ -26,21 +25,20 @@
*/
@font-face {
font-family: 'InterVariable';
src: url("{{ staticCDNHost }}/static/media/InterVariable.c9f788f6e7ebaec75d7c.ttf") format('truetype');
src: url("{{ staticCDNHost }}/static/media/InterVariable.c504db5c06caaf7cdfba.woff2") format('woff2');
font-weight: 300 1000;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'InterVariableItalic';
src: url("{{ staticCDNHost }}/static/media/InterVariable-Italic.55d6a3f35e9b605ba6f4.ttf") format('truetype');
src: url("{{ staticCDNHost }}/static/media/InterVariable-Italic.01dcbad1bac635f9c9cd.woff2") format('woff2');
font-weight: 300 1000;
font-style: italic;
font-display: swap;
}
html {
background-color: white;
scrollbar-gutter: stable both-edges;
}
@media (prefers-color-scheme: dark) {
html {
Expand Down Expand Up @@ -76,9 +74,15 @@
top: 50%;
transform: translateX(-50%) translateY(-50%) translateY(-50px);
}
/* We need this style to prevent web dropdowns from shifting the display when opening */
/**
* We need these styles to prevent shifting due to scrollbar show/hide on
* OSs that have them enabled by default. This also handles cases where the
* screen wouldn't otherwise scroll, and therefore hide the scrollbar and
* shift the content, by forcing the page to show a scrollbar.
*/
body {
width: 100%;
overflow-y: scroll;
}
</style>

Expand Down
4 changes: 2 additions & 2 deletions bskyweb/templates/error.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ <h1>404: Not Found</h1>
{# don't include the bundle on non-404 error pages #}
{% block head_bundle %}
{% if statusCode == 404 %}
{{ super() }}
{{ block.Super }}
{% else %}
{% endif %}
{% endblock %}

{%- block body_all %}
{% if statusCode == 404 %}
{{ super() }}
{{ block.Super }}
{% else %}
<h1>{{ statusCode }}: Server Error</h1>
<p>Sorry about that! Our <a href="https://bluesky.statuspage.io/">Status Page</a> might have more context.
Expand Down
7 changes: 3 additions & 4 deletions jest/jestSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ jest.mock('react-native/Libraries/EventEmitter/NativeEventEmitter', () => {
}
})

// Silence the warning: Animated: `useNativeDriver` is not supported
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper')

jest.mock('@fortawesome/react-native-fontawesome', () => ({
FontAwesomeIcon: '',
}))
Expand Down Expand Up @@ -51,7 +48,9 @@ jest.mock('expo-image-manipulator', () => ({
manipulateAsync: jest.fn().mockResolvedValue({
uri: 'file://resized-image',
}),
SaveFormat: jest.requireActual('expo-image-manipulator').SaveFormat,
SaveFormat: {
JPEG: 'jpeg',
},
}))

jest.mock('expo-camera', () => ({
Expand Down
Loading

0 comments on commit 6404510

Please sign in to comment.