diff options
| author | 2025-05-22 12:34:39 +0200 | |
|---|---|---|
| committer | 2025-05-22 12:34:39 +0200 | |
| commit | 00e58c60cd59882199a7e378416a279de2b5212d (patch) | |
| tree | c2846ea546174498ed5b4ad68ac9a0039749a9c2 /docs | |
| parent | [chore] Upgrade to Go 1.24 (#4187) (diff) | |
| download | gotosocial-00e58c60cd59882199a7e378416a279de2b5212d.tar.xz | |
[feature] Add ListenBrainz functionality on the web view (#4184)
This pull request adds a very simple ad-hoc ListenBrainz widget to the frontend web view, with progressive enhancement (in all fail states it just falls back to rendering the field as normal).
This necessitated adding the ListenBrainz API endpoint to the `connect-src` part of our Content-Security-Policy header. We might want to tweak this to only add that endpoint to `connect-src` for profiles, and then only for profiles that include a ListenBrainz field, but this would require significant dicking about with the middleware, and checks inside the app logic, such that it might not be worthwhile (after all, we control all the scripts right now anyway).
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4184
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/overrides/public/user-settings-listenbrainz-fields.png | bin | 0 -> 34371 bytes | |||
| -rw-r--r-- | docs/overrides/public/user-settings-listenbrainz.png | bin | 0 -> 35869 bytes | |||
| -rw-r--r-- | docs/user_guide/settings.md | 13 |
3 files changed, 13 insertions, 0 deletions
diff --git a/docs/overrides/public/user-settings-listenbrainz-fields.png b/docs/overrides/public/user-settings-listenbrainz-fields.png Binary files differnew file mode 100644 index 000000000..a54f2a232 --- /dev/null +++ b/docs/overrides/public/user-settings-listenbrainz-fields.png diff --git a/docs/overrides/public/user-settings-listenbrainz.png b/docs/overrides/public/user-settings-listenbrainz.png Binary files differnew file mode 100644 index 000000000..51f53d1eb --- /dev/null +++ b/docs/overrides/public/user-settings-listenbrainz.png diff --git a/docs/user_guide/settings.md b/docs/user_guide/settings.md index ab095288a..96cebe911 100644 --- a/docs/user_guide/settings.md +++ b/docs/user_guide/settings.md @@ -98,6 +98,19 @@ Some examples: - Pronouns : she/her - My other account : @someone@somewhere.com +!!! Tip "ListenBrainz integration" + If you set the key of one of your profile fields to "ListenBrainz" and the value to the URL of your ListenBrainz profile (something like `https://listenbrainz.org/user/your_listenbrainz_username/` -- the slash at the end is important!), then the field will be replaced on the web frontend with whatever you're currently listening to! + + This only applies to the web view of your GoToSocial profile, for visitors with Javascript enabled; the "currently listening" value doesn't federate to other servers, only your ListenBrainz URL. + + How to set it: + +  + + How it looks on the web when you're listening to something: + +  + ### Visibility and Privacy #### Visibility Level of Posts to Show on Your Profile |
