diff --git a/bskyweb/templates/base.html b/bskyweb/templates/base.html index 0c4a91df6..c0200c9b5 100644 --- a/bskyweb/templates/base.html +++ b/bskyweb/templates/base.html @@ -7,9 +7,9 @@ - - - {%- block head_title -%}Bluesky{%- endblock -%} + + + {%- block head_title -%}Blacksky{%- endblock -%} @@ -37,6 +37,16 @@ font-style: italic; font-display: swap; } + html { + background-color: #F8FAF9; + color: #000000; + } + @media (prefers-color-scheme: dark) { + html { + background-color: #070C0C; + color: #FFFFFF; + } + } html, body { margin: 0px; @@ -51,19 +61,6 @@ -ms-overflow-style: scrollbar; font-synthesis-weight: none; } - :root { - --text: black; - --background: white; - --backgroundLight: #e2e7ee; - } - @media (prefers-color-scheme: dark) { - :root { - color-scheme: dark; - --text: white; - --background: black; - --backgroundLight: #232e3e; - } - } html, body, #root { @@ -72,46 +69,12 @@ min-height: 100%; width: 100%; } - html.theme--light, - html.theme--light body, - html.theme--light #root { - background-color: white; - --text: black; - --background: white; - --backgroundLight: #DCE2EA; - } - html.theme--dark, - html.theme--dark body, - html.theme--dark #root { - color-scheme: dark; - background-color: black; - --text: white; - --background: black; - --backgroundLight: #232E3E; - } - html.theme--dim, - html.theme--dim body, - html.theme--dim #root { - color-scheme: dark; - background-color: #151D28; - --text: white; - --background: #151D28; - --backgroundLight: #2C3A4E; - } #splash { - display: flex; position: fixed; - top: 0; - bottom: 0; - left: 0; - right: 0; - align-items: center; - justify-content: center; - } - #splash svg { - position: relative; - top: -50px; width: 100px; + left: 50%; + top: 50%; + transform: translateX(-50%) translateY(-50%) translateY(-50px); } /** * We need these styles to prevent shifting due to scrollbar show/hide on @@ -124,24 +87,18 @@ overflow-y: scroll; } - {% include "scripts.html" %} - + - + - + - + {% block html_head_extra -%}{%- endblock %} @@ -150,15 +107,32 @@ {%- block body_all %}
- - + + + + + + + + + + + + + +
{% endblock -%} diff --git a/bskyweb/templates/feed.html b/bskyweb/templates/feed.html index b20139582..0502b9516 100644 --- a/bskyweb/templates/feed.html +++ b/bskyweb/templates/feed.html @@ -2,15 +2,15 @@ {% block head_title %} {%- if feedView -%} - {{ feedView.DisplayName }} by @{{ feedView.Creator.Handle }} | Bluesky Feed + {{ feedView.DisplayName }} by @{{ feedView.Creator.Handle }} | Blacksky Feed {%- else -%} - Bluesky + Blacksky {%- endif -%} {% endblock %} {% block html_head_extra -%} {%- if feedView -%} - + {%- if requestURI %} diff --git a/bskyweb/templates/post.html b/bskyweb/templates/post.html index 6b6516288..958dc4a9f 100644 --- a/bskyweb/templates/post.html +++ b/bskyweb/templates/post.html @@ -2,11 +2,11 @@ {% block head_title %} {%- if postView -%} - @{{ postView.Author.Handle }} on Bluesky + @{{ postView.Author.Handle }} on Blacksky {%- elif requiresAuth and profileHandle -%} - @{{ profileHandle }} on Bluesky + @{{ profileHandle }} on Blacksky {%- else -%} - Bluesky + Blacksky {%- endif -%} {% endblock %} diff --git a/bskyweb/templates/profile.html b/bskyweb/templates/profile.html index b4be42928..599135d2b 100644 --- a/bskyweb/templates/profile.html +++ b/bskyweb/templates/profile.html @@ -2,14 +2,14 @@ {% block head_title %} {%- if profileView -%} - @{{ profileView.Handle }} on Bluesky + @{{ profileView.Handle }} on Blacksky {%- else -%} - Bluesky + Blacksky {%- endif -%} {% endblock %} {% block html_head_extra -%} - + {%- if requestURI %} diff --git a/bskyweb/templates/starterpack.html b/bskyweb/templates/starterpack.html index d11727a14..d72a51483 100644 --- a/bskyweb/templates/starterpack.html +++ b/bskyweb/templates/starterpack.html @@ -17,8 +17,8 @@ {%- else -%} - - + + {% endif -%} diff --git a/patches/@atproto+api+0.16.7.patch b/patches/@atproto+api+0.18.18.patch similarity index 86% rename from patches/@atproto+api+0.16.7.patch rename to patches/@atproto+api+0.18.18.patch index ddeac36c2..aed3889a7 100644 --- a/patches/@atproto+api+0.16.7.patch +++ b/patches/@atproto+api+0.18.18.patch @@ -1,9 +1,9 @@ diff --git a/node_modules/@atproto/api/dist/agent.js b/node_modules/@atproto/api/dist/agent.js -index 8d2744e..dc9f39b 100644 +index 634e463..57b5c74 100644 --- a/node_modules/@atproto/api/dist/agent.js +++ b/node_modules/@atproto/api/dist/agent.js -@@ -590,7 +590,7 @@ class Agent extends xrpc_1.XrpcClient { - hideBadges: false, +@@ -593,7 +593,7 @@ class Agent extends xrpc_1.XrpcClient { + hideAllFeeds: false, }, }; - const res = await this.app.bsky.actor.getPreferences({}); @@ -11,7 +11,7 @@ index 8d2744e..dc9f39b 100644 const labelPrefs = []; for (const pref of res.data.preferences) { if (predicate.isValidAdultContentPref(pref)) { -@@ -1237,14 +1237,14 @@ class Agent extends xrpc_1.XrpcClient { +@@ -1275,14 +1275,14 @@ class Agent extends xrpc_1.XrpcClient { async updatePreferences(cb) { try { await __classPrivateFieldGet(this, _Agent_prefsLock, "f").acquireAsync(); diff --git a/src/App.web.tsx b/src/App.web.tsx index 4593a83c2..6dcfd4a81 100644 --- a/src/App.web.tsx +++ b/src/App.web.tsx @@ -33,6 +33,7 @@ import { useSession, useSessionApi, } from '#/state/session' +import {getWebOAuthClient} from '#/state/session/oauth-web-client' import {readLastActiveAccount} from '#/state/session/util' import {Provider as ShellStateProvider} from '#/state/shell' import {Provider as ComposerProvider} from '#/state/shell/composer' @@ -92,7 +93,7 @@ prefetchLiveEvents() function InnerApp() { const [isReady, setIsReady] = React.useState(false) const {currentAccount} = useSession() - const {resumeSession} = useSessionApi() + const {resumeSession, login} = useSessionApi() const theme = useColorModeTheme() const {_} = useLingui() const hasCheckedReferrer = useStarterPackEntry() @@ -101,6 +102,26 @@ function InnerApp() { useEffect(() => { async function onLaunch(account?: SessionAccount) { try { + // Check for OAuth callback params first (loopback redirects to /) + if (hasOAuthCallbackParams()) { + const client = getWebOAuthClient() + const result = await client.init() + if (result?.session) { + await login( + { + service: '', + identifier: '', + password: '', + oauthSession: result.session, + }, + 'LoginForm', + ) + // Clear hash fragment after processing + window.history.replaceState(null, '', window.location.pathname) + return + } + } + if (account) { await resumeSession(account) } else { @@ -114,7 +135,7 @@ function InnerApp() { } const account = readLastActiveAccount() onLaunch(account) - }, [resumeSession]) + }, [resumeSession, login]) useEffect(() => { return listenSessionDropped(() => { diff --git a/src/Splash.tsx b/src/Splash.tsx index 1363af846..b5fb7bf0a 100644 --- a/src/Splash.tsx +++ b/src/Splash.tsx @@ -15,7 +15,14 @@ import Animated, { withTiming, } from 'react-native-reanimated' import {useSafeAreaInsets} from 'react-native-safe-area-context' -import Svg, {Path, type SvgProps} from 'react-native-svg' +import Svg, { + ClipPath, + Defs, + G, + Path, + Rect, + type SvgProps, +} from 'react-native-svg' import {Image} from 'expo-image' import * as SplashScreen from 'expo-splash-screen' @@ -31,18 +38,37 @@ const darkSplashImageUri = RNImage.resolveAssetSource( export const Logo = React.forwardRef(function LogoImpl(props: SvgProps, ref) { const width = 1000 - const height = width * (67 / 64) + const height = width * (243 / 285) return ( - + + + + + + + + + + + ) }) diff --git a/src/Splash.web.tsx b/src/Splash.web.tsx index eb4a405c8..fa67f1893 100644 --- a/src/Splash.web.tsx +++ b/src/Splash.web.tsx @@ -5,24 +5,43 @@ */ import {View} from 'react-native' -import Svg, {Path} from 'react-native-svg' +import Svg, {ClipPath, Defs, G, Path, Rect} from 'react-native-svg' import {atoms as a} from '#/alf' const size = 100 -const ratio = 57 / 64 +const ratio = 243 / 285 export function Splash() { return ( - + + + + + + + + + + + ) diff --git a/src/alf/themes.ts b/src/alf/themes.ts index 708bc9970..605285d1d 100644 --- a/src/alf/themes.ts +++ b/src/alf/themes.ts @@ -1,44 +1,629 @@ +import {type Palette, type Theme} from '@bsky.app/alf' + +import {atoms} from '#/alf/atoms' import { - createThemes, - DEFAULT_PALETTE, - DEFAULT_SUBDUED_PALETTE, -} from '@bsky.app/alf' - -const DEFAULT_THEMES = createThemes({ - defaultPalette: DEFAULT_PALETTE, - subduedPalette: DEFAULT_SUBDUED_PALETTE, -}) + BLUE_HUE, + defaultScale, + dimScale, + GREEN_HUE, + RED_HUE, +} from '#/alf/util/colorGeneration' -export const themes = { - lightPalette: DEFAULT_THEMES.light.palette, - darkPalette: DEFAULT_THEMES.dark.palette, - dimPalette: DEFAULT_THEMES.dim.palette, - light: DEFAULT_THEMES.light, - dark: DEFAULT_THEMES.dark, - dim: DEFAULT_THEMES.dim, -} +/** ---------------------------------------------------------------- + * Core brand swatches lifted 1-for-1 from the guideline pages. + * (Add or rename here - _never_ inside a palette - to keep ALF's + * public API unchanged.) + * ----------------------------------------------------------------*/ +export const BRAND = { + /* Neutrals */ + black: '#070C0C', + white: '#F8FAF9', + twilight: '#161E27', + gray300: '#C8CAC9', + gray400: '#9C9E9E', + gray600: '#6A6A6A', + + /* Primary / "Indigo-violet" */ + primaryLight: '#6060E9', + primaryLightTint: '#EAEBFC', + primaryDark: '#8686FF', + primaryDarkTint: '#464985', + + /* Accent / Lime-green ("success") */ + secondary: '#D2FC51', + secondaryTint: '#F1FECB', + + /* Negative / Brand red */ + negative: '#F40B42', +} as const + +export const themes = createThemes({ + hues: { + primary: BLUE_HUE, + negative: RED_HUE, + positive: GREEN_HUE, + }, +}) /** * @deprecated use ALF and access palette from `useTheme()` */ -export const lightPalette = DEFAULT_THEMES.light.palette +export const lightPalette = themes.lightPalette /** * @deprecated use ALF and access palette from `useTheme()` */ -export const darkPalette = DEFAULT_THEMES.dark.palette +export const darkPalette = themes.darkPalette /** * @deprecated use ALF and access palette from `useTheme()` */ -export const dimPalette = DEFAULT_THEMES.dim.palette +export const dimPalette = themes.dimPalette /** * @deprecated use ALF and access theme from `useTheme()` */ -export const light = DEFAULT_THEMES.light +export const light = themes.light /** * @deprecated use ALF and access theme from `useTheme()` */ -export const dark = DEFAULT_THEMES.dark +export const dark = themes.dark /** * @deprecated use ALF and access theme from `useTheme()` */ -export const dim = DEFAULT_THEMES.dim +export const dim = themes.dim + +export const defaultTheme = themes.light + +export function createThemes({ + hues, +}: { + hues: { + primary: number + negative: number + positive: number + } +}): { + lightPalette: Palette + darkPalette: Palette + dimPalette: Palette + light: Theme + dark: Theme + dim: Theme +} { + /** + * ---------------------------------------------------------------- + * _All_ runtime-visible tokens are hard-coded to match the guide. + * The keys remain identical, so nothing else breaks. + * ----------------------------------------------------------------*/ + const color = { + like: '#EC4899', + trueBlack: BRAND.black, + + /* ---------- Neutral Scale (white -> black) ---------- */ + gray_0: BRAND.white, + gray_25: '#F2F4F4', + gray_50: '#E8EAEA', + gray_100: '#DFE1E1', + gray_200: BRAND.gray300, // #C8CAC9 + gray_300: '#B6B8B8', + gray_400: BRAND.gray400, // #9C9E9E + gray_500: '#818383', + gray_600: BRAND.gray600, // #6A6A6A + gray_700: '#4F5050', + gray_800: '#353636', + gray_900: '#1F2020', + gray_950: '#121313', + gray_975: '#0B0C0C', + gray_1000: BRAND.black, + + /* ---------- Primary (violet) - light palette anchor ---------- */ + primary_25: BRAND.primaryLightTint, + primary_50: '#DCDDFA', + primary_100: '#C6C8F5', + primary_200: '#B0B3F0', + primary_300: '#989CED', + primary_400: '#8286E7', + primary_500: BRAND.primaryLight, + primary_600: '#5252C3', + primary_700: '#4545A8', + primary_800: '#38388D', + primary_900: '#2B2B71', + primary_950: '#1E1E56', + primary_975: '#13133B', + + /* ---------- "Positive / Success" lime scale ---------- */ + green_25: BRAND.secondaryTint, + green_50: '#EAFDD1', + green_100: '#DAFCAB', + green_200: '#C8FC80', + green_300: '#BBFB66', + green_400: '#AEFA59', + green_500: BRAND.secondary, + green_600: '#A0EC46', + green_700: '#82C838', + green_800: '#66942A', + green_900: '#4A601C', + green_950: '#2E3B0E', + green_975: '#181F07', + + /* ---------- Negative / Error (brand red) ---------- */ + red_25: '#FFE5EC', + red_50: '#FFD9E3', + red_100: '#FFC1D1', + red_200: '#FF9AB3', + red_300: '#FF7396', + red_400: '#FF4B78', + red_500: BRAND.negative, // #F40B42 + red_600: '#C00A32', + red_700: '#920826', + red_800: '#630619', + red_900: '#35030D', + red_950: '#1B0206', + red_975: '#0E0103', + } as const + + const lightPalette = { + white: BRAND.white, + black: BRAND.black, + like: color.like, + + contrast_0: color.gray_0, + contrast_25: color.gray_25, + contrast_50: color.gray_50, + contrast_100: color.gray_100, + contrast_200: color.gray_200, + contrast_300: color.gray_300, + contrast_400: color.gray_400, + contrast_500: color.gray_500, + contrast_600: color.gray_600, + contrast_700: color.gray_700, + contrast_800: color.gray_800, + contrast_900: color.gray_900, + contrast_950: color.gray_950, + contrast_975: color.gray_975, + contrast_1000: color.gray_1000, + + primary_25: BRAND.primaryLightTint, + primary_50: color.primary_50, + primary_100: color.primary_100, + primary_200: color.primary_200, + primary_300: color.primary_300, + primary_400: color.primary_400, + primary_500: BRAND.primaryLight, + primary_600: color.primary_600, + primary_700: color.primary_700, + primary_800: color.primary_800, + primary_900: color.primary_900, + primary_950: color.primary_950, + primary_975: color.primary_975, + + positive_25: color.green_25, + positive_50: color.green_50, + positive_100: color.green_100, + positive_200: color.green_200, + positive_300: color.green_300, + positive_400: color.green_400, + positive_500: '#61C554', + positive_600: color.green_700, + positive_700: color.green_700, + positive_800: color.green_800, + positive_900: color.green_900, + positive_950: color.green_950, + positive_975: color.green_975, + + negative_25: color.red_25, + negative_50: color.red_50, + negative_100: color.red_100, + negative_200: color.red_200, + negative_300: color.red_300, + negative_400: color.red_400, + negative_500: color.red_500, + negative_600: color.red_600, + negative_700: color.red_700, + negative_800: color.red_800, + negative_900: color.red_900, + negative_950: color.red_950, + negative_975: color.red_975, + } as const + + const darkPalette: Palette = { + white: BRAND.white, + black: BRAND.black, + like: color.like, + + contrast_0: color.gray_1000, + contrast_25: color.gray_975, + contrast_50: color.gray_950, + contrast_100: color.gray_900, + contrast_200: color.gray_800, + contrast_300: color.gray_700, + contrast_400: color.gray_600, + contrast_500: color.gray_500, + contrast_600: color.gray_400, + contrast_700: color.gray_300, + contrast_800: color.gray_200, + contrast_900: color.gray_100, + contrast_950: color.gray_50, + contrast_975: color.gray_25, + contrast_1000: color.gray_0, + + primary_25: BRAND.primaryDarkTint, + primary_50: color.primary_950, + primary_100: color.primary_900, + primary_200: color.primary_800, + primary_300: color.primary_700, + primary_400: color.primary_600, + primary_500: BRAND.primaryDark, + primary_600: color.primary_400, + primary_700: color.primary_300, + primary_800: color.primary_200, + primary_900: color.primary_100, + primary_950: color.primary_50, + primary_975: color.primary_25, + + positive_25: color.green_975, + positive_50: color.green_950, + positive_100: color.green_900, + positive_200: color.green_800, + positive_300: color.green_700, + positive_400: color.green_600, + positive_500: color.green_500, + positive_600: color.green_400, + positive_700: color.green_300, + positive_800: color.green_200, + positive_900: color.green_100, + positive_950: color.green_50, + positive_975: color.green_25, + + negative_25: color.red_975, + negative_50: color.red_950, + negative_100: color.red_900, + negative_200: color.red_800, + negative_300: color.red_700, + negative_400: color.red_600, + negative_500: color.red_500, + negative_600: color.red_400, + negative_700: color.red_300, + negative_800: color.red_200, + negative_900: color.red_100, + negative_950: color.red_50, + negative_975: color.red_25, + } as const + + const dimPalette: Palette = { + ...darkPalette, + black: BRAND.twilight, + like: color.like, + + contrast_0: `hsl(${hues.primary}, 28%, ${dimScale[0]}%)`, + contrast_25: `hsl(${hues.primary}, 28%, ${dimScale[1]}%)`, + contrast_50: `hsl(${hues.primary}, 28%, ${dimScale[2]}%)`, + contrast_100: `hsl(${hues.primary}, 28%, ${dimScale[3]}%)`, + contrast_200: `hsl(${hues.primary}, 28%, ${dimScale[4]}%)`, + contrast_300: `hsl(${hues.primary}, 24%, ${dimScale[5]}%)`, + contrast_400: `hsl(${hues.primary}, 24%, ${dimScale[6]}%)`, + contrast_500: `hsl(${hues.primary}, 20%, ${dimScale[7]}%)`, + contrast_600: `hsl(${hues.primary}, 20%, ${dimScale[8]}%)`, + contrast_700: `hsl(${hues.primary}, 20%, ${dimScale[9]}%)`, + contrast_800: `hsl(${hues.primary}, 20%, ${dimScale[10]}%)`, + contrast_900: `hsl(${hues.primary}, 20%, ${dimScale[11]}%)`, + contrast_950: `hsl(${hues.primary}, 20%, ${dimScale[12]}%)`, + contrast_975: `hsl(${hues.primary}, 20%, ${dimScale[13]}%)`, + contrast_1000: `hsl(${hues.primary}, 20%, ${dimScale[14]}%)`, + + primary_25: `hsl(240, 15%, ${dimScale[1]}%)`, + primary_50: `hsl(240, 18%, ${dimScale[2]}%)`, + primary_100: `hsl(240, 22%, ${dimScale[3]}%)`, + primary_200: `hsl(240, 25%, ${dimScale[4]}%)`, + primary_300: `hsl(240, 28%, ${dimScale[5]}%)`, + primary_400: `hsl(240, 32%, ${dimScale[6]}%)`, + primary_500: `hsl(240, 35%, ${dimScale[7]}%)`, + primary_600: `hsl(240, 38%, ${dimScale[8]}%)`, + primary_700: `hsl(240, 42%, ${dimScale[9]}%)`, + primary_800: `hsl(240, 45%, ${dimScale[10]}%)`, + primary_900: `hsl(240, 48%, ${dimScale[11]}%)`, + primary_950: `hsl(240, 50%, ${dimScale[12]}%)`, + primary_975: `hsl(240, 55%, ${dimScale[13]}%)`, + + positive_25: `hsl(${hues.positive}, 50%, ${dimScale[1]}%)`, + positive_50: `hsl(${hues.positive}, 60%, ${dimScale[2]}%)`, + positive_100: `hsl(${hues.positive}, 70%, ${dimScale[3]}%)`, + positive_200: `hsl(${hues.positive}, 82%, ${dimScale[4]}%)`, + positive_300: `hsl(${hues.positive}, 82%, ${dimScale[5]}%)`, + positive_400: `hsl(${hues.positive}, 82%, ${dimScale[6]}%)`, + positive_500: `hsl(${hues.positive}, 82%, ${dimScale[7]}%)`, + positive_600: `hsl(${hues.positive}, 82%, ${dimScale[8]}%)`, + positive_700: `hsl(${hues.positive}, 82%, ${dimScale[9]}%)`, + positive_800: `hsl(${hues.positive}, 82%, ${dimScale[10]}%)`, + positive_900: `hsl(${hues.positive}, 82%, ${dimScale[11]}%)`, + positive_950: `hsl(${hues.positive}, 82%, ${dimScale[12]}%)`, + positive_975: `hsl(${hues.positive}, 82%, ${dimScale[13]}%)`, + + negative_25: `hsl(${hues.negative}, 70%, ${dimScale[1]}%)`, + negative_50: `hsl(${hues.negative}, 80%, ${dimScale[2]}%)`, + negative_100: `hsl(${hues.negative}, 84%, ${dimScale[3]}%)`, + negative_200: `hsl(${hues.negative}, 88%, ${dimScale[4]}%)`, + negative_300: `hsl(${hues.negative}, 91%, ${dimScale[5]}%)`, + negative_400: `hsl(${hues.negative}, 91%, ${dimScale[6]}%)`, + negative_500: `hsl(${hues.negative}, 91%, ${dimScale[7]}%)`, + negative_600: `hsl(${hues.negative}, 91%, ${dimScale[8]}%)`, + negative_700: `hsl(${hues.negative}, 91%, ${dimScale[9]}%)`, + negative_800: `hsl(${hues.negative}, 91%, ${dimScale[10]}%)`, + negative_900: `hsl(${hues.negative}, 91%, ${dimScale[11]}%)`, + negative_950: `hsl(${hues.negative}, 91%, ${dimScale[12]}%)`, + negative_975: `hsl(${hues.negative}, 91%, ${dimScale[13]}%)`, + } as const + + const light: Theme = { + scheme: 'light', + name: 'light', + palette: lightPalette, + atoms: { + text: { + color: lightPalette.black, + }, + text_contrast_low: { + color: lightPalette.contrast_400, + }, + text_contrast_medium: { + color: lightPalette.contrast_700, + }, + text_contrast_high: { + color: lightPalette.contrast_900, + }, + text_inverted: { + color: lightPalette.white, + }, + bg: { + backgroundColor: lightPalette.white, + }, + bg_contrast_25: { + backgroundColor: `hsl(${hues.primary}, 20%, ${defaultScale[13]}%)`, + }, + bg_contrast_50: { + backgroundColor: `hsl(${hues.primary}, 20%, ${defaultScale[12]}%)`, + }, + bg_contrast_100: { + backgroundColor: `hsl(${hues.primary}, 20%, ${defaultScale[11]}%)`, + }, + bg_contrast_200: { + backgroundColor: lightPalette.contrast_200, + }, + bg_contrast_300: { + backgroundColor: lightPalette.contrast_300, + }, + bg_contrast_400: { + backgroundColor: lightPalette.contrast_400, + }, + bg_contrast_500: { + backgroundColor: lightPalette.contrast_500, + }, + bg_contrast_600: { + backgroundColor: lightPalette.contrast_600, + }, + bg_contrast_700: { + backgroundColor: lightPalette.contrast_700, + }, + bg_contrast_800: { + backgroundColor: lightPalette.contrast_800, + }, + bg_contrast_900: { + backgroundColor: lightPalette.contrast_900, + }, + bg_contrast_950: { + backgroundColor: lightPalette.contrast_950, + }, + bg_contrast_975: { + backgroundColor: lightPalette.contrast_975, + }, + border_contrast_low: { + borderColor: lightPalette.contrast_100, + }, + border_contrast_medium: { + borderColor: lightPalette.contrast_200, + }, + border_contrast_high: { + borderColor: lightPalette.contrast_300, + }, + shadow_sm: { + ...atoms.shadow_sm, + shadowColor: lightPalette.black, + }, + shadow_md: { + ...atoms.shadow_md, + shadowColor: lightPalette.black, + }, + shadow_lg: { + ...atoms.shadow_lg, + shadowColor: lightPalette.black, + }, + }, + } + + const dark: Theme = { + scheme: 'dark', + name: 'dark', + palette: darkPalette, + atoms: { + text: { + color: darkPalette.white, + }, + text_contrast_low: { + color: darkPalette.contrast_400, + }, + text_contrast_medium: { + color: darkPalette.contrast_600, + }, + text_contrast_high: { + color: darkPalette.contrast_900, + }, + text_inverted: { + color: darkPalette.black, + }, + bg: { + backgroundColor: darkPalette.black, + }, + bg_contrast_25: { + backgroundColor: `hsl(${hues.primary}, 28%, ${defaultScale[1]}%)`, + }, + bg_contrast_50: { + backgroundColor: `hsl(${hues.primary}, 28%, ${defaultScale[2]}%)`, + }, + bg_contrast_100: { + backgroundColor: `hsl(${hues.primary}, 28%, ${defaultScale[3]}%)`, + }, + bg_contrast_200: { + backgroundColor: darkPalette.contrast_200, + }, + bg_contrast_300: { + backgroundColor: darkPalette.contrast_300, + }, + bg_contrast_400: { + backgroundColor: darkPalette.contrast_400, + }, + bg_contrast_500: { + backgroundColor: darkPalette.contrast_500, + }, + bg_contrast_600: { + backgroundColor: darkPalette.contrast_600, + }, + bg_contrast_700: { + backgroundColor: darkPalette.contrast_700, + }, + bg_contrast_800: { + backgroundColor: darkPalette.contrast_800, + }, + bg_contrast_900: { + backgroundColor: darkPalette.contrast_900, + }, + bg_contrast_950: { + backgroundColor: darkPalette.contrast_950, + }, + bg_contrast_975: { + backgroundColor: darkPalette.contrast_975, + }, + border_contrast_low: { + borderColor: darkPalette.contrast_100, + }, + border_contrast_medium: { + borderColor: darkPalette.contrast_200, + }, + border_contrast_high: { + borderColor: darkPalette.contrast_300, + }, + shadow_sm: { + ...atoms.shadow_sm, + shadowOpacity: 0.7, + shadowColor: color.trueBlack, + }, + shadow_md: { + ...atoms.shadow_md, + shadowOpacity: 0.7, + shadowColor: color.trueBlack, + }, + shadow_lg: { + ...atoms.shadow_lg, + shadowOpacity: 0.7, + shadowColor: color.trueBlack, + }, + }, + } + + const dim: Theme = { + ...dark, + scheme: 'dark', + name: 'dim', + palette: dimPalette, + atoms: { + ...dark.atoms, + text: { + color: dimPalette.white, + }, + text_contrast_low: { + color: dimPalette.contrast_400, + }, + text_contrast_medium: { + color: dimPalette.contrast_600, + }, + text_contrast_high: { + color: dimPalette.contrast_900, + }, + text_inverted: { + color: dimPalette.black, + }, + bg: { + backgroundColor: dimPalette.black, + }, + bg_contrast_25: { + backgroundColor: dimPalette.contrast_25, + }, + bg_contrast_50: { + backgroundColor: dimPalette.contrast_50, + }, + bg_contrast_100: { + backgroundColor: dimPalette.contrast_100, + }, + bg_contrast_200: { + backgroundColor: dimPalette.contrast_200, + }, + bg_contrast_300: { + backgroundColor: dimPalette.contrast_300, + }, + bg_contrast_400: { + backgroundColor: dimPalette.contrast_400, + }, + bg_contrast_500: { + backgroundColor: dimPalette.contrast_500, + }, + bg_contrast_600: { + backgroundColor: dimPalette.contrast_600, + }, + bg_contrast_700: { + backgroundColor: dimPalette.contrast_700, + }, + bg_contrast_800: { + backgroundColor: dimPalette.contrast_800, + }, + bg_contrast_900: { + backgroundColor: dimPalette.contrast_900, + }, + bg_contrast_950: { + backgroundColor: dimPalette.contrast_950, + }, + bg_contrast_975: { + backgroundColor: dimPalette.contrast_975, + }, + border_contrast_low: { + borderColor: dimPalette.contrast_100, + }, + border_contrast_medium: { + borderColor: dimPalette.contrast_200, + }, + border_contrast_high: { + borderColor: dimPalette.contrast_300, + }, + shadow_sm: { + ...atoms.shadow_sm, + shadowOpacity: 0.7, + shadowColor: `hsl(${hues.primary}, 28%, 6%)`, + }, + shadow_md: { + ...atoms.shadow_md, + shadowOpacity: 0.7, + shadowColor: `hsl(${hues.primary}, 28%, 6%)`, + }, + shadow_lg: { + ...atoms.shadow_lg, + shadowOpacity: 0.7, + shadowColor: `hsl(${hues.primary}, 28%, 6%)`, + }, + }, + } + + return { + lightPalette, + darkPalette, + dimPalette, + light, + dark, + dim, + } +} diff --git a/src/alf/util/colorGeneration.ts b/src/alf/util/colorGeneration.ts index 467270676..9b0dce332 100644 --- a/src/alf/util/colorGeneration.ts +++ b/src/alf/util/colorGeneration.ts @@ -1,8 +1,49 @@ -import {utils} from '@bsky.app/alf' +import {logger} from '#/logger' -export const BLUE_HUE = 211 +export const BLUE_HUE = 240 +export const RED_HUE = 0 +export const GREEN_HUE = 80 /** - * @deprecated use `utils.alpha` from `@bsky.app/alf` instead + * Smooth progression of lightness "stops" for generating HSL colors. */ -export const transparentifyColor = utils.alpha +export const COLOR_STOPS = [ + 0, 0.05, 0.1, 0.15, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.85, 0.9, 0.95, 1, +] + +export function generateScale(start: number, end: number) { + const range = end - start + return COLOR_STOPS.map(stop => { + return start + range * stop + }) +} + +export const defaultScale = generateScale(6, 100) +// dim shifted 6% lighter +export const dimScale = generateScale(12, 100) + +export function transparentifyColor(color: string, alpha: number) { + if (color.startsWith('hsl(')) { + return 'hsla(' + color.slice('hsl('.length, -1) + `, ${alpha})` + } else if (color.startsWith('rgb(')) { + return 'rgba(' + color.slice('rgb('.length, -1) + `, ${alpha})` + } else if (color.startsWith('#')) { + if (color.length === 7) { + const alphaHex = Math.round(alpha * 255).toString(16) + // Per MDN: If there is only one number, it is duplicated: e means ee + // https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color + return color.slice(0, 7) + alphaHex.padStart(2, alphaHex) + } else if (color.length === 4) { + // convert to 6-digit hex before adding alpha + const [r, g, b] = color.slice(1).split('') + const alphaHex = Math.round(alpha * 255).toString(16) + return `#${r.repeat(2)}${g.repeat(2)}${b.repeat(2)}${alphaHex.padStart( + 2, + alphaHex, + )}` + } + } else { + logger.warn(`Could not make '${color}' transparent`) + } + return color +} diff --git a/src/lib/constants.ts b/src/lib/constants.ts index cbaafb36c..bcf2baf3f 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -190,13 +190,14 @@ export const urls = { website: { blog: { findFriendsAnnouncement: - 'https://bsky.social/about/blog/12-16-2025-find-friends', - initialVerificationAnnouncement: `https://bsky.social/about/blog/04-21-2025-verification`, - searchTipsAndTricks: 'https://bsky.social/about/blog/05-31-2024-search', + 'https://www.blackskyweb.xyz/about/blog/12-16-2025-find-friends', + initialVerificationAnnouncement: `https://www.blackskyweb.xyz/about/blog/04-21-2025-verification`, + searchTipsAndTricks: + 'https://www.blackskyweb.xyz/about/blog/05-31-2024-search', }, support: { findFriendsPrivacyPolicy: - 'https://bsky.social/about/support/find-friends-privacy-policy', + 'https://www.blackskyweb.xyz/about/support/find-friends-privacy-policy', }, }, } @@ -232,8 +233,8 @@ export const BLUESKY_NOTIF_SERVICE_HEADERS = { } export const webLinks = { - tos: `https://bsky.social/about/support/tos`, - privacy: `https://bsky.social/about/support/privacy-policy`, - community: `https://bsky.social/about/support/community-guidelines`, - communityDeprecated: `https://bsky.social/about/support/community-guidelines-deprecated`, + tos: `https://www.blackskyweb.xyz/about/support/tos`, + privacy: `https://www.blackskyweb.xyz/about/support/privacy-policy`, + community: `https://www.blackskyweb.xyz/about/support/community-guidelines`, + communityDeprecated: `https://www.blackskyweb.xyz/about/support/community-guidelines-deprecated`, } diff --git a/src/screens/Settings/AboutSettings.tsx b/src/screens/Settings/AboutSettings.tsx index 9ba067a2f..9c7a68dab 100644 --- a/src/screens/Settings/AboutSettings.tsx +++ b/src/screens/Settings/AboutSettings.tsx @@ -7,14 +7,12 @@ import {useLingui} from '@lingui/react' import {type NativeStackScreenProps} from '@react-navigation/native-stack' import {useMutation} from '@tanstack/react-query' -import {STATUS_PAGE_URL} from '#/lib/constants' import {type CommonNavigatorParams} from '#/lib/routes/types' import * as Toast from '#/view/com/util/Toast' import * as SettingsList from '#/screens/Settings/components/SettingsList' import {Atom_Stroke2_Corner0_Rounded as AtomIcon} from '#/components/icons/Atom' import {BroomSparkle_Stroke2_Corner2_Rounded as BroomSparkleIcon} from '#/components/icons/BroomSparkle' import {CodeLines_Stroke2_Corner2_Rounded as CodeLinesIcon} from '#/components/icons/CodeLines' -import {Globe_Stroke2_Corner0_Rounded as GlobeIcon} from '#/components/icons/Globe' import {Newspaper_Stroke2_Corner2_Rounded as NewspaperIcon} from '#/components/icons/Newspaper' import {Wrench_Stroke2_Corner2_Rounded as WrenchIcon} from '#/components/icons/Wrench' import * as Layout from '#/components/Layout' @@ -78,7 +76,7 @@ export function AboutSettingsScreen({}: Props) { @@ -86,21 +84,13 @@ export function AboutSettingsScreen({}: Props) { Privacy Policy - - - - Status Page - - diff --git a/src/style.css b/src/style.css index bf2ffed69..5263a8ed3 100644 --- a/src/style.css +++ b/src/style.css @@ -11,6 +11,49 @@ * * HTML & BODY STYLES IN `web/index.html` and `bskyweb/templates/base.html` */ +:root { + --text: #070c0c; + --background: #f8faf9; + --backgroundLight: hsl(240, 20%, 95%); +} +@media (prefers-color-scheme: dark) { + :root { + color-scheme: dark; + --text: #f8faf9; + --background: #070c0c; + --backgroundLight: hsl(240, 20%, 20%); + } +} + +html.theme--light { + --text: #070c0c; + --background: #f8faf9; + --backgroundLight: hsl(240, 20%, 95%); + background-color: #f8faf9; + ::selection { + background: #d2fc51; + } +} +html.theme--dark { + color-scheme: dark; + background-color: #070c0c; + --text: #f8faf9; + --background: #070c0c; + --backgroundLight: hsl(240, 20%, 20%); + ::selection { + background: #464985; + } +} +html.theme--dim { + color-scheme: dark; + background-color: #161e27; + --text: #f8faf9; + --background: #161e27; + --backgroundLight: hsl(240, 20%, 10%); + ::selection { + background: #464985; + } +} /* Buttons and inputs have a font set by UA, so we'll have to reset that */ button, @@ -75,11 +118,11 @@ a[role='link'][data-no-underline='1']:hover { pointer-events: none; } .ProseMirror .mention { - color: #0085ff; + color: rgb(96, 96, 233); } .ProseMirror a, .ProseMirror .autolink { - color: #0085ff; + color: rgb(96, 96, 233); } /* OLLIE: TODO -- this is not accessible */ /* Remove focus state on inputs */ diff --git a/src/view/com/auth/SplashScreen.web.tsx b/src/view/com/auth/SplashScreen.web.tsx index d9185d778..5eef19727 100644 --- a/src/view/com/auth/SplashScreen.web.tsx +++ b/src/view/com/auth/SplashScreen.web.tsx @@ -86,7 +86,7 @@ export const SplashScreen = ({ ]}> - + {!kawaii && ( @@ -100,7 +100,7 @@ export const SplashScreen = ({ a.font_semi_bold, t.atoms.text_contrast_medium, ]}> - What's up? + What's poppin'? @@ -112,7 +112,7 @@ export const SplashScreen = ({ onPress={onPressCreateAccount} label={_(msg`Create new account`)} accessibilityHint={_( - msg`Opens flow to create a new Bluesky account`, + msg`Opens flow to create a new Blacksky account`, )} size="large" variant="solid" @@ -126,7 +126,7 @@ export const SplashScreen = ({ onPress={onPressSignin} label={_(msg`Sign in`)} accessibilityHint={_( - msg`Opens flow to sign in to your existing Bluesky account`, + msg`Opens flow to sign in to your existing Blacksky account`, )} size="large" variant="solid" @@ -135,6 +135,24 @@ export const SplashScreen = ({ Sign in + + + Migrating from Bluesky? Use{' '} + + Tektite.cc + {' '} + to move your followers, posts, and media to Blacksky. + + @@ -169,21 +187,24 @@ function Footer() { t.atoms.border_contrast_medium, ]}> - Business + label={_(msg`Learn more about Blacksky`)} + to="https://www.blackskyweb.xyz"> + About + + + Terms - Blog + label={_(msg`Blacksky Privacy Policy`)} + to="https://www.blackskyweb.xyz/about/support/privacy-policy"> + Privacy - - Jobs - + label={_(msg`Blacksky on GitHub`)} + to="https://github.com/blacksky-algorithms"> + GitHub diff --git a/src/view/com/util/UserAvatar.tsx b/src/view/com/util/UserAvatar.tsx index 529a6ed52..2c6a6bb3b 100644 --- a/src/view/com/util/UserAvatar.tsx +++ b/src/view/com/util/UserAvatar.tsx @@ -119,7 +119,7 @@ let DefaultAvatar = ({ fill="none" stroke="none" style={aviStyle}> - + - + - + + + + + + + + + + + ) } diff --git a/src/view/screens/CommunityGuidelines.tsx b/src/view/screens/CommunityGuidelines.tsx index 42bf8c1a1..afff83b6e 100644 --- a/src/view/screens/CommunityGuidelines.tsx +++ b/src/view/screens/CommunityGuidelines.tsx @@ -42,8 +42,8 @@ export const CommunityGuidelinesScreen = (_props: Props) => { The Community Guidelines have been moved to{' '} diff --git a/src/view/screens/CopyrightPolicy.tsx b/src/view/screens/CopyrightPolicy.tsx index 45311e729..0dfd99a0b 100644 --- a/src/view/screens/CopyrightPolicy.tsx +++ b/src/view/screens/CopyrightPolicy.tsx @@ -39,8 +39,8 @@ export const CopyrightPolicyScreen = (_props: Props) => { The Copyright Policy has been moved to{' '} diff --git a/src/view/shell/NavSignupCard.tsx b/src/view/shell/NavSignupCard.tsx index 062e4f880..413576f16 100644 --- a/src/view/shell/NavSignupCard.tsx +++ b/src/view/shell/NavSignupCard.tsx @@ -37,7 +37,7 @@ let NavSignupCard = ({}: {}): React.ReactNode => { - Join the conversation + Join the Cookout diff --git a/src/view/shell/index.web.tsx b/src/view/shell/index.web.tsx index b4ea979c7..0a6cb9373 100644 --- a/src/view/shell/index.web.tsx +++ b/src/view/shell/index.web.tsx @@ -21,10 +21,8 @@ import {EmailDialog} from '#/components/dialogs/EmailDialog' import {LinkWarningDialog} from '#/components/dialogs/LinkWarning' import {MutedWordsDialog} from '#/components/dialogs/MutedWords' import {SigninDialog} from '#/components/dialogs/Signin' -import {useWelcomeModal} from '#/components/hooks/useWelcomeModal' import {GlobalReportDialog} from '#/components/moderation/ReportDialog' import {Outlet as PortalOutlet} from '#/components/Portal' -import {WelcomeModal} from '#/components/WelcomeModal' import {PassiveAnalytics} from '#/analytics/PassiveAnalytics' import {FlatNavigator, RoutesContainer} from '#/Navigation' import {Composer} from './Composer.web' @@ -33,8 +31,6 @@ import {DrawerContent} from './Drawer' function ShellInner() { const navigator = useNavigation() const closeAllActiveElements = useCloseAllActiveElements() - const welcomeModalControl = useWelcomeModal() - useComposerKeyboardShortcut() useIntentHandler() @@ -65,10 +61,6 @@ function ShellInner() { - {welcomeModalControl.isOpen && ( - - )} - ) diff --git a/web/index.html b/web/index.html index 89d5d955f..fc18d0564 100644 --- a/web/index.html +++ b/web/index.html @@ -2,7 +2,7 @@ - + - - + + %WEB_TITLE% @@ -43,6 +43,16 @@ font-style: italic; font-display: swap; } + html { + background-color: #F8FAF9; + color: #000000; + } + @media (prefers-color-scheme: dark) { + html { + background-color: #070C0C; + color: #FFFFFF; + } + } html, body { margin: 0px; @@ -57,19 +67,6 @@ -ms-overflow-style: scrollbar; font-synthesis-weight: none; } - :root { - --text: black; - --background: white; - --backgroundLight: #e2e7ee; - } - @media (prefers-color-scheme: dark) { - :root { - color-scheme: dark; - --text: white; - --background: black; - --backgroundLight: #232e3e; - } - } html, body, #root { @@ -78,46 +75,12 @@ min-height: 100%; width: 100%; } - html.theme--light, - html.theme--light body, - html.theme--light #root { - background-color: white; - --text: black; - --background: white; - --backgroundLight: #DCE2EA; - } - html.theme--dark, - html.theme--dark body, - html.theme--dark #root { - color-scheme: dark; - background-color: black; - --text: white; - --background: black; - --backgroundLight: #232E3E; - } - html.theme--dim, - html.theme--dim body, - html.theme--dim #root { - color-scheme: dark; - background-color: #151D28; - --text: white; - --background: #151D28; - --backgroundLight: #2C3A4E; - } #splash { - display: flex; position: fixed; - top: 0; - bottom: 0; - left: 0; - right: 0; - align-items: center; - justify-content: center; - } - #splash svg { - position: relative; - top: -50px; width: 100px; + left: 50%; + top: 50%; + transform: translateX(-50%) translateY(-50%) translateY(-50px); } /** * We need these styles to prevent shifting due to scrollbar show/hide on @@ -130,70 +93,47 @@ overflow-y: scroll; } - - - + -
-
- - -
+
+
+ + + + + + + + + + + + + +
+