diff --git a/README.md b/README.md index f4b0f5760..72ed00f5e 100644 --- a/README.md +++ b/README.md @@ -193,6 +193,26 @@ NODE_ENV=development - `yarn test:jest` - Frontend unit tests. +# Contributing + +We welcome contributions to this project. To contribute, first review the [Contributing doc](docs/contributing.md) + +Additional supporting documents include: +* [Soapbox History](docs/history.md) +* [Redux Store Map](docs/history.md) + +# Customization + +Soapbox supports customization of the user interface, to allow per instance branding and other features. Current customization features include: +* Instance name +* Site logo +* Favicon +* About page +* Terms of Service page +* Promo panel list items, e.g. blog site link + +Customization details can be found in the [Customization doc](docs/customization.md) + # License soapbox-fe is free software: you can redistribute it and/or modify diff --git a/docs/contributing.md b/docs/contributing.md new file mode 100644 index 000000000..e4910f027 --- /dev/null +++ b/docs/contributing.md @@ -0,0 +1,116 @@ +# Contributing to Soapbox + +When contributing to Soapbox, please first discuss the change you wish to make via issue, +email, or any other method with the owners of this repository before making a change. + +## Project Contribution Flow + +It is recommended that you use the following guidelines to contribute to the Soapbox project: + +* Understand recommended [GitLab Flow](https://www.youtube.com/watch?v=InKNIvky2KE) methods on branch management +* Use the following branch management process: + * Pull a fork + * Mirror the fork against the original repository, setting the mirror to only mirror to protected branches + * Set the master branch in your fork to Protected + * Never modify the master branch in your fork, so that your fork mirroring does not break + * Pull branches in your fork to solve specific issues + * Do merge requests only to the original repository master branch, so that your fork mirroring does not break +* If you don't use the above policy, when your mirrored fork breaks mirroring, you can force your fork to back to successful mirroring using the following process: + * Unprotect the master branch of your fork from force push + * Use the following git commands from the cmd line of your local copy of your fork's master branch + ``` + git remote add upstream /url/to/original/repo + git fetch upstream + git checkout master + git reset --hard upstream/master + git push origin master --force + ``` + * Re-protect the master branch of your fork from force push + +Please note we have a code of conduct, please follow it in all your interactions with the project. + +## Pull Request Process + +1. Ensure any install or build dependencies are removed before the end of the layer when doing a + build. +2. Update the README.md with details of changes to the interface, this includes new environment + variables, exposed ports, useful file locations and container parameters. +3. Increase the version numbers in any examples files and the README.md to the new version that this + Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). +4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you + do not have permission to do that, you may request the second reviewer to merge it for you. + +## Code of Conduct + +### Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +### Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +### Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +### Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +### Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at [INSERT EMAIL ADDRESS]. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +### Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ \ No newline at end of file diff --git a/docs/customization.md b/docs/customization.md new file mode 100644 index 000000000..41154ce66 --- /dev/null +++ b/docs/customization.md @@ -0,0 +1,52 @@ +# Customizing Soapbox + +First [Install Soapbox](https://soapbox.pub/) + +Soapbox supports customization of the user interface, to allow per instance branding and other features. Current customization features include: +* Instance name +* Site logo +* Promo panel list items, e.g. blog site link +* Favicon +* About page +* Terms of Service page + +## Instance Name +Instance name is edited during the Pleroma installation step + +## Site Logo and Promo Panel List Items +The site logo and promo panel list items are customized by copying `soapbox.example.json` in `static/instance` folder to `soapbox.json` +Re-create the webpack and restart the soapbox-fe service to effect the changes. + +An example of the contents of `soapbox.example.json`: +``` +{ + "logo": "https://media.gleasonator.com/site_uploads/files/000/000/002/original/logo.svg", + "promoPanel": { + "items": [{ + "icon": "area-chart", + "text": "Our Site stats", + "url": "https://fediverse.network/example.com" + }, { + "icon": "comment-o", + "text": "Our Site blog", + "url": "https://blog.example.com" + }] + }, + "extensions": { + "patron": false + }, + "defaultSettings": { + "autoPlayGif": false, + "theme": "lime" + } +} +``` + +## Favicon +The favicon is customized by dropping a favicon.png file into the `/static` folder. +Re-create the webpack and restart the soapbox-fe service to effect the changes. + +## About Page and Terms of Service Page +The About page is customized by ensuring that the `static/instance/about` folder exists and dropping an `index.html` file into it. +The Terms of Service page is customized by dropping a `tos.html` file into the `static/instance/about` folder. +Re-create the webpack and restart the soapbox-fe service to effect the changes. diff --git a/docs/store.md b/docs/store.md index 3e3a60002..134904e2b 100644 --- a/docs/store.md +++ b/docs/store.md @@ -11,93 +11,926 @@ Due to the large size of the Redux store in soapbox-fe, it's worth documenting t If it's not documented, it's because I inherited it from Mastodon and I don't know what it does yet. - `dropdown_menu` + + Sample: + ``` + dropdown_menu: { + openId: null, + placement: null, + keyboard: false + } + ``` - `timelines` - -- `meta` - User-specific data that is _not_ a frontend setting (see: `settings`). - - - `pleroma` - Pleroma specific metadata about the user pulled from `/api/v1/accounts/verify_credentials` (excluding the pleroma_settings_store) + + Sample: + ``` + timelines: { + home: { + items: [ + '9uiMtlRMLHBnRg8tMG', + '9uiLe5Q6Bsb8p8VslU', + '9uiLMqdbtfE03Tc4uW', + '9uiLEal13YvYUB8lN2', + '9uiKwwSPdc0iZg1SUK', + '9uiKq5TRiRJGVoEmau', + '9uiKbTN4aHsmHgHtsO', + '9ugVkEfNKtvGSpJGLI' + ], + totalQueuedItemsCount: 0, + queuedItems: [], + hasMore: true, + unread: 0, + isLoading: false, + online: true, + top: true, + isPartial: false + } + } + ``` + +- `meta` - User-specific data that is _not_ a frontend setting (see: `settings`). + + Sample: + ``` + meta: { + pleroma: { + unread_conversation_count: 0, + hide_follows: false, + hide_followers_count: false, + background_image: 'https://dev.teci.world/media/74644a40461bb85fa41db02547b656fa382e0e2ada29021059ff2a2956c1bbab.jpg', + confirmation_pending: false, + is_moderator: false, + deactivated: false, + chat_token: 'SFMyNTY.g3QAAAACZAAEZGF0YW0AAAASOXRvMU5QeVM5OEo4Y2RpY1JFZAAGc2lnbmVkbgYAcH3yxnEB.qD9qQzEfRH4sfJQfPCJQKHayVUQ6_1m6t5iqE7jB17Q', + allow_following_move: true, + hide_follows_count: false, + notification_settings: { + followers: true, + follows: true, + non_followers: true, + non_follows: true, + privacy_option: false + }, + hide_followers: false, + relationship: { + showing_reblogs: true, + followed_by: false, + subscribing: false, + blocked_by: false, + requested: false, + domain_blocking: false, + following: false, + endorsed: false, + blocking: false, + muting: false, + id: '9to1NPyS98J8cdicRE', + muting_notifications: false + }, + tags: [], + hide_favorites: true, + is_admin: true, + skip_thread_containment: false + } + } + ``` + +- `pleroma` - Pleroma specific metadata about the user pulled from `/api/v1/accounts/verify_credentials` (excluding the pleroma_settings_store) - `alerts` + + Sample: + ``` + alerts: [] + ``` - `loadingBar` - Managed by [react-redux-loading-bar](https://github.com/mironov/react-redux-loading-bar) -- `modal` + Sample: + ``` + loadingBar: { + 'default': 0 + } + ``` +- `modal` + + Sample: + ``` + modal: { + modalType: null, + modalProps: {} + } + ``` - `user_lists` + + Sample: + ``` + user_lists: { + reblogged_by: {}, + blocks: {}, + groups_removed_accounts: {}, + following: {}, + follow_requests: {}, + groups: {}, + followers: {}, + mutes: {}, + favourited_by: {} + } + ``` - `domain_lists` + + Sample: + ``` + domain_lists: { + blocks: { + items: [] + } + } + ``` - `status_lists` - -- `accounts` - Data for all accounts you've viewed since launching the page, so they don't have to be downloaded twice. + + Sample: + ``` + status_lists: { + favourites: { + next: null, + loaded: false, + items: [ + '9uh7FiM4hViVp59hSa', + '9uhsxmGKEMBkWoykng' + ] + }, + pins: { + next: null, + loaded: false, + items: [] + } + } + ``` +- `accounts` - Data for all accounts you've viewed since launching the page, so they don't have to be downloaded twice. + + Sample: + ``` + accounts: { + '9to1NPyS98J8cdicRE': { + header_static: 'https://dev.teci.world/media/27272c6f53a8a535d2c11a98d3b3473833bf80192e82347548b9f1b6dc4027ab.jpg', + display_name_html: 'crockwave', + follow_requests_count: 0, + bot: false, + display_name: 'crockwave', + created_at: '2020-04-07T16:29:04.000Z', + locked: false, + emojis: [], + header: 'https://dev.teci.world/media/27272c6f53a8a535d2c11a98d3b3473833bf80192e82347548b9f1b6dc4027ab.jpg', + url: 'https://dev.teci.world/users/curtis', + note: '', + acct: 'curtis', + avatar_static: 'https://dev.teci.world/media/3e41f0e4e0b7e673959061f90c69a57ff547bd48ccca90df5d46be87a874febd.png', + username: 'curtis', + avatar: 'https://dev.teci.world/media/3e41f0e4e0b7e673959061f90c69a57ff547bd48ccca90df5d46be87a874febd.png', + fields: [], + pleroma: { + unread_conversation_count: 0, + hide_follows: false, + hide_followers_count: false, + background_image: 'https://dev.teci.world/media/74644a40461bb85fa41db02547b656fa382e0e2ada29021059ff2a2956c1bbab.jpg', + confirmation_pending: false, + is_moderator: false, + deactivated: false, + allow_following_move: true, + hide_follows_count: false, + notification_settings: { + followers: true, + follows: true, + non_followers: true, + non_follows: true, + privacy_option: false + }, + hide_followers: false, + relationship: { + showing_reblogs: true, + followed_by: false, + subscribing: false, + blocked_by: false, + requested: false, + domain_blocking: false, + following: false, + endorsed: false, + blocking: false, + muting: false, + id: '9to1NPyS98J8cdicRE', + muting_notifications: false + }, + tags: [], + hide_favorites: true, + is_admin: true, + skip_thread_containment: false + }, + source: { + fields: [], + note: '', + pleroma: { + actor_type: 'Person', + discoverable: false, + no_rich_text: false, + show_role: true + }, + privacy: 'public', + sensitive: false + }, + id: '9to1NPyS98J8cdicRE', + note_emojified: '' + } + } + ``` - `accounts_counters` + + Sample: + ``` + accounts_counters: { + '9tyANut1gDEkHqrvo8': { + followers_count: 0, + following_count: 0, + statuses_count: 11 + }, + '9toQ7nsnbhnTcNVBxI': { + followers_count: 342, + following_count: 800, + statuses_count: 721 + }, + '9tqzs9mEQIBxYPBk0G': { + followers_count: 0, + following_count: 0, + statuses_count: 48 + } + } + ``` - `statuses` - Data for all statuses you've viewed since launching the page, so they don't have to be downloaded twice. - + + Sample: + ``` + statuses: { + '9uVxGSYFo6ooon0ebQ': { + in_reply_to_account_id: null, + contentHtml: '

