From fc4a5e6db9b37cb451ba66cb41fae90e973702af Mon Sep 17 00:00:00 2001 From: Rudy Fraser Date: Sat, 23 Aug 2025 23:36:33 -0400 Subject: [PATCH] Update notification icons, theming, and urls --- bskyembed/src/screens/landing.tsx | 6 ++-- bskylink/src/db/index.ts | 7 ++++ bskyweb/templates/base.html | 10 +++--- src/lib/strings/url-helpers.ts | 5 +-- src/state/queries/resolve-short-link.ts | 2 +- src/state/queries/shorten-link.ts | 2 +- src/view/com/auth/SplashScreen.tsx | 19 ++++++++++ src/view/com/auth/SplashScreen.web.tsx | 18 ++++++++++ src/view/shell/Drawer.tsx | 47 +++++++++++++++++-------- src/view/shell/desktop/RightNav.tsx | 4 +-- web/index.html | 10 +++--- 11 files changed, 98 insertions(+), 32 deletions(-) diff --git a/bskyembed/src/screens/landing.tsx b/bskyembed/src/screens/landing.tsx index fb7ffbc7c..f4d6cefd7 100644 --- a/bskyembed/src/screens/landing.tsx +++ b/bskyembed/src/screens/landing.tsx @@ -18,11 +18,11 @@ import * as bsky from '../types/bsky' import {niceDate} from '../util/nice-date' const DEFAULT_POST = - 'https://bsky.app/profile/did:plc:vjug55kidv6sye7ykr5faxxn/post/3jzn6g7ixgq2y' + 'https://blacksky.community/profile/did:plc:w4xbfzo7kqfes5zb7r6qv3rw/post/3lvbehkyyvc2f' const DEFAULT_URI = - 'at://did:plc:vjug55kidv6sye7ykr5faxxn/app.bsky.feed.post/3jzn6g7ixgq2y' + 'at://did:plc:w4xbfzo7kqfes5zb7r6qv3rw/app.bsky.feed.post/3lvbehkyyvc2f' -export const EMBED_SERVICE = 'https://embed.bsky.app' +export const EMBED_SERVICE = 'https://embed.blacksky.community' export const EMBED_SCRIPT = `${EMBED_SERVICE}/static/embed.js` const root = document.getElementById('app') diff --git a/bskylink/src/db/index.ts b/bskylink/src/db/index.ts index 7fe6aa536..9b29a506a 100644 --- a/bskylink/src/db/index.ts +++ b/bskylink/src/db/index.ts @@ -34,6 +34,7 @@ export class Database { static postgres(opts: PgOptions): Database { const {schema, url, txLockNonce} = opts + const needsSSL = url.includes('sslmode=require') const pool = opts.pool ?? new Pg.Pool({ @@ -41,6 +42,12 @@ export class Database { max: opts.poolSize, maxUses: opts.poolMaxUses, idleTimeoutMillis: opts.poolIdleTimeoutMs, + // Add SSL configuration for DigitalOcean + ...(needsSSL && { + ssl: { + rejectUnauthorized: false, + }, + }), }) // Select count(*) and other pg bigints as js integer diff --git a/bskyweb/templates/base.html b/bskyweb/templates/base.html index 2952fcfc8..b1b5f6055 100644 --- a/bskyweb/templates/base.html +++ b/bskyweb/templates/base.html @@ -39,10 +39,12 @@ } html { background-color: #F8FAF9; + color: #000000; } @media (prefers-color-scheme: dark) { html { background-color: #070C0C; + color: #FFFFFF; } } html, @@ -111,10 +113,10 @@ style="width:100%;height:auto;display:block" > - - - - + + + + diff --git a/src/lib/strings/url-helpers.ts b/src/lib/strings/url-helpers.ts index bee57b7b1..a237898d2 100644 --- a/src/lib/strings/url-helpers.ts +++ b/src/lib/strings/url-helpers.ts @@ -13,6 +13,7 @@ const BSKY_TRUSTED_HOSTS = [ 'blacksky\\.app', 'blackskyweb\\.xyz', 'rsky\\.dev', + 'tektite\\.cc', 'opencollective\\.com', 'github\\.com', 'bsky\\.app', @@ -349,11 +350,11 @@ export function createProxiedUrl(url: string): string { return url } - return `https://go.bsky.app/redirect?u=${encodeURIComponent(url)}` + return `https://go.blacksky.community/redirect?u=${encodeURIComponent(url)}` } export function isShortLink(url: string): boolean { - return url.startsWith('https://go.bsky.app/') + return url.startsWith('https://go.blacksky.community/') } export function shortLinkToHref(url: string): string { diff --git a/src/state/queries/resolve-short-link.ts b/src/state/queries/resolve-short-link.ts index 649d2db74..3941a60f0 100644 --- a/src/state/queries/resolve-short-link.ts +++ b/src/state/queries/resolve-short-link.ts @@ -4,7 +4,7 @@ import {resolveShortLink} from '#/lib/link-meta/resolve-short-link' import {parseStarterPackUri} from '#/lib/strings/starter-pack' import {STALE} from '#/state/queries/index' -const ROOT_URI = 'https://go.bsky.app/' +const ROOT_URI = 'https://go.blacksky.community/' const RQKEY_ROOT = 'resolved-short-link' export const RQKEY = (code: string) => [RQKEY_ROOT, code] diff --git a/src/state/queries/shorten-link.ts b/src/state/queries/shorten-link.ts index 76c63c356..bfc5a44e0 100644 --- a/src/state/queries/shorten-link.ts +++ b/src/state/queries/shorten-link.ts @@ -3,7 +3,7 @@ import {logger} from '#/logger' export function useShortenLink() { return async (inputUrl: string): Promise<{url: string}> => { const url = new URL(inputUrl) - const res = await fetch('https://go.bsky.app/link', { + const res = await fetch('https://go.blacksky.community/link', { method: 'POST', body: JSON.stringify({ path: url.pathname, diff --git a/src/view/com/auth/SplashScreen.tsx b/src/view/com/auth/SplashScreen.tsx index dee146849..c44781c1b 100644 --- a/src/view/com/auth/SplashScreen.tsx +++ b/src/view/com/auth/SplashScreen.tsx @@ -9,6 +9,7 @@ import {Logotype} from '#/view/icons/Logotype' import {atoms as a, useTheme} from '#/alf' import {AppLanguageDropdown} from '#/components/AppLanguageDropdown' import {Button, ButtonText} from '#/components/Button' +import {InlineLinkText} from '#/components/Link.tsx' import {Text} from '#/components/Typography' import {CenteredView} from '../util/Views' @@ -70,6 +71,24 @@ export const SplashScreen = ({ Sign in + + + Migrating from Bluesky? Use{' '} + + Tektite.cc{' '} + + to move your followers, posts, and media to Blacksky. + + Sign in + + + Migrating from Bluesky? Use{' '} + + Tektite.cc{' '} + + to move your followers, posts, and media to Blacksky. + + diff --git a/src/view/shell/Drawer.tsx b/src/view/shell/Drawer.tsx index e4e819d93..ff0075914 100644 --- a/src/view/shell/Drawer.tsx +++ b/src/view/shell/Drawer.tsx @@ -6,7 +6,7 @@ import {useLingui} from '@lingui/react' import {StackActions, useNavigation} from '@react-navigation/native' import {useActorStatus} from '#/lib/actor-status' -import {FEEDBACK_FORM_URL, HELP_DESK_URL} from '#/lib/constants' +import {HELP_DESK_URL} from '#/lib/constants' import {type PressableScale} from '#/lib/custom-animations/PressableScale' import {useNavigationTabState} from '#/lib/hooks/useNavigationTabState' import {getTabState, TabState} from '#/lib/routes/helpers' @@ -243,19 +243,20 @@ let DrawerContent = ({}: React.PropsWithoutRef<{}>): React.ReactNode => { setDrawerOpen(false) }, [navigation, setDrawerOpen]) - const onPressFeedback = React.useCallback(() => { - Linking.openURL( - FEEDBACK_FORM_URL({ - email: currentAccount?.email, - handle: currentAccount?.handle, - }), - ) - }, [currentAccount]) + const onPressDiscuss = React.useCallback(() => { + Linking.openURL('https://assembly.blacksky.community') + }, []) const onPressHelp = React.useCallback(() => { Linking.openURL(HELP_DESK_URL) }, []) + const onPressContribute = React.useCallback(() => { + Linking.openURL( + 'https://opencollective.com/blacksky/contribute/backer-59760/checkout', + ) + }, []) + // rendering // = @@ -324,8 +325,9 @@ let DrawerContent = ({}: React.PropsWithoutRef<{}>): React.ReactNode => { ) @@ -334,11 +336,13 @@ DrawerContent = React.memo(DrawerContent) export {DrawerContent} let DrawerFooter = ({ - onPressFeedback, + onPressDiscuss, onPressHelp, + onPressContribute, }: { - onPressFeedback: () => void + onPressDiscuss: () => void onPressHelp: () => void + onPressContribute: () => void }): React.ReactNode => { const {_} = useLingui() const insets = useSafeAreaInsets() @@ -358,14 +362,14 @@ let DrawerFooter = ({ }, ]}> + ) } diff --git a/src/view/shell/desktop/RightNav.tsx b/src/view/shell/desktop/RightNav.tsx index 206de10df..a69ba3304 100644 --- a/src/view/shell/desktop/RightNav.tsx +++ b/src/view/shell/desktop/RightNav.tsx @@ -104,8 +104,8 @@ export function DesktopRightNav({routeName}: {routeName: string}) { <> - {_(msg`Feedback`)} + label={_(msg`Discussion`)}> + {_(msg`Discussion`)} {' • '} diff --git a/web/index.html b/web/index.html index fc9042666..c979b7293 100644 --- a/web/index.html +++ b/web/index.html @@ -44,10 +44,12 @@ } html { background-color: #F8FAF9; + color: #000000; } @media (prefers-color-scheme: dark) { html { background-color: #070C0C; + color: #FFFFFF; } } html, @@ -119,10 +121,10 @@ style="width:100%;height:auto;display:block" > - - - - + + + + -- knotmirror 0.0.1