summaryrefslogtreecommitdiff
path: root/web/source
AgeCommit message (Collapse)AuthorFiles
2025-05-26[feature] Add "Instance Info" settings panel section, with domain blocks + ↵Libravatar tobi13
allows (#4193) This pull request adds a new read-only, user-level "instance info" section to the settings panel, which presents api/v2/instance info in a nice readable format, and also gives the user authenticated access to the blocklist and allowlist of the domain. Closes https://codeberg.org/superseriousbusiness/gotosocial/issues/3711 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4193 Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-05-26[feature] update proof-of-work to allow setting required rounds (#4186)Libravatar kim2
# Description This updates our proof-of-work middleware, NoLLaMas, to work on a more easily configurable algorithm (thank you f0x for bringing this to my attention!). Instead of requiring that a solution with pre-determined number of '0' chars be found, it now pre-computes a result with a pre-determined nonce value that it expects the client to iterate up-to. (though with some level of jitter applied, to prevent it being too-easily gamed). This allows the user to configure roughly how many hash-encode rounds they want their clients to have to complete. ## Checklist - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [x] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [x] I/we have commented the added code, particularly in hard-to-understand areas. - [x] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [x] I/we have run tests and they pass locally with the changes. - [x] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4186 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-05-22[feature] Add ListenBrainz functionality on the web view (#4184)Libravatar tobi1
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>
2025-05-20[feature] Allow exposing allows, implement `/api/v1/domain_blocks` and ↵Libravatar tobi1
`/api/v1/domain_allows` (#4169) - adds config flags `instance-expose-allowlist` and `instance-expose-allowlist-web` to allow instance admins to expose their allowlist via the web + api. - renames `instance-expose-suspended` and `instance-expose-suspended-web` to `instance-expose-blocklist` and `instance-expose-blocklist-web`. - deprecates the `suspended` filter on `/api/v1/instance/peers` endpoint and adds `blocked` and `allowed` filters - adds the `flat` query param to `/api/v1/instance/peers` to allow forcing return of a flat list of domains - implements `/api/v1/instance/domain_blocks` and `/api/v1/instance/domain_allows` endpoints with or without auth depending on config - rejigs the instance about page to include a general section on domain permissions, with block and allow subsections (and appropriate links) Closes https://codeberg.org/superseriousbusiness/gotosocial/issues/3847 Closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4150 Prerequisite to https://codeberg.org/superseriousbusiness/gotosocial/issues/3711 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4169 Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-05-07[chore/frontend] Put fonts in folders, update ecks pee to ↵Libravatar tobi1
atkinson-hyperlegible next/mono (#4148) Juggles our fonts around a bit to use subdirs for font families, and also updates atkinson hyperlegible to atkinson hyperlegible next, which includes monospace fonts. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4148 Reviewed-by: Daenney <daenney@noreply.codeberg.org> Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-05-06[bugfix] Fixes to tablist, fileinput, checkbox (#4139)Libravatar tobi4
Some fixes to various frontend things: - Fix signup checkbox being height 0 on webkit - closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4136 - Fix wonky file input on chrome and webkit - closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4138 - Make tablist in interaction policies keyboard accessible with proper left/right + focus handling, see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/tablist_role Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4139 Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-05-03[chore] more NoLLaMas proof-of-work tweaking (#4096)Libravatar kim4
- replaces the sha256 calculation with an alternative implementation that seems to use more uniform time-taken across different platforms - goes back to the simpler difficulty calculation without a "partial" difficulty level Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4096 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-04-29[chore] tweak NoLLaMas proof-of-work algorithm (#4090)Libravatar kim2
# Description - tweaks the NoLLaMas proof-of-work algorithm to further granularity on time spent computing solutions - standardizes GoToSocial cookie security directive setting in a CookiePolicy{} type ## Checklist - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [x] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [x] I/we have commented the added code, particularly in hard-to-understand areas. - [ ] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [ ] I/we have run tests and they pass locally with the changes. - [x] I/we have run `go fmt ./...` and `golangci-lint run`. Co-authored-by: tobi <tobi.smethurst@protonmail.com> Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4090 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-04-29[chore] nollamas: show tick + time taken on completion, use ↵Libravatar tobi2
`window.location.replace` (#4088) # Description > If this is a code change, please include a summary of what you've coded, and link to the issue(s) it closes/implements. > > If this is a documentation change, please briefly describe what you've changed and why. Tweak to show time taken when solving nollamas, and use a pulser rather than a spinner to indicate work being done. Also use `window.location.replace` for doing the redirect instead of setting window.location.href: https://developer.mozilla.org/en-US/docs/Web/API/Location/replace ## Checklist Please put an x inside each checkbox to indicate that you've read and followed it: `[ ]` -> `[x]` If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want). - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [x] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [x] I/we have commented the added code, particularly in hard-to-understand areas. - [ ] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [ ] I/we have run tests and they pass locally with the changes. - [ ] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4088 Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-04-28[feature] proof of work scraper deterrence (#4043)Libravatar kim4
This adds a proof-of-work based scraper deterrence to GoToSocial's middleware stack on profile and status web pages. Heavily inspired by https://github.com/TecharoHQ/anubis, but massively stripped back for our own usecase. Todo: - ~~add configuration option so this is disabled by default~~ - ~~fix whatever weirdness is preventing this working with CSP (even in debug)~~ - ~~use our standard templating mechanism going through apiutil helper func~~ - ~~probably some absurdly small performance improvements to be made in pooling re-used hex encode / hash encode buffers~~ the web endpoints aren't as hot a path as API / ActivityPub, will leave as-is for now as it is already very minimal and well optimized - ~~verify the cryptographic assumptions re: using a portion of token as challenge data~~ this isn't a serious application of cryptography, if it turns out to be a problem we'll fix it, but it definitely should not be easily possible to guess a SHA256 hash from the first 1/4 of it even if mathematically it might make it a bit easier - ~~theme / make look nice??~~ - ~~add a spinner~~ - ~~add entry in example configuration~~ - ~~add documentation~~ Verification page originally based on https://github.com/LucienV1/powtect Co-authored-by: tobi <tobi.smethurst@protonmail.com> Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4043 Reviewed-by: tobi <tsmethurst@noreply.codeberg.org> Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-04-27[chore] Rewrite all remaining Github linksLibravatar Daenney1
2025-04-26[feature] Move to code.superseriousbusiness.orgLibravatar Daenney2
2025-04-26[feature] Update attachment format, receive + send `focalPoint` prop + use ↵Libravatar tobi4
it on the frontend (#4052) * [feature] Update attachment format, receive + send `focalPoint` prop + use it on the frontend * whoops * boop * restore function signature of ExtractAttachments
2025-04-23[chore/frontend] Update skulk, caniuse (#4044)v0.19.0Libravatar tobi2
2025-04-22Bump http-proxy-middleware from 2.0.7 to 2.0.9 in /web/source (#4041)v0.19.0-rc3Libravatar dependabot[bot]1
2025-04-22[chore/frontend] Reorder JS a little bit to avoid visible text changes (#4039)Libravatar tobi3
2025-04-19[bugfix] Fix '+'-separated scopes not being recognized (#4028)Libravatar tobi2
* [bugfix] Fix '+'-separated scopes not being recognized * comment
2025-04-19[chore] Little settings panel report view tweak (#4025)v0.19.0-rc2Libravatar tobi2
2025-04-18[bugfix] new token API issues (#4022)Libravatar kim1
* fix incorrect endpoint being registered for /token/{id} * update the maximum page value for tokens endpoint to 100 * update the available tokens page options * set a default limit of 25 to match the first available settings panel option * ensure OnInvalidateToken() hook is called during token delete
2025-04-18[feature/frontend] Hide "engagement" stats, edits, and other info under a ↵Libravatar tobi5
little drop down to unclutter status info bar (#4021) * dick about with stats a bit * more dicking abuot * lil tweaks * more about-dicking * weee * comments * fixie uppie
2025-04-15[chore/bugfix] fix import file on click (#4016)Libravatar tobi1
2025-04-15[chore/performance] Reuse Intl.DateTimeFormat for formatting times (#4013)Libravatar tobi1
2025-04-14[bugfix/frontend] Fix photoswipe layout issues, keyboard shortcuts (#4010)Libravatar tobi15
* fix photoswipe layout issues (chrome) * aaaaaaaaaaaaaa * wwwwwwwwwwww
2025-04-14[chore] Update + add fonts for additional scripts, use locally installed ↵Libravatar tobi6
font if available (#3997) * [chore] Update + add fonts for additional scripts, use locally installed font if available * update comments
2025-04-14[feature/frontend] Add visibility icon for posts (#4005)Libravatar tobi1
2025-04-11[chore] Fix header insets (#3987)Libravatar tobi1
2025-04-11[chore] render avatar in photoswipe slide, remove repeated alt text (#3985)Libravatar tobi1
* [chore] render avatar in photoswipe slide, remove repeated alt text * bwap bwap
2025-04-10[feature] Implement /oauth/revoke for token revocation (#3983)Libravatar tobi1
2025-04-09[bugfix] Fix a couple accessibility issues with `:focus` elements (#3979)Libravatar tobi21
* [bugfix/frontend] Fix accessibility/focus issues in settings + web ui * fix little error * tweaks
2025-04-07[feature] add TOTP two-factor authentication (2FA) (#3960)Libravatar tobi14
* [feature] add TOTP two-factor authentication (2FA) * use byteutil.S2B to avoid allocations when comparing + generating password hashes * don't bother with string conversion for consts * use io.ReadFull * use MustGenerateSecret for backup codes * rename util functions
2025-04-05[feature] Allow deleting avatar + header via settings panel (#3970)Libravatar tobi3
2025-04-04[feature] Allow editing domain blocks/allows, fix comment import (#3967)Libravatar tobi8
* start implementing editing of existing domain permissions * [feature] Allow editing domain blocks/allows, fix comment import * [bugfix] Use "comment" via /api/v1/instance * fix the stuff
2025-03-31[feature] Use blurhashes in frontend, tidy up gallery view a bit (#3948)Libravatar tobi8
* [feature] Use blurhashes in frontend, tidy up gallery view a bit * weeeeeeeeeeeeeeeee * beep boop
2025-03-26[feature] Allow user to choose "gallery" style layout for web view of ↵Libravatar tobi14
profile (#3917) * [feature] Allow user to choose "gallery" style web layout * find a bug and squish it up and all day long you'll have good luck * just a sec * [performance] reindex public timeline + tinker with query a bit * fiddling * should be good now * last bit of finagling, i'm done now i prommy * panic normally
2025-03-17[feature] Application creation + management via API + settings panel (#3906)Libravatar tobi32
* [feature] Application creation + management via API + settings panel * fix docs links * add errnorows test * use known application as shorter * add comment about side effects
2025-03-14[feature/frontend] Add visibility icon for posts (#3908)Libravatar tobi1
2025-03-13Bump @babel/helpers from 7.23.1 to 7.26.10 in /web/source (#3901)Libravatar dependabot[bot]1
Bumps [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers) from 7.23.1 to 7.26.10. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-helpers) --- updated-dependencies: - dependency-name: "@babel/helpers" dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-07[feature] Parse content warning to HTML, serialize via client API as ↵Libravatar tobi2
plaintext (#3876) * [feature] Parse content warning as HTML, serialize via API to plaintext * tidy up some cruft * whoops * oops * i'm da joker baybee * clemency muy lorde * rename some of the text functions for clarity * jiggle the opts * fiddle de deee * hopefully the last test fix i ever have to do in my beautiful life
2025-03-04[feature] Add token review / delete to backend + settings panel (#3845)Libravatar tobi8
2025-03-02[chore] little frontend tweaks (#3852)Libravatar tobi1
* [chore] little frontend tweaks * beep boop * poke * clarify server time
2025-03-01[feature/frontend] use localized time string in status & poll info page (#3821)Libravatar CDN1
2025-03-01[feature] Implement CSV import for mutes (#3696)Libravatar Xavier Vello1
* Implement CSV import for mutes * update swagger.yaml * update documentation * add ImportTestSuite.TestImportMutes * fix comment typo
2025-02-26[feature] Enforce OAuth token scopes (#3835)Libravatar tobi2
* move tokenauth to apiutil * enforce scopes * docs * update test models, remove deprecated "follow" * file header * tests * tweak scope matcher * simplify... * fix tests * log user out of settings panel in case of oauth error
2025-02-25[chore] Fix typo in common.tsx (#3834)Libravatar Privacy_Dragon1
2025-02-13[chore] Bump elliptic from 6.6.0 to 6.6.1 in /web/source (#3791)v0.18.0-rc2Libravatar dependabot[bot]1
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.6.0 to 6.6.1. - [Commits](https://github.com/indutny/elliptic/compare/v6.6.0...v6.6.1) --- updated-dependencies: - dependency-name: elliptic dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-09[bugfix] Fix missing `hasChanged` func (#3764)Libravatar tobi1
2025-02-09[chore/frontend] Tweak display of "edited" in web UI a bit (#3766)Libravatar tobi1
2025-02-09[feature/frontend] add light mode color scheme of base css, adapt to ↵Libravatar CDN3
prefers-color-scheme (#3765)
2025-01-27[feature/frontend] Add login button to index page which reiterates info ↵Libravatar Vivian Lim ⭐3
about clients (#3377) * Add login button to index page which reiterates info about clients * bit of CSS fiddling, move apps from front page to login info * fix indentation --------- Co-authored-by: tobi <tobi.smethurst@protonmail.com>
2025-01-24[feature] show status edits on frontend (#3678)Libravatar kim1
* add 'edited-at' field to status info web template * make the edited-at text italic * small change in phrasing