diff --git a/.env.example b/.env.example index df3456410b..93fa4c3124 100644 --- a/.env.example +++ b/.env.example @@ -46,3 +46,6 @@ GEOLOCATION_DEV_URL= # live-events web worker URL LIVE_EVENTS_DEV_URL= + +# app-config web worker URL +APP_CONFIG_DEV_URL= diff --git a/CLAUDE.md b/CLAUDE.md index ea77e350d3..240c1a4268 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -24,13 +24,15 @@ yarn android # Run on Android yarn ios # Run on iOS # Testing & Quality +# IMPORTANT: Always use these yarn scripts, never call the underlying tools directly yarn test # Run Jest tests yarn lint # Run ESLint yarn typecheck # Run TypeScript type checking # Internationalization -yarn intl:extract # Extract translation strings (you don't typically need to run this manually, we have CI for it) -yarn intl:compile # Compile translations for runtime +# DO NOT run these commands - extraction and compilation are handled by CI +yarn intl:extract # Extract translation strings (nightly CI job) +yarn intl:compile # Compile translations for runtime (nightly CI job) # Build yarn build-web # Build web version @@ -299,8 +301,9 @@ function MyComponent() { **Commands:** ```bash +# DO NOT run these commands - extraction and compilation are handled by a nightly CI job yarn intl:extract # Extract new strings to locale files -yarn intl:compile # Compile for runtime (required after changes) +yarn intl:compile # Compile translations for runtime ``` ## State Management diff --git a/__tests__/lib/string.test.ts b/__tests__/lib/string.test.ts index c59c8b3e34..7a20a49a4e 100644 --- a/__tests__/lib/string.test.ts +++ b/__tests__/lib/string.test.ts @@ -437,6 +437,13 @@ describe('parseEmbedPlayerFromUrl', () => { 'https://www.flickr.com/groups/898944@N23/', 'https://www.flickr.com/groups', + + 'https://maxblansjaar.bandcamp.com/album/false-comforts', + 'https://grmnygrmny.bandcamp.com/track/fluid', + 'https://sufjanstevens.bandcamp.com/', + 'https://sufjanstevens.bandcamp.com', + 'https://bandcamp.com/', + 'https://bandcamp.com', ] const outputs = [ @@ -815,6 +822,23 @@ describe('parseEmbedPlayerFromUrl', () => { undefined, undefined, + + { + type: 'bandcamp_album', + source: 'bandcamp', + playerUri: + 'https://bandcamp.com/EmbeddedPlayer/url=https%3A%2F%2Fmaxblansjaar.bandcamp.com%2Falbum%2Ffalse-comforts/size=large/bgcol=ffffff/linkcol=0687f5/minimal=true/transparent=true/', + }, + { + type: 'bandcamp_track', + source: 'bandcamp', + playerUri: + 'https://bandcamp.com/EmbeddedPlayer/url=https%3A%2F%2Fgrmnygrmny.bandcamp.com%2Ftrack%2Ffluid/size=large/bgcol=ffffff/linkcol=0687f5/minimal=true/transparent=true/', + }, + undefined, + undefined, + undefined, + undefined, ] it('correctly grabs the correct id from uri', () => { diff --git a/assets/icons/person_filled_corner2_rounded.svg b/assets/icons/person_filled_corner2_rounded.svg new file mode 100644 index 0000000000..d22056593d --- /dev/null +++ b/assets/icons/person_filled_corner2_rounded.svg @@ -0,0 +1 @@ + diff --git a/assets/images/germ_logo.webp b/assets/images/germ_logo.webp new file mode 100644 index 0000000000..a85048381a Binary files /dev/null and b/assets/images/germ_logo.webp differ diff --git a/bskyweb/README.md b/bskyweb/README.md index 6da8e1d06a..b682929975 100644 --- a/bskyweb/README.md +++ b/bskyweb/README.md @@ -6,21 +6,26 @@ To build the SPA bundle (`bundle.web.js`), first get a JavaScript development environment set up. Either follow the top-level README, or something quick like: - # install nodejs - nvm install - nvm use - npm install --global yarn +```bash +# install nodejs +nvm install +nvm use +npm install --global yarn - # setup tools and deps (in top level of this repo) - yarn install --frozen-lockfile +# setup tools and deps (in top level of this repo) +yarn install --frozen-lockfile - # run yarn web dev server, if you wanted - yarn web +# run yarn web dev server, if you wanted +yarn web +``` Then build and copy over the big 'ol `bundle.web.js` file: - # in the top level of this repo - yarn build-web + +```bash +# in the top level of this repo +yarn build-web +``` ### Golang Daemon @@ -28,11 +33,13 @@ Install golang. We generally develop against the current stable release of the l In this directory (`bskyweb/`): - # re-build and run daemon - go run ./cmd/bskyweb serve +```bash +# re-build and run daemon +go run ./cmd/bskyweb serve - # build and output a binary - go build -o bskyweb ./cmd/bskyweb/ +# build and output a binary +go build -o bskyweb ./cmd/bskyweb/ +``` The easiest way to configure the daemon is to copy `example.env` to `.env` and fill in auth values there. diff --git a/bskyweb/cmd/bskyweb/server.go b/bskyweb/cmd/bskyweb/server.go index 5b81396262..1f9c0ed649 100644 --- a/bskyweb/cmd/bskyweb/server.go +++ b/bskyweb/cmd/bskyweb/server.go @@ -574,7 +574,10 @@ func (srv *Server) WebPost(c echo.Context) error { if postView.Embed != nil && !isEmbedHidden { hasImages := postView.Embed.EmbedImages_View != nil - hasMedia := postView.Embed.EmbedRecordWithMedia_View != nil && postView.Embed.EmbedRecordWithMedia_View.Media != nil && postView.Embed.EmbedRecordWithMedia_View.Media.EmbedImages_View != nil + hasVideo := postView.Embed.EmbedVideo_View != nil + hasMedia := postView.Embed.EmbedRecordWithMedia_View != nil && postView.Embed.EmbedRecordWithMedia_View.Media != nil + hasMediaImages := hasMedia && postView.Embed.EmbedRecordWithMedia_View.Media.EmbedImages_View != nil + hasMediaVideo := hasMedia && postView.Embed.EmbedRecordWithMedia_View.Media.EmbedVideo_View != nil if hasImages { var thumbUrls []string @@ -582,12 +585,20 @@ func (srv *Server) WebPost(c echo.Context) error { thumbUrls = append(thumbUrls, postView.Embed.EmbedImages_View.Images[i].Thumb) } data["imgThumbUrls"] = thumbUrls - } else if hasMedia { + } else if hasVideo { + if postView.Embed.EmbedVideo_View.Thumbnail != nil { + data["imgThumbUrls"] = []string{*postView.Embed.EmbedVideo_View.Thumbnail} + } + } else if hasMediaImages { var thumbUrls []string for i := range postView.Embed.EmbedRecordWithMedia_View.Media.EmbedImages_View.Images { thumbUrls = append(thumbUrls, postView.Embed.EmbedRecordWithMedia_View.Media.EmbedImages_View.Images[i].Thumb) } data["imgThumbUrls"] = thumbUrls + } else if hasMediaVideo { + if postView.Embed.EmbedRecordWithMedia_View.Media.EmbedVideo_View.Thumbnail != nil { + data["imgThumbUrls"] = []string{*postView.Embed.EmbedRecordWithMedia_View.Media.EmbedVideo_View.Thumbnail} + } } } diff --git a/bskyweb/templates/base.html b/bskyweb/templates/base.html index 0c4a91df6b..e33479e697 100644 --- a/bskyweb/templates/base.html +++ b/bskyweb/templates/base.html @@ -148,11 +148,11 @@ {%- block body_all %} +
+ + +
-
- - -