From b6e481d63eec15191f2717957682c13ee8a68308 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Wed, 26 Mar 2025 16:59:39 +0100 Subject: [feature] Allow user to choose "gallery" style layout for web view of 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 --- internal/api/client/admin/accountsgetv2_test.go | 127 +++++++++++++++++++----- 1 file changed, 103 insertions(+), 24 deletions(-) (limited to 'internal/api/client/admin/accountsgetv2_test.go') diff --git a/internal/api/client/admin/accountsgetv2_test.go b/internal/api/client/admin/accountsgetv2_test.go index 0e3eb95e1..339c97431 100644 --- a/internal/api/client/admin/accountsgetv2_test.go +++ b/internal/api/client/admin/accountsgetv2_test.go @@ -222,6 +222,69 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "group": false } }, + { + "id": "01JPCMD83Y4WR901094YES3QC5", + "username": "media_mogul", + "domain": null, + "created_at": "2025-03-15T11:08:00.000Z", + "email": "media.mogul@example.org", + "ip": null, + "ips": [], + "locale": "en", + "invite_request": null, + "role": { + "id": "user", + "name": "user", + "color": "", + "permissions": "0", + "highlighted": false + }, + "confirmed": true, + "approved": true, + "disabled": false, + "silenced": false, + "suspended": false, + "account": { + "id": "01JPCMD83Y4WR901094YES3QC5", + "username": "media_mogul", + "acct": "media_mogul", + "display_name": "", + "locked": false, + "discoverable": false, + "bot": false, + "created_at": "2025-03-15T11:08:00.000Z", + "note": "
I'm a test account that posts a shitload of media and I have my account rendered in \"gallery\" mode
", + "url": "http://localhost:8080/@media_mogul", + "avatar": "http://localhost:8080/fileserver/01JPCMD83Y4WR901094YES3QC5/avatar/original/01JPHQZ0ZHC2AXJK1JQNXRXQZN.jpeg", + "avatar_static": "http://localhost:8080/fileserver/01JPCMD83Y4WR901094YES3QC5/avatar/small/01JPHQZ0ZHC2AXJK1JQNXRXQZN.jpeg", + "avatar_description": "DESCRIPTION_GOES_HERE", + "avatar_media_id": "01JPHQZ0ZHC2AXJK1JQNXRXQZN", + "header": "http://localhost:8080/fileserver/01JPCMD83Y4WR901094YES3QC5/header/original/01JPHRB7F2RXPTEQFRYC85EPD9.png", + "header_static": "http://localhost:8080/fileserver/01JPCMD83Y4WR901094YES3QC5/header/small/01JPHRB7F2RXPTEQFRYC85EPD9.webp", + "header_description": "DESCRIPTION_GOES_HERE", + "header_media_id": "01JPHRB7F2RXPTEQFRYC85EPD9", + "followers_count": 0, + "following_count": 0, + "statuses_count": 2, + "last_status_at": "2025-03-15", + "emojis": [], + "fields": [ + { + "name": "I'm going to post a lot of", + "value": "media!", + "verified_at": null + }, + { + "name": "and there's nothing", + "value": "you can do about it", + "verified_at": null + } + ], + "enable_rss": true, + "group": false + }, + "created_by_application_id": "01HT5P2YHDMPAAD500NDAY8JW1" + }, { "id": "01F8MH1H7YV1Z7D2C8K2730QBF", "username": "the_mighty_zork", @@ -547,18 +610,18 @@ func (suite *AccountsGetTestSuite) TestAccountsMinID() { } link := recorder.Header().Get("Link") - suite.Equal(`I'm a test account that posts a shitload of media and I have my account rendered in \"gallery\" mode
", + "url": "http://localhost:8080/@media_mogul", + "avatar": "http://localhost:8080/fileserver/01JPCMD83Y4WR901094YES3QC5/avatar/original/01JPHQZ0ZHC2AXJK1JQNXRXQZN.jpeg", + "avatar_static": "http://localhost:8080/fileserver/01JPCMD83Y4WR901094YES3QC5/avatar/small/01JPHQZ0ZHC2AXJK1JQNXRXQZN.jpeg", + "avatar_description": "DESCRIPTION_GOES_HERE", + "avatar_media_id": "01JPHQZ0ZHC2AXJK1JQNXRXQZN", + "header": "http://localhost:8080/fileserver/01JPCMD83Y4WR901094YES3QC5/header/original/01JPHRB7F2RXPTEQFRYC85EPD9.png", + "header_static": "http://localhost:8080/fileserver/01JPCMD83Y4WR901094YES3QC5/header/small/01JPHRB7F2RXPTEQFRYC85EPD9.webp", + "header_description": "DESCRIPTION_GOES_HERE", + "header_media_id": "01JPHRB7F2RXPTEQFRYC85EPD9", "followers_count": 0, "following_count": 0, - "statuses_count": 0, - "last_status_at": null, + "statuses_count": 2, + "last_status_at": "2025-03-15", "emojis": [], - "fields": [], + "fields": [ + { + "name": "I'm going to post a lot of", + "value": "media!", + "verified_at": null + }, + { + "name": "and there's nothing", + "value": "you can do about it", + "verified_at": null + } + ], + "enable_rss": true, "group": false - } + }, + "created_by_application_id": "01HT5P2YHDMPAAD500NDAY8JW1" } ]`, dst.String()) } -- cgit v1.2.3