From 3525400eb2c8c9fd7ac0cac7c3e3f2cd0e340274 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 15:57:39 -0500 Subject: [PATCH 01/18] Sync FE static/config.json --- priv/static/static/config.json | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/priv/static/static/config.json b/priv/static/static/config.json index c82678699..727dde73b 100644 --- a/priv/static/static/config.json +++ b/priv/static/static/config.json @@ -1,23 +1,28 @@ { - "theme": "pleroma-dark", - "background": "/static/aurora_borealis.jpg", - "logo": "/static/logo.png", - "logoMask": true, - "logoMargin": ".1em", - "redirectRootNoLogin": "/main/all", - "redirectRootLogin": "/main/friends", - "showInstanceSpecificPanel": false, - "collapseMessageWithSubject": false, - "scopeCopy": true, - "subjectLineBehavior": "email", - "postContentType": "text/plain", "alwaysShowSubjectInput": true, + "background": "/static/aurora_borealis.jpg", + "collapseMessageWithSubject": false, + "disableChat": false, + "greentext": false, + "hideFilteredStatuses": false, + "hideMutedPosts": false, "hidePostStats": false, + "hideSitename": false, "hideUserStats": false, "loginMethod": "password", - "webPushNotifications": false, + "logo": "/static/logo.png", + "logoMargin": ".1em", + "logoMask": true, + "minimalScopesMode": false, "noAttachmentLinks": false, "nsfwCensorImage": "", + "postContentType": "text/plain", + "redirectRootLogin": "/main/friends", + "redirectRootNoLogin": "/main/all", + "scopeCopy": true, "showFeaturesPanel": true, - "minimalScopesMode": false + "showInstanceSpecificPanel": false, + "subjectLineBehavior": "email", + "theme": "pleroma-dark", + "webPushNotifications": false } From 1b9358116246a6c4c5fcfce0b15b11f2c92d1e07 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:03:42 -0500 Subject: [PATCH 02/18] Synchronize suggestions with all available static/config.json settings --- config/description.exs | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/config/description.exs b/config/description.exs index 36ec3d40a..65353efc3 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1105,24 +1105,32 @@ description: "Settings for Pleroma FE", suggestions: [ %{ - theme: "pleroma-dark", - logo: "/static/logo.png", - background: "/images/city.jpg", - redirectRootNoLogin: "/main/all", - redirectRootLogin: "/main/friends", - showInstanceSpecificPanel: true, - scopeOptionsEnabled: false, - formattingOptionsEnabled: false, - collapseMessageWithSubject: false, - hidePostStats: false, - hideUserStats: false, - scopeCopy: true, - subjectLineBehavior: "email", alwaysShowSubjectInput: true, - logoMask: false, + background: "/static/aurora_borealis.jpg", + collapseMessageWithSubject: false, + disableChat: false, + greentext: false, + hideFilteredStatuses: false, + hideMutedPosts: false, + hidePostStats: false, + hideSitename: false, + hideUserStats: false, + loginMethod: "password", + logo: "/static/logo.png", logoMargin: ".1em", - stickers: false, - enableEmojiPicker: false + logoMask: true, + minimalScopesMode: false, + noAttachmentLinks: false, + nsfwCensorImage: "", + postContentType: "text/plain", + redirectRootLogin: "/main/friends", + redirectRootNoLogin: "/main/all", + scopeCopy: true, + showFeaturesPanel: true, + showInstanceSpecificPanel: false, + subjectLineBehavior: "email", + theme: "pleroma-dark", + webPushNotifications: false } ], children: [ From 1e48aee50e91e0e81887d4a2a482aa03691f1a6b Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:18:26 -0500 Subject: [PATCH 03/18] Alpha sort FE config descriptions --- config/description.exs | 134 ++++++++++++++++++++--------------------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/config/description.exs b/config/description.exs index 65353efc3..2119ed177 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1135,10 +1135,50 @@ ], children: [ %{ - key: :theme, + key: :alwaysShowSubjectInput, + label: "Always show subject input", + type: :boolean, + description: "When disabled, auto-hide the subject field if it's empty" + }, + %{ + key: :background, type: :string, - description: "Which theme to use, they are defined in styles.json", - suggestions: ["pleroma-dark"] + description: + "URL of the background, unless viewing a user profile with a background that is set", + suggestions: ["/images/city.jpg"] + }, + %{ + key: :collapseMessageWithSubject, + label: "Collapse message with subject", + type: :boolean, + description: + "When a message has a subject (aka Content Warning), collapse it by default" + }, + %{ + key: :enableEmojiPicker, + label: "Emoji picker", + type: :boolean, + description: "Enables emoji picker." + }, + %{ + key: :formattingOptionsEnabled, + label: "Formatting options enabled", + type: :boolean, + description: + "Enable setting a formatting different than plain-text (ie. HTML, Markdown) when posting, relates to `:instance`, `allowed_post_formats`" + }, + %{ + key: :hidePostStats, + label: "Hide post stats", + type: :boolean, + description: "Hide notices statistics (repeats, favorites, ...)" + }, + %{ + key: :hideUserStats, + label: "Hide user stats", + type: :boolean, + description: + "Hide profile statistics (posts, posts per day, followers, followings, ...)" }, %{ key: :logo, @@ -1147,11 +1187,21 @@ suggestions: ["/static/logo.png"] }, %{ - key: :background, + key: :logoMargin, + label: "Logo margin", type: :string, description: - "URL of the background, unless viewing a user profile with a background that is set", - suggestions: ["/images/city.jpg"] + "Allows you to adjust vertical margins between logo boundary and navbar borders. " <> + "The idea is that to have logo's image without any extra margins and instead adjust them to your need in layout.", + suggestions: [".1em"] + }, + %{ + key: :logoMask, + label: "Logo mask", + type: :boolean, + description: + "By default it assumes logo used will be monochrome with alpha channel to be compatible with both light and dark themes. " <> + "If you want a colorful logo you must disable logoMask." }, %{ key: :redirectRootNoLogin, @@ -1170,10 +1220,10 @@ suggestions: ["/main/friends"] }, %{ - key: :showInstanceSpecificPanel, - label: "Show instance specific panel", + key: :scopeCopy, + label: "Scope copy", type: :boolean, - description: "Whenether to show the instance's specific panel" + description: "Copy the scope (private/unlisted/public) in replies to posts by default" }, %{ key: :scopeOptionsEnabled, @@ -1182,37 +1232,15 @@ description: "Enable setting a notice visibility and subject/CW when posting" }, %{ - key: :formattingOptionsEnabled, - label: "Formatting options enabled", + key: :showInstanceSpecificPanel, + label: "Show instance specific panel", type: :boolean, - description: - "Enable setting a formatting different than plain-text (ie. HTML, Markdown) when posting, relates to `:instance`, `allowed_post_formats`" + description: "Whenether to show the instance's specific panel" }, %{ - key: :collapseMessageWithSubject, - label: "Collapse message with subject", + key: :stickers, type: :boolean, - description: - "When a message has a subject (aka Content Warning), collapse it by default" - }, - %{ - key: :hidePostStats, - label: "Hide post stats", - type: :boolean, - description: "Hide notices statistics (repeats, favorites, ...)" - }, - %{ - key: :hideUserStats, - label: "Hide user stats", - type: :boolean, - description: - "Hide profile statistics (posts, posts per day, followers, followings, ...)" - }, - %{ - key: :scopeCopy, - label: "Scope copy", - type: :boolean, - description: "Copy the scope (private/unlisted/public) in replies to posts by default" + description: "Enables stickers." }, %{ key: :subjectLineBehavior, @@ -1225,38 +1253,10 @@ suggestions: ["email", "masto", "noop"] }, %{ - key: :alwaysShowSubjectInput, - label: "Always show subject input", - type: :boolean, - description: "When disabled, auto-hide the subject field if it's empty" - }, - %{ - key: :logoMask, - label: "Logo mask", - type: :boolean, - description: - "By default it assumes logo used will be monochrome with alpha channel to be compatible with both light and dark themes. " <> - "If you want a colorful logo you must disable logoMask." - }, - %{ - key: :logoMargin, - label: "Logo margin", + key: :theme, type: :string, - description: - "Allows you to adjust vertical margins between logo boundary and navbar borders. " <> - "The idea is that to have logo's image without any extra margins and instead adjust them to your need in layout.", - suggestions: [".1em"] - }, - %{ - key: :stickers, - type: :boolean, - description: "Enables stickers." - }, - %{ - key: :enableEmojiPicker, - label: "Emoji picker", - type: :boolean, - description: "Enables emoji picker." + description: "Which theme to use, they are defined in styles.json", + suggestions: ["pleroma-dark"] } ] }, From e2c80e62f1234165ba296beeac20d8e8bd6fc295 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:19:17 -0500 Subject: [PATCH 04/18] Stickers setting does not exist --- config/description.exs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/config/description.exs b/config/description.exs index 2119ed177..8d22c6f48 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1237,11 +1237,6 @@ type: :boolean, description: "Whenether to show the instance's specific panel" }, - %{ - key: :stickers, - type: :boolean, - description: "Enables stickers." - }, %{ key: :subjectLineBehavior, label: "Subject line behavior", From 2e28b501323e3656e04f7f7672f753272679a5ef Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:23:42 -0500 Subject: [PATCH 05/18] scopeOptionsEnabled has been replaced with minimalScopesMode --- config/description.exs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/config/description.exs b/config/description.exs index 8d22c6f48..c2e309cd4 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1203,6 +1203,13 @@ "By default it assumes logo used will be monochrome with alpha channel to be compatible with both light and dark themes. " <> "If you want a colorful logo you must disable logoMask." }, + %{ + key: :minimalScopesMode, + label: "Minimal scopes mode", + type: :boolean, + description: "Limit scope selection to Direct, User default, and Scope of post replying to. " <> + "Also prevents replying to a DM with a public post from PleromaFE." + }, %{ key: :redirectRootNoLogin, label: "Redirect root no login", @@ -1225,12 +1232,6 @@ type: :boolean, description: "Copy the scope (private/unlisted/public) in replies to posts by default" }, - %{ - key: :scopeOptionsEnabled, - label: "Scope options enabled", - type: :boolean, - description: "Enable setting a notice visibility and subject/CW when posting" - }, %{ key: :showInstanceSpecificPanel, label: "Show instance specific panel", From 4aad764c1d2ccd90b697e38ce2044ae4ccdb7dea Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:24:37 -0500 Subject: [PATCH 06/18] enableEmojiPicker is not a setting --- config/description.exs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/config/description.exs b/config/description.exs index c2e309cd4..8f050ae8a 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1154,12 +1154,6 @@ description: "When a message has a subject (aka Content Warning), collapse it by default" }, - %{ - key: :enableEmojiPicker, - label: "Emoji picker", - type: :boolean, - description: "Enables emoji picker." - }, %{ key: :formattingOptionsEnabled, label: "Formatting options enabled", From 2420d7f4394f1a447221c74270b593fcf3956f41 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:26:49 -0500 Subject: [PATCH 07/18] Spelling/grammar --- config/description.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/description.exs b/config/description.exs index 8f050ae8a..5e097aec2 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1230,7 +1230,7 @@ key: :showInstanceSpecificPanel, label: "Show instance specific panel", type: :boolean, - description: "Whenether to show the instance's specific panel" + description: "Whether to show the instance's custom panel" }, %{ key: :subjectLineBehavior, @@ -1245,7 +1245,7 @@ %{ key: :theme, type: :string, - description: "Which theme to use, they are defined in styles.json", + description: "Which theme to use. Available themes are defined in styles.json", suggestions: ["pleroma-dark"] } ] From 4bdde143f99d0a5cef6a15475b5e4591994ca546 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:30:24 -0500 Subject: [PATCH 08/18] Add disableChat option --- config/description.exs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/description.exs b/config/description.exs index 5e097aec2..2870a6591 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1154,6 +1154,12 @@ description: "When a message has a subject (aka Content Warning), collapse it by default" }, + %{ + key: :disableChat, + label: "PleromaFE Chat", + type: :boolean, + description: "Disables PleromaFE Chat component" + }, %{ key: :formattingOptionsEnabled, label: "Formatting options enabled", From 38fb5eaf6adf97ca9158bf5d0df1225b9c1778de Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:31:15 -0500 Subject: [PATCH 09/18] formattingOptionsEnabled no longer exists --- config/description.exs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/config/description.exs b/config/description.exs index 2870a6591..b4c598cb4 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1160,13 +1160,6 @@ type: :boolean, description: "Disables PleromaFE Chat component" }, - %{ - key: :formattingOptionsEnabled, - label: "Formatting options enabled", - type: :boolean, - description: - "Enable setting a formatting different than plain-text (ie. HTML, Markdown) when posting, relates to `:instance`, `allowed_post_formats`" - }, %{ key: :hidePostStats, label: "Hide post stats", From 7f00698c3bc94058185ea76b54dbf7b3d5a0f483 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:32:38 -0500 Subject: [PATCH 10/18] Add greentext option --- config/description.exs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/description.exs b/config/description.exs index b4c598cb4..82e888188 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1160,6 +1160,12 @@ type: :boolean, description: "Disables PleromaFE Chat component" }, + %{ + key: :greentext, + label: "Greentext", + type: :boolean, + description: "Enables green text on lines prefixed with the > character." + }, %{ key: :hidePostStats, label: "Hide post stats", From c86cdb76a787ca0ee65702004e829473861148f6 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:35:12 -0500 Subject: [PATCH 11/18] Add hideFilteredStatuses and hideMutedPosts settings --- config/description.exs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/config/description.exs b/config/description.exs index 82e888188..9cd43ae37 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1166,6 +1166,18 @@ type: :boolean, description: "Enables green text on lines prefixed with the > character." }, + %{ + key: :hideFilteredStatuses, + label: "Hide Filtered Statuses", + type: :boolean, + description: "Hides filtered statuses from timelines." + }, + %{ + key: :hideMutedPosts, + label: "Hide Muted Posts", + type: :boolean, + description: "Hides muted statuses from timelines." + }, %{ key: :hidePostStats, label: "Hide post stats", From 923ab78807d16595e4dfc4f2a4a18f249ab88cd0 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:36:33 -0500 Subject: [PATCH 12/18] Add missing hideSitename setting --- config/description.exs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/description.exs b/config/description.exs index 9cd43ae37..f353378ac 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1184,6 +1184,12 @@ type: :boolean, description: "Hide notices statistics (repeats, favorites, ...)" }, + %{ + key: :hideSitename, + label: "Hide Sitename", + type: :boolean, + description: "Hides instance name from PleromaFE banner." + }, %{ key: :hideUserStats, label: "Hide user stats", From 52a95a0265eae8c20f284690cdc97c5a6699b1d8 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:40:04 -0500 Subject: [PATCH 13/18] Add missing nsfwCensorImage option --- config/description.exs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/description.exs b/config/description.exs index f353378ac..00f32859c 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1227,6 +1227,13 @@ description: "Limit scope selection to Direct, User default, and Scope of post replying to. " <> "Also prevents replying to a DM with a public post from PleromaFE." }, + %{ + key: :nsfwCensorImage, + label: "NSFW Censor Image", + type: :string, + description: "URL of the image to use for hiding NSFW media attachments in the timeline.", + suggestions: ["/static/img/nsfw.png"] + }, %{ key: :redirectRootNoLogin, label: "Redirect root no login", From 5131149056de4501f717084275f4be667f7a463a Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:45:16 -0500 Subject: [PATCH 14/18] add postContentType setting --- config/description.exs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/description.exs b/config/description.exs index 00f32859c..80c4ac96d 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1234,6 +1234,13 @@ description: "URL of the image to use for hiding NSFW media attachments in the timeline.", suggestions: ["/static/img/nsfw.png"] }, + %{ + key: :postContentType, + label: "Post Content Type", + type: {:dropdown, :atom}, + description: "Default post formatting option.", + suggestions: [text/plain, text/html, text/markdown, text/bbcode] + }, %{ key: :redirectRootNoLogin, label: "Redirect root no login", From 0c82a967ec6c67a32328dba1a4d47e6092137fc7 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:49:56 -0500 Subject: [PATCH 15/18] Add missing showFeaturesPanel setting --- config/description.exs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/description.exs b/config/description.exs index 80c4ac96d..ca02d2261 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1263,6 +1263,12 @@ type: :boolean, description: "Copy the scope (private/unlisted/public) in replies to posts by default" }, + %{ + key: :showFeaturesPanel, + label: "Show instance features panel", + type: :boolean, + description: "Enables panel displaying functionality of the instance." + }, %{ key: :showInstanceSpecificPanel, label: "Show instance specific panel", From 2560a4aa560ce9179baa25f22a94ba9755d09bd5 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:51:23 -0500 Subject: [PATCH 16/18] Formatting --- config/description.exs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/config/description.exs b/config/description.exs index ca02d2261..8ba1cf369 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1224,14 +1224,16 @@ key: :minimalScopesMode, label: "Minimal scopes mode", type: :boolean, - description: "Limit scope selection to Direct, User default, and Scope of post replying to. " <> + description: + "Limit scope selection to Direct, User default, and Scope of post replying to. " <> "Also prevents replying to a DM with a public post from PleromaFE." }, %{ key: :nsfwCensorImage, label: "NSFW Censor Image", type: :string, - description: "URL of the image to use for hiding NSFW media attachments in the timeline.", + description: + "URL of the image to use for hiding NSFW media attachments in the timeline.", suggestions: ["/static/img/nsfw.png"] }, %{ @@ -1239,7 +1241,7 @@ label: "Post Content Type", type: {:dropdown, :atom}, description: "Default post formatting option.", - suggestions: [text/plain, text/html, text/markdown, text/bbcode] + suggestions: ["text/plain", "text/html", "text/markdown", "text/bbcode"] }, %{ key: :redirectRootNoLogin, From 6f53d8815e5e0af9563fbe280bfbd873a06ba06d Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:57:33 -0500 Subject: [PATCH 17/18] Clarify where the Features panel is --- config/description.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/description.exs b/config/description.exs index 8ba1cf369..7d7f4e93b 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1269,7 +1269,7 @@ key: :showFeaturesPanel, label: "Show instance features panel", type: :boolean, - description: "Enables panel displaying functionality of the instance." + description: "Enables panel displaying functionality of the instance on the About page." }, %{ key: :showInstanceSpecificPanel, From 54b482418694b8c41984235ea85078fe00572cdc Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 17:07:14 -0500 Subject: [PATCH 18/18] Lint --- config/description.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/description.exs b/config/description.exs index 7d7f4e93b..a800d7823 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1269,7 +1269,8 @@ key: :showFeaturesPanel, label: "Show instance features panel", type: :boolean, - description: "Enables panel displaying functionality of the instance on the About page." + description: + "Enables panel displaying functionality of the instance on the About page." }, %{ key: :showInstanceSpecificPanel,