jpg test @curtis

', + mentions: [ + { + acct: 'curtis', + id: '9to1NPyS98J8cdicRE', + url: 'https://dev.teci.world/users/curtis', + username: 'curtis' + } + ], + created_at: '2020-04-28T21:10:16.000Z', + spoiler_text: '', + hidden: false, + muted: false, + uri: 'https://gleasonator.com/users/crockwave/statuses/104078260079111405', + spoilerHtml: '', + emojis: [], + account: '9toTIlRPKG2j5obki8', + reblogs_count: 0, + url: 'https://gleasonator.com/@crockwave/posts/104078260079111405', + application: { + name: 'Web', + website: null + }, + card: null, + in_reply_to_id: null, + reblogged: false, + visibility: 'public', + bookmarked: false, + reblog: null, + media_attachments: [ + { + description: null, + id: '1375732379', + pleroma: { + mime_type: 'image/jpeg' + }, + preview_url: 'https://media.gleasonator.com/media_attachments/files/000/853/856/original/7035d67937053e1d.jpg', + remote_url: 'https://media.gleasonator.com/media_attachments/files/000/853/856/original/7035d67937053e1d.jpg', + text_url: 'https://media.gleasonator.com/media_attachments/files/000/853/856/original/7035d67937053e1d.jpg', + type: 'image', + url: 'https://media.gleasonator.com/media_attachments/files/000/853/856/original/7035d67937053e1d.jpg' + } + ], + sensitive: false, + replies_count: 0, + language: null, + pinned: false, + tags: [], + content: '

