diff --git a/.eslintrc.js b/.eslintrc.js index 8f8383b..04147be 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -94,22 +94,6 @@ module.exports = { }, ], }, - ignorePatterns: [ - '**/__mocks__/*.ts', - 'src/platform/polyfills.ts', - 'src/third-party', - 'ios', - 'android', - 'coverage', - '*.lock', - '.husky', - 'patches', - 'bskyweb', - '*.html', - 'bskyweb', - 'src/locale/locales/_build/', - 'src/locale/locales/**/*.js', - ], settings: { componentWrapperFunctions: ['observer'], }, @@ -117,4 +101,24 @@ module.exports = { sourceType: 'module', ecmaVersion: 'latest', }, + overrides: [ + { + files: ['**/*'], + excludedFiles: [ + '**/__mocks__/*.ts', + 'src/platform/polyfills.ts', + 'src/third-party', + 'ios', + 'android', + 'coverage', + '*.lock', + '.husky', + 'patches', + 'bskyweb', + '*.html', + 'src/locale/locales/_build/', + 'src/locale/locales/**/*.js', + ], + }, + ], } diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 975d029..30a79d4 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,5 +1,5 @@ name: "Feature Request" -description: "Suggest an idea for the Bluesky app." +description: "Suggest an idea for the Mention app." labels: ["feature-request"] body: - type: markdown diff --git a/bskyembed/.eslintrc b/bskyembed/.eslintrc index 2b290d5..0ddda62 100644 --- a/bskyembed/.eslintrc +++ b/bskyembed/.eslintrc @@ -4,7 +4,6 @@ "plugins": ["@typescript-eslint", "simple-import-sort"], "extends": [ "eslint:recommended", - "preact", "plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/recommended-requiring-type-checking" ], diff --git a/bskyembed/index.html b/bskyembed/index.html index 61d0c7d..60ba786 100644 --- a/bskyembed/index.html +++ b/bskyembed/index.html @@ -3,13 +3,13 @@ - Bluesky Embed + Mention Embed - + diff --git a/bskyembed/src/components/post.tsx b/bskyembed/src/components/post.tsx index 26945eb..bdf3b65 100644 --- a/bskyembed/src/components/post.tsx +++ b/bskyembed/src/components/post.tsx @@ -4,35 +4,35 @@ import { AppBskyRichtextFacet, RichText, } from '@atproto/api' -import {h} from 'preact' +import { h } from 'preact' import replyIcon from '../../assets/bubble_filled_stroke2_corner2_rounded.svg' import likeIcon from '../../assets/heart2_filled_stroke2_corner0_rounded.svg' import logo from '../../assets/logo.svg' import repostIcon from '../../assets/repost_stroke2_corner2_rounded.svg' -import {CONTENT_LABELS} from '../labels' -import {getRkey, niceDate, prettyNumber} from '../utils' -import {Container} from './container' -import {Embed} from './embed' -import {Link} from './link' +import { CONTENT_LABELS } from '../labels' +import { getRkey, niceDate, prettyNumber } from '../utils' +import { Container } from './container' +import { Embed } from './embed' +import { Link } from './link' interface Props { thread: AppBskyFeedDefs.ThreadViewPost } -export function Post({thread}: Props) { +export function Post({ thread }: Props): JSX.Element { const post = thread.post - const isAuthorLabeled = post.author.labels?.some(label => - CONTENT_LABELS.includes(label.val), - ) + const isAuthorLabeled: boolean = + post.author.labels?.some(label => CONTENT_LABELS.includes(label.val)) ?? + false let record: AppBskyFeedPost.Record | null = null if (AppBskyFeedPost.isRecord(post.record)) { record = post.record } - const href = `/profile/${post.author.did}/post/${getRkey(post)}` + const href: string = `/profile/${post.author.did}/post/${getRkey(post)}` return (
@@ -41,7 +41,7 @@ export function Post({thread}: Props) {
@@ -99,13 +99,12 @@ export function Post({thread}: Props) {

{post.replyCount - ? `Read ${prettyNumber(post.replyCount)} ${ - post.replyCount > 1 ? 'replies' : 'reply' - } on Bluesky` - : `View on Bluesky`} + ? `Read ${prettyNumber(post.replyCount)} ${post.replyCount > 1 ? 'replies' : 'reply' + } on Mention` + : `View on Mention`}

- View on Bluesky + View on Mention

@@ -113,17 +112,21 @@ export function Post({thread}: Props) { ) } -function PostContent({record}: {record: AppBskyFeedPost.Record | null}) { +function PostContent({ + record, +}: { + record: AppBskyFeedPost.Record | null +}): JSX.Element | null { if (!record) return null - const rt = new RichText({ + const rt: RichText = new RichText({ text: record.text, facets: record.facets, }) - const richText = [] + const richText: (JSX.Element | string)[] = [] - let counter = 0 + let counter: number = 0 for (const segment of rt.segments()) { if ( segment.link && diff --git a/bskyogcard/src/components/StarterPack.tsx b/bskyogcard/src/components/StarterPack.tsx index 29bb8f3..d2d04dc 100644 --- a/bskyogcard/src/components/StarterPack.tsx +++ b/bskyogcard/src/components/StarterPack.tsx @@ -1,9 +1,8 @@ /* eslint-disable bsky-internal/avoid-unwrapped-text */ -import React from 'react' -import {AppBskyGraphDefs, AppBskyGraphStarterpack} from '@atproto/api' +import { AppBskyGraphDefs, AppBskyGraphStarterpack } from '@atproto/api' -import {Butterfly} from './Butterfly.js' -import {Img} from './Img.js' +import { Butterfly } from './Butterfly.js' +import { Img } from './Img.js' export const STARTERPACK_HEIGHT = 630 export const STARTERPACK_WIDTH = 1200 @@ -17,7 +16,7 @@ export function StarterPack(props: { starterPack: AppBskyGraphDefs.StarterPackView images: Map }) { - const {starterPack, images} = props + const { starterPack, images } = props const record = AppBskyGraphStarterpack.isRecord(starterPack.record) ? starterPack.record : null @@ -109,7 +108,7 @@ export function StarterPack(props: { }}> JOIN THE CONVERSATION -
+
{imagesAcross.map((image, i) => { return (
- on Bluesky + on Bluesky
diff --git a/bskyweb/.gitignore b/bskyweb/.gitignore index a63a381..60ffd07 100644 --- a/bskyweb/.gitignore +++ b/bskyweb/.gitignore @@ -28,3 +28,4 @@ embedr-static/polyfills-*.js # Don't ignore this file !.gitignore +.vercel diff --git a/bskyweb/templates/base.html b/bskyweb/templates/base.html index 1ddd291..e24d88a 100644 --- a/bskyweb/templates/base.html +++ b/bskyweb/templates/base.html @@ -92,9 +92,9 @@ - + - + {% block html_head_extra -%}{%- endblock %} @@ -111,7 +111,7 @@