diff --git a/CHANGELOG.md b/CHANGELOG.md index 90a61343..58c433f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Added + +- add ability to configure new settings (UploadS3 bucket namespace, Rate limit for Activity pub routes, Email notifications settings, MRF Vocabulary, user bio and name length and others) + ### Changed - removes "Dashboard" from dropdown menu +- makes all single selects clearable and allow to enter custom values in all multiple selects +- remove legacy activitypub accept_blocks setting ### Fixed diff --git a/src/api/initialDataForConfig.js b/src/api/initialDataForConfig.js index bc425a35..f24ffb9a 100644 --- a/src/api/initialDataForConfig.js +++ b/src/api/initialDataForConfig.js @@ -42,7 +42,14 @@ export const initialSettings = [ { 'tuple': [':remote_post_retention_days', 90] }, { 'tuple': [':skip_thread_containment', true] }, { 'tuple': [':limit_to_local_content', ':unauthenticated'] }, - { 'tuple': [':dynamic_configuration', true] } + { 'tuple': [':dynamic_configuration', true] }, + { 'tuple': [':max_account_fields', 10] }, + { 'tuple': [':max_remote_account_fields', 20] }, + { 'tuple': [':account_field_name_length', 255] }, + { 'tuple': [':account_field_value_length', 255] }, + { 'tuple': [':external_user_synchronization', true] }, + { 'tuple': [':user_bio_length', 5000] }, + { 'tuple': [':user_name_length', 100] } ] }, { diff --git a/src/store/getters.js b/src/store/getters.js index 1e0d4791..03899ea7 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -33,6 +33,7 @@ const getters = { corsPlugMethods: state => state.settings.settings['methods'], database: state => state.settings.settings['database'], ectoRepos: state => state.settings.settings['ecto_repos'], + emailNotifications: state => state.settings.settings['email_notifications'], emoji: state => state.settings.settings['emoji'], enabled: state => state.settings.settings['enabled'], endpoint: state => state.settings.settings['Pleroma.Web.Endpoint'], @@ -67,6 +68,7 @@ const getters = { mrfSimple: state => state.settings.settings['mrf_simple'], mrfSubchain: state => state.settings.settings['mrf_subchain'], mrfUserAllowlist: state => state.settings.settings['mrf_user_allowlist'], + mrfVocabulary: state => state.settings.settings['mrf_vocabulary'], oauth2: state => state.settings.settings['oauth2'], passwordAuthenticator: state => state.settings.settings['password_authenticator'], pleromaAuthenticator: state => state.settings.settings['Pleroma.Web.Auth.Authenticator'], @@ -91,6 +93,7 @@ const getters = { uploadS3: state => state.settings.settings['Pleroma.Uploaders.S3'], uriSchemes: state => state.settings.settings['uri_schemes'], user: state => state.settings.settings['user'], + userEmail: state => state.settings.settings['Pleroma.Emails.UserEmail'], vapidDetails: state => state.settings.settings['vapid_details'], webhookUrl: state => state.settings.settings['webhook_url'] } diff --git a/src/store/modules/normalizers.js b/src/store/modules/normalizers.js index f885df89..c2a9d3e8 100644 --- a/src/store/modules/normalizers.js +++ b/src/store/modules/normalizers.js @@ -1,6 +1,6 @@ const nonAtomsTuples = ['replace', ':replace'] const nonAtomsObjects = ['match_actor', ':match_actor'] -const objects = ['digest', 'pleroma_fe', 'masto_fe', 'poll_limits'] +const objects = ['digest', 'pleroma_fe', 'masto_fe', 'poll_limits', 'styling'] const objectParents = ['mascots'] const groups = { 'cors_plug': [ @@ -24,6 +24,7 @@ const groups = { 'Pleroma.Captcha', 'Pleroma.Captcha.Kocaptcha', 'Pleroma.Emails.Mailer', + 'Pleroma.Emails.UserEmail', 'Pleroma.Repo', 'Pleroma.ScheduledActivity', 'Pleroma.Upload', @@ -45,6 +46,7 @@ const groups = { 'chat', 'database', 'ecto_repos', + 'email_notifications', 'emoji', 'env', 'fetch_initial_posts', @@ -65,6 +67,7 @@ const groups = { 'mrf_simple', 'mrf_subchain', 'mrf_user_allowlist', + 'mrf_vocabulary', 'oauth2', 'rate_limit', 'rich_media', diff --git a/src/store/modules/settings.js b/src/store/modules/settings.js index 0bf95a36..3ee58c4e 100644 --- a/src/store/modules/settings.js +++ b/src/store/modules/settings.js @@ -17,6 +17,7 @@ const settings = { 'credentials': {}, 'database': {}, 'ecto_repos': {}, + 'email_notifications': { digest: {}}, 'emoji': { groups: {}}, 'enabled': {}, 'ex_syslogger': {}, @@ -46,11 +47,13 @@ const settings = { 'mrf_simple': {}, 'mrf_subchain': { match_actor: {}}, 'mrf_user_allowlist': {}, + 'mrf_vocabulary': {}, 'oauth2': {}, 'password_authenticator': {}, 'Pleroma.Captcha': {}, 'Pleroma.Captcha.Kocaptcha': {}, 'Pleroma.Emails.Mailer': {}, + 'Pleroma.Emails.UserEmail': { styling: {}}, 'Pleroma.Repo': {}, 'Pleroma.ScheduledActivity': {}, 'Pleroma.Upload': { proxy_opts: {}}, @@ -136,7 +139,9 @@ const settings = { }, async UploadMedia({ dispatch, getters, state }, { file, tab, inputName, childName }) { const response = await uploadMedia(file, getters.authHost, getters.token) - const updatedValue = { ...state.settings[tab][inputName], ...{ [childName]: response.data.url }} + const updatedValue = childName + ? { ...state.settings[tab][inputName], ...{ [childName]: response.data.url }} + : response.data.url dispatch('UpdateSettings', { tab, data: { [inputName]: updatedValue }}) } } diff --git a/src/views/settings/components/ActivityPub.vue b/src/views/settings/components/ActivityPub.vue index b4638b00..cd14d1f9 100644 --- a/src/views/settings/components/ActivityPub.vue +++ b/src/views/settings/components/ActivityPub.vue @@ -1,10 +1,6 @@