jpg test @curtis

', + favourites_count: 0, + pleroma: { + direct_conversation_id: null, + spoiler_text: { + 'text/plain': '' + }, + local: false, + emoji_reactions: [], + thread_muted: false, + conversation_id: 1951, + content: { + 'text/plain': 'jpg test @curtis' + }, + in_reply_to_account_acct: null, + expires_at: null + }, + favourited: false, + id: '9uVxGSYFo6ooon0ebQ', + search_index: 'jpg test @curtis', + poll: null + } + } + ``` + - `relationships` + + Sample: + ``` + relationships: {} + ``` - `settings` - Any frontend configuration values that should be persisted to the backend database. This includes user preferences as well as metadata such as emoji usage counters. It uses [`pleroma_settings_store`](https://docs-develop.pleroma.social/backend/API/differences_in_mastoapi_responses/#accounts) to do it if it's available. If there's some other endpoint that handles your value, it doesn't belong here. - + + Sample: + ``` + settings: { + autoPlayGif: true, + displayMedia: true, + deleteModal: true, + unfollowModal: false, + frequentlyUsedEmojis: { + grinning: 1, + 'star-struck': 1 + }, + onboarded: false, + defaultPrivacy: 'private', + demetricator: false, + saved: true, + notifications: { + alerts: { + favourite: true, + follow: true, + mention: true, + poll: true, + reblog: true + }, + quickFilter: { + active: 'all', + advanced: false, + show: true + }, + shows: { + favourite: true, + follow: true, + mention: true, + poll: true, + reblog: true + }, + sounds: { + favourite: true, + follow: true, + mention: true, + poll: true, + reblog: true + } + }, + theme: 'azure', + 'public': { + other: { + onlyMedia: false + }, + regex: { + body: '' + } + }, + direct: { + regex: { + body: '' + } + }, + community: { + other: { + onlyMedia: false + }, + regex: { + body: '' + } + }, + boostModal: false, + dyslexicFont: false, + expandSpoilers: false, + skinTone: 1, + trends: { + show: true + }, + reduceMotion: false, + columns: [ + { + id: 'COMPOSE', + params: {}, + uuid: '8200299a-f689-45ad-ad33-c9eb20b6286c' + }, + { + id: 'HOME', + params: {}, + uuid: '1b1f69f4-d024-4d31-b5cd-b45fe77f4dc1' + }, + { + id: 'NOTIFICATIONS', + params: {}, + uuid: 'e8c3904c-bf54-4047-baaa-aa786afebb3b' + } + ], + systemFont: false, + home: { + regex: { + body: '' + }, + shows: { + reblog: true, + reply: true + } + } + } + ``` + - `push_notifications` - + + Sample: + ``` + push_notifications: { + subscription: null, + alerts: { + follow: false, + favourite: false, + reblog: false, + mention: false, + poll: false + }, + isSubscribed: false, + browserSupport: false + } + ``` - `mutes` - + + Sample: + ``` + mutes: { + 'new': { + isSubmitting: false, + account: null, + notifications: true + } + } + ``` + - `reports` + + Sample: + ``` + reports: { + 'new': { + isSubmitting: false, + account_id: null, + status_ids: [], + comment: '', + forward: false + } + } + ``` - `contexts` + Sample: + ``` + contexts: { + inReplyTos: { + '9uhsxm9adOniBvpNIm': '9uh7FiM4hViVp59hSa', + '9uiMtlRMLHBnRg8tMG': '9uiIk2f13yfg8mdfhg', + '9uiLe5Q6Bsb8p8VslU': '9uiIk2f13yfg8mdfhg', + '9uhBdzVeyImLnGTDZQ': '9uhB399i946ozmdRGC', + '9uiKLrbohWVWp5k0Su': '9uiJzdGZLWjBy9Ca24', + '9ui47WONBnvPhQalgu': '9ui47WHdaqXNMXROC0', + '9ui5t93pL19HC0FppI': '9ui5qe5DXbA8XQiFyS', + }, + replies: { + '9uhsxm9adOniBvpNIm': [ + '9uhsxmGKEMBkWoykng' + ], + '9ui8gFu0tBewVfD38y': [ + '9ui8gG1SRVc8skgzkO' + ], + '9uiIk2f13yfg8mdfhg': [ + '9uiJxjFm7BylxVvHPc', + '9uiJzdGZLWjBy9Ca24', + '9uiLe5Q6Bsb8p8VslU', + '9uiMtlRMLHBnRg8tMG' + ], + '9uiKLrbohWVWp5k0Su': [ + '9uiKbTN4aHsmHgHtsO' + ], + '9ui68mCA7SZwuSbfqi': [ + '9ui6Fz6cW4kGyiS3lo' + ] + } + } + ``` - `compose` + + Sample: + ``` + compose: { + spoiler: false, + focusDate: null, + privacy: 'private', + spoiler_text: '', + in_reply_to: null, + default_privacy: 'private', + is_uploading: false, + caretPosition: null, + text: '', + preselectDate: null, + progress: 0, + idempotencyKey: '046ddfb7-ce76-4dbd-ae43-e6e8417947fd', + suggestions: [], + resetFileKey: 53748, + media_attachments: [], + sensitive: false, + default_sensitive: false, + mounted: 0, + is_composing: false, + tagHistory: [], + id: null, + is_submitting: false, + is_changing_upload: false, + suggestion_token: null, + poll: null + } + ``` - `search` - + + Sample: + ``` + search: { + value: '', + submitted: false, + hidden: false, + results: {} + } + ``` - `media_attachments` - + + Sample: + ``` + media_attachments: { + accept_content_types: [ + '.jpg', + '.jpeg', + '.png', + '.gif', + '.webp', + '.webm', + '.mp4', + '.m4v', + '.mov', + 'image/jpeg', + 'image/png', + 'image/gif', + 'image/webp', + 'video/webm', + 'video/mp4', + 'video/quicktime' + ] + } + ``` + - `notifications` - -- `height_cache` + + Sample: + ``` + notifications: { + items: [ + { + id: '27', + type: 'mention', + account: '9uXUwPp1pwGsA2Qh3A', + created_at: '2020-04-29T15:11:54.000Z', + status: '9uXVnHKu7Lu9BrXvCC' + }, + { + id: '8', + type: 'mention', + account: '9toQ7nsnbhnTcNVBxI', + created_at: '2020-04-27T19:16:44.000Z', + status: '9uTicLRt0ZoVX25ZvE' + }, + { + id: '7', + type: 'favourite', + account: '9toQ7nsnbhnTcNVBxI', + created_at: '2020-04-27T19:16:25.000Z', + status: '9uThsXbbTg6luknEmG' + } + ], + hasMore: true, + top: false, + unread: 0, + isLoading: false, + queuedNotifications: [], + totalQueuedNotificationsCount: 0, + lastRead: -1 + } + ``` + +- `height_cache` + + Sample: + ``` + height_cache: { + '9t06sd:home_timeline': { + '9uXhrY530I85jJvpwW': 164.171875, + '9uXVdgMQDqa1uGgESG': 300.140625, + '9uXWs4FmHnJW17zncW': 852.171875, + '9uXX4IfAXO0yBNhmQy': 166.171875, + '9uXXThi8XzE56gCtE0': 145.140625 + } + } + ``` - `custom_emojis` - + + Sample: + ``` + custom_emojis: [ + { + category: 'Fun', + shortcode: 'blank', + static_url: 'https://dev.teci.world/emoji/blank.png', + tags: [ + 'Fun' + ], + url: 'https://dev.teci.world/emoji/blank.png', + visible_in_picker: true + }, + { + category: 'Gif,Fun', + shortcode: 'firefox', + static_url: 'https://dev.teci.world/emoji/Firefox.gif', + tags: [ + 'Gif', + 'Fun' + ], + url: 'https://dev.teci.world/emoji/Firefox.gif', + visible_in_picker: true + } + ] + ``` + - `identity_proofs` - `lists` + + Sample: + ``` + lists: {}, + ``` - `listEditor` - + + Sample: + ``` + listEditor: { + listId: null, + isSubmitting: false, + isChanged: false, + title: '', + accounts: { + items: [], + loaded: false, + isLoading: false + }, + suggestions: { + value: '', + items: [] + } + } + ``` - `listAdder` + + Sample: + ``` + listAdder: { + accountId: null, + lists: { + items: [], + loaded: false, + isLoading: false + } + } + ``` - `filters` + + Sample: + ``` + filters: [], + ``` - `conversations` + + Sample: + ``` + conversations: { + items: [], + isLoading: false, + hasMore: true, + mounted: false + } + ``` - `suggestions` + + Sample: + ``` + suggestions: { + items: [], + isLoading: false + }, + ``` - `polls` - + + Sample: + ``` + polls: {} + ``` - `trends` -- `groups` + Sample: + ``` + trends: { + items: [], + isLoading: false + } + ``` +- `groups` + + Sample: + ``` + groups: {} + ``` - `group_relationships` - + + Sample: + ``` + group_relationships: {} + ``` + - `group_lists` - + + Sample: + ``` + group_lists: { + featured: [], + member: [], + admin: [] + } + ``` + - `group_editor` + + Sample: + ``` + group_editor: { + groupId: null, + isSubmitting: false, + isChanged: false, + title: '', + description: '', + coverImage: null + } + ``` - `sidebar` + + Sample: + ``` + sidebar: {} + ``` - `patron` - Data related to [soapbox-patron](https://gitlab.com/soapbox-pub/soapbox-patron) - -- `soapbox` - Soapbox specific configuration pulled from `/instance/soapbox.json`. The configuration file isn't required and this map can be empty. + + Sample: + ``` + patron: {} + ``` + +- `soapbox` - Soapbox specific configuration pulled from `/instance/soapbox.json`. The configuration file isn't required and this map can be empty. + + Sample: + ``` + soapbox: { + logo: 'https://support.wirelessmessaging.com/temp/tga/teci_social_logo.svg', + promoPanel: { + items: [ + { + icon: 'comment-o', + text: 'TECI blog', + url: 'https://www.teci.world/blog' + } + ] + }, + extensions: { + patron: false + } + } + ``` - `instance` - Instance data pulled from `/api/v1/instance` - + + Sample: + ``` + instance: { + avatar_upload_limit: 2000000, + urls: { + streaming_api: 'wss://dev.teci.world' + }, + thumbnail: 'https://dev.teci.world/instance/thumbnail.jpeg', + uri: 'https://dev.teci.world', + background_upload_limit: 4000000, + banner_upload_limit: 4000000, + poll_limits: { + max_expiration: 31536000, + max_option_chars: 200, + max_options: 20, + min_expiration: 0 + }, + version: '2.7.2 (compatible; Pleroma 2.0.1)', + title: 'TECI Dev', + max_toot_chars: 5000, + registrations: true, + languages: [ + 'en' + ], + email: 'curtis.rock@gmail.com', + description: 'A Pleroma instance, an alternative fediverse server', + upload_limit: 16000000, + stats: { + domain_count: 161, + status_count: 1, + user_count: 5 + } + } + ``` + - `me` - The account ID of the currently logged in user, 'null' if loading, and 'false' if no user is logged in. + + Sample: + ``` + me: '9to1NPyS98J8cdicRE' + ``` - `auth` - Data used for authentication - - - `app` - Map containing the app used to make app requests such as register/login and its access token. - - - `user` - Map containing the access token of the logged in user. + + Sample: + ``` + auth: { + app: { + vapid_key: 'BEm4LT3n_cxFsGIqI-iG-Uea0OXgnjTtQAa4sPhkguP2rCbFfqL6xHOzo-cS3j9G7kG9eQ3deIQdkXbvTwgcLAk', + token_type: 'Bearer', + client_secret: 'ZuCeHoYy43MGifOnZyjWn82Kuq1YkeVAlwlxqvnGR6Q', + redirect_uri: 'urn:ietf:wg:oauth:2.0:oob', + created_at: 1587504650, + name: 'SoapboxFE_2020-04-21T21:30:45.889Z', + client_id: 'OyjobYI1RQcx3G6RIJ7brm2RmIy6M2hbme2oEwByjvI', + expires_in: 600, + scope: 'read write follow push admin', + refresh_token: 'TNFBq7Dp6ryLkUoHHbnUp3y5c-U6ya_c7DcSnfM86wo', + website: null, + id: '23', + access_token: 'aN65U4SXw2JjOeOyko1-w7KIxaJnOqtU-Z3izpdKqcg' + }, + user: { + access_token: 'UeWx_MgQckL993--BetNsJHcwxq1BVmtxc4qJtb-DM8', + created_at: 1588607387, + expires_in: 600, + me: 'https://dev.teci.world/users/curtis', + refresh_token: '2mbb3ZqZ9w8eeSiLRDC2SsQ86-UmVDrScmFXPx4opvw', + scope: 'read write follow push admin', + token_type: 'Bearer' + } + } + ``` +- `app` - Map containing the app used to make app requests such as register/login and its access token. + +- `user` - Map containing the access token of the logged in user.