diff options
Diffstat (limited to 'app')
41 files changed, 116 insertions, 59 deletions
diff --git a/app/controllers/api/v1/accounts/follower_accounts_controller.rb b/app/controllers/api/v1/accounts/follower_accounts_controller.rb index a665863eb..dbb8cac5e 100644 --- a/app/controllers/api/v1/accounts/follower_accounts_controller.rb +++ b/app/controllers/api/v1/accounts/follower_accounts_controller.rb @@ -25,7 +25,7 @@ class Api::V1::Accounts::FollowerAccountsController < Api::BaseController end def hide_results? - @account.suspended? || (@account.hides_followers? && current_account&.id != @account.id) || (current_account && @account.blocking?(current_account)) + !user_signed_in? || @account.suspended? || (@account.hides_followers? && current_account&.id != @account.id) || (current_account && @account.blocking?(current_account)) end def default_accounts diff --git a/app/controllers/api/v1/accounts/following_accounts_controller.rb b/app/controllers/api/v1/accounts/following_accounts_controller.rb index 7d885a212..8c650570f 100644 --- a/app/controllers/api/v1/accounts/following_accounts_controller.rb +++ b/app/controllers/api/v1/accounts/following_accounts_controller.rb @@ -25,7 +25,7 @@ class Api::V1::Accounts::FollowingAccountsController < Api::BaseController end def hide_results? - @account.suspended? || (@account.hides_following? && current_account&.id != @account.id) || (current_account && @account.blocking?(current_account)) + !user_signed_in? || @account.suspended? || (@account.hides_following? && current_account&.id != @account.id) || (current_account && @account.blocking?(current_account)) end def default_accounts diff --git a/app/controllers/api/v1/accounts/relationships_controller.rb b/app/controllers/api/v1/accounts/relationships_controller.rb index 1d3992a28..865529e25 100644 --- a/app/controllers/api/v1/accounts/relationships_controller.rb +++ b/app/controllers/api/v1/accounts/relationships_controller.rb @@ -5,10 +5,14 @@ class Api::V1::Accounts::RelationshipsController < Api::BaseController before_action :require_user! def index - accounts = Account.where(id: account_ids).select('id') - # .where doesn't guarantee that our results are in the same order - # we requested them, so return the "right" order to the requestor. - @accounts = accounts.index_by(&:id).values_at(*account_ids).compact + if user_signed_in? + accounts = Account.where(id: account_ids).select('id') + # .where doesn't guarantee that our results are in the same order + # we requested them, so return the "right" order to the requestor. + @accounts = accounts.index_by(&:id).values_at(*account_ids).compact + else + @accounts = Account.none + end render json: @accounts, each_serializer: REST::RelationshipSerializer, relationships: relationships end diff --git a/app/controllers/api/v1/accounts/search_controller.rb b/app/controllers/api/v1/accounts/search_controller.rb index 3061fcb7e..aa8745931 100644 --- a/app/controllers/api/v1/accounts/search_controller.rb +++ b/app/controllers/api/v1/accounts/search_controller.rb @@ -12,6 +12,7 @@ class Api::V1::Accounts::SearchController < Api::BaseController private def account_search + return Account.none unless user_signed_in? AccountSearchService.new.call( params[:q], current_account, diff --git a/app/controllers/api/v1/accounts/statuses_controller.rb b/app/controllers/api/v1/accounts/statuses_controller.rb index 92ccb8061..6e44f5c01 100644 --- a/app/controllers/api/v1/accounts/statuses_controller.rb +++ b/app/controllers/api/v1/accounts/statuses_controller.rb @@ -22,6 +22,8 @@ class Api::V1::Accounts::StatusesController < Api::BaseController end def cached_account_statuses + return Status.none unless user_signed_in? + statuses = truthy_param?(:pinned) ? pinned_scope : permitted_account_statuses statuses.merge!(only_media_scope) if truthy_param?(:only_media) diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb index 5b39497b6..ae9a69826 100644 --- a/app/helpers/settings_helper.rb +++ b/app/helpers/settings_helper.rb @@ -15,6 +15,7 @@ module SettingsHelper de: 'Deutsch', el: 'Ελληνικά', en: 'English', + 'en-cafe': 'English (Plural Café)', eo: 'Esperanto', 'es-AR': 'Español (Argentina)', es: 'Español', diff --git a/app/javascript/flavours/glitch/features/getting_started/components/trends.js b/app/javascript/flavours/glitch/features/getting_started/components/trends.js index 0734ec72b..c60f78f7e 100644 --- a/app/javascript/flavours/glitch/features/getting_started/components/trends.js +++ b/app/javascript/flavours/glitch/features/getting_started/components/trends.js @@ -38,7 +38,7 @@ export default class Trends extends ImmutablePureComponent { <div className='getting-started__trends'> <h4><FormattedMessage id='trends.trending_now' defaultMessage='Trending now' /></h4> - {trends.take(3).map(hashtag => <Hashtag key={hashtag.get('name')} hashtag={hashtag} />)} + {trends.take(1).map(hashtag => <Hashtag key={hashtag.get('name')} hashtag={hashtag} />)} </div> ); } diff --git a/app/javascript/flavours/glitch/features/ui/components/link_footer.js b/app/javascript/flavours/glitch/features/ui/components/link_footer.js index 4d7fc36c2..d26bbe9f8 100644 --- a/app/javascript/flavours/glitch/features/ui/components/link_footer.js +++ b/app/javascript/flavours/glitch/features/ui/components/link_footer.js @@ -58,9 +58,10 @@ class LinkFooter extends React.PureComponent { <p> <FormattedMessage id='getting_started.open_source_notice' - defaultMessage='Glitchsoc is open source software, a friendly fork of {Mastodon}. You can contribute or report issues on GitHub at {github}.' + defaultMessage='GlitchCafe is open source software, based on {Glitchsoc} which is a friendly fork of {Mastodon}. You can contribute or report issues on GitHub at {github}.' values={{ - github: <span><a href='https://github.com/glitch-soc/mastodon' rel='noopener noreferrer' target='_blank'>glitch-soc/mastodon</a> (v{version})</span>, + github: <span><a href='https://github.com/pluralcafe/mastodon' rel='noopener noreferrer' target='_blank'>pluralcafe/mastodon</a> (v{version})</span>, + Glitchsoc: <a href='https://github.com/glitch-soc/mastodon' rel='noopener noreferrer' target='_blank'>glitch-soc/mastodon</a>, Mastodon: <a href='https://github.com/tootsuite/mastodon' rel='noopener noreferrer' target='_blank'>Mastodon</a> }} /> </p> diff --git a/app/javascript/flavours/glitch/features/ui/containers/status_list_container.js b/app/javascript/flavours/glitch/features/ui/containers/status_list_container.js index bd2d2eb4e..abcbf13db 100644 --- a/app/javascript/flavours/glitch/features/ui/containers/status_list_container.js +++ b/app/javascript/flavours/glitch/features/ui/containers/status_list_container.js @@ -33,8 +33,6 @@ const makeGetStatusIds = (pending = false) => createSelector([ const statusForId = statuses.get(id); let showStatus = true; - if (statusForId.get('account') === me) return true; - if (columnSettings.getIn(['shows', 'reblog']) === false) { showStatus = showStatus && statusForId.get('reblog') === null; } diff --git a/app/javascript/flavours/glitch/locales/en-cafe.js b/app/javascript/flavours/glitch/locales/en-cafe.js new file mode 100755 index 000000000..6886de5d3 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/en-cafe.js @@ -0,0 +1,8 @@ +import base_english from 'flavours/glitch/locales/en'; +import inherited from 'mastodon/locales/en-cafe.json'; + +const messages = { + // No new translations for glitch-soc strings. +}; + +export default Object.assign({}, base_english, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/en.js b/app/javascript/flavours/glitch/locales/en.js index 90e924d4a..699affd70 100644 --- a/app/javascript/flavours/glitch/locales/en.js +++ b/app/javascript/flavours/glitch/locales/en.js @@ -1,7 +1,7 @@ import inherited from 'mastodon/locales/en.json'; const messages = { - 'getting_started.open_source_notice': 'Glitchsoc is free open source software forked from {Mastodon}. You can contribute or report issues on GitHub at {github}.', + 'getting_started.open_source_notice': 'GlitchCafe is free open source software based on {Glitchsoc} and {Mastodon}. You can see our source code on GitHub at {github}.', 'layout.auto': 'Auto', 'layout.current_is': 'Your current layout is:', 'layout.desktop': 'Desktop', @@ -10,7 +10,7 @@ const messages = { 'getting_started.onboarding': 'Show me around', 'onboarding.page_one.federation': '{domain} is an \'instance\' of Mastodon. Mastodon is a network of independent servers joining up to make one larger social network. We call these servers instances.', 'onboarding.page_one.welcome': 'Welcome to {domain}!', - 'onboarding.page_six.github': '{domain} runs on Glitchsoc. Glitchsoc is a friendly {fork} of {Mastodon}, and is compatible with any Mastodon instance or app. Glitchsoc is entirely free and open-source. You can report bugs, request features, or contribute to the code on {github}.', + 'onboarding.page_six.github': '{domain} runs on GlitchCafe, which is based on Glitchsoc. Glitchsoc is a friendly {fork} of {Mastodon}, and is compatible with any Mastodon instance or app. GlitchCafe includes Plural Cafe-specific additions to Glitchsoc. Glitchsoc is entirely free and open-source. You can report bugs, request features, or contribute to the code on {github}.', 'settings.auto_collapse': 'Automatic collapsing', 'settings.auto_collapse_all': 'Everything', 'settings.auto_collapse_lengthy': 'Lengthy toots', diff --git a/app/javascript/flavours/glitch/styles/accounts.scss b/app/javascript/flavours/glitch/styles/accounts.scss index a5ddde937..d66a2b237 100644 --- a/app/javascript/flavours/glitch/styles/accounts.scss +++ b/app/javascript/flavours/glitch/styles/accounts.scss @@ -203,8 +203,7 @@ } } -.account-role, -.simple_form .recommended { +.account-role { display: inline-block; padding: 4px 6px; cursor: default; diff --git a/app/javascript/flavours/glitch/styles/components/drawer.scss b/app/javascript/flavours/glitch/styles/components/drawer.scss index fa410234a..570813831 100644 --- a/app/javascript/flavours/glitch/styles/components/drawer.scss +++ b/app/javascript/flavours/glitch/styles/components/drawer.scss @@ -111,6 +111,10 @@ flex: 1 1 auto; margin-left: 8px; overflow: hidden; + + & > a:hover { + text-decoration: underline; + } } .drawer--results { diff --git a/app/javascript/flavours/glitch/styles/components/status.scss b/app/javascript/flavours/glitch/styles/components/status.scss index d6fbfbaa4..e067c9335 100644 --- a/app/javascript/flavours/glitch/styles/components/status.scss +++ b/app/javascript/flavours/glitch/styles/components/status.scss @@ -134,19 +134,19 @@ } ul, ol { - margin-left: 1em; - p { margin: 0; } } ul { + margin-left: 1em; list-style-type: disc; } ol { list-style-type: decimal; + list-style-position: inside; } } @@ -377,7 +377,7 @@ } .display-name:hover .display-name__html { - text-decoration: none; + text-decoration: underline; } .status__content { @@ -396,7 +396,7 @@ } a:hover { - text-decoration: none; + text-decoration: underline; } } &:focus > .status__content:after { @@ -417,6 +417,10 @@ .notification__message { margin: -10px 0px 10px 0; + + a:hover { + text-decoration: underline; + } } } @@ -561,6 +565,10 @@ overflow: hidden; text-overflow: ellipsis; } + + a:hover { + text-decoration: underline; + } } .status__action-bar { diff --git a/app/javascript/flavours/glitch/styles/forms.scss b/app/javascript/flavours/glitch/styles/forms.scss index 8ea507333..0c7cb443b 100644 --- a/app/javascript/flavours/glitch/styles/forms.scss +++ b/app/javascript/flavours/glitch/styles/forms.scss @@ -83,12 +83,6 @@ code { text-decoration: none; } } - - .recommended { - position: absolute; - margin: 0 4px; - margin-top: -2px; - } } } diff --git a/app/javascript/locales/locale-data/en-cafe.js b/app/javascript/locales/locale-data/en-cafe.js new file mode 100755 index 000000000..363aabc2b --- /dev/null +++ b/app/javascript/locales/locale-data/en-cafe.js @@ -0,0 +1,8 @@ +/*eslint eqeqeq: "off"*/ +/*eslint no-nested-ternary: "off"*/ +/*eslint quotes: "off"*/ + +export default [{ + locale: "en-cafe', + parentLocale: 'en', +}]; diff --git a/app/javascript/mastodon/locales/de.json b/app/javascript/mastodon/locales/de.json index 1c1773029..1cc962880 100644 --- a/app/javascript/mastodon/locales/de.json +++ b/app/javascript/mastodon/locales/de.json @@ -459,7 +459,7 @@ "upload_error.poll": "Dateiuploads sind in Kombination mit Umfragen nicht erlaubt.", "upload_form.audio_description": "Beschreibe die Audiodatei für Menschen mit Hörschädigungen", "upload_form.description": "Für Menschen mit Sehbehinderung beschreiben", - "upload_form.edit": "Bearbeiten", + "upload_form.edit": "Beschreiben", "upload_form.thumbnail": "Miniaturansicht ändern", "upload_form.undo": "Löschen", "upload_form.video_description": "Beschreibe das Video für Menschen mit einer Hör- oder Sehbehinderung", diff --git a/app/javascript/mastodon/locales/defaultMessages.json b/app/javascript/mastodon/locales/defaultMessages.json index a653704f3..4ffedfbfb 100644 --- a/app/javascript/mastodon/locales/defaultMessages.json +++ b/app/javascript/mastodon/locales/defaultMessages.json @@ -1325,7 +1325,7 @@ "id": "upload_form.undo" }, { - "defaultMessage": "Edit", + "defaultMessage": "Describe", "id": "upload_form.edit" } ], diff --git a/app/javascript/mastodon/locales/en-cafe.json b/app/javascript/mastodon/locales/en-cafe.json new file mode 100755 index 000000000..2f048f662 --- /dev/null +++ b/app/javascript/mastodon/locales/en-cafe.json @@ -0,0 +1,13 @@ +{ + "upload_form.edit": "Describe", + "upload_modal.description_placeholder": "Jackdaws love my big sphinx of quartz", + "upload_modal.edit_media": "Add description", + + "column.community": "Plural Café", + "directory.local": "From Plural Café only", + "empty_column.community": "The Plural Café timeline is empty. Write something publicly to get the ball rolling!", + "getting_started.open_source_notice": "GlitchCafé is open source software. You can contribute or report issues on GitHub at {github}.", + "introduction.federation.local.text": "Public posts from people on Plural Café will appear in the local timeline.", + "navigation_bar.community_timeline": "Plural Café timeline", + "tabs_bar.local_timeline": "Plural Café" +} diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index e6773487b..5bea4e816 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -464,7 +464,7 @@ "upload_error.poll": "File upload not allowed with polls.", "upload_form.audio_description": "Describe for people with hearing loss", "upload_form.description": "Describe for the visually impaired", - "upload_form.edit": "Edit", + "upload_form.edit": "Describe", "upload_form.thumbnail": "Change thumbnail", "upload_form.undo": "Delete", "upload_form.video_description": "Describe for people with hearing loss or visual impairment", diff --git a/app/javascript/mastodon/locales/es.json b/app/javascript/mastodon/locales/es.json index dfad44c6d..e769d7a48 100644 --- a/app/javascript/mastodon/locales/es.json +++ b/app/javascript/mastodon/locales/es.json @@ -459,7 +459,7 @@ "upload_error.poll": "Subida de archivos no permitida con encuestas.", "upload_form.audio_description": "Describir para personas con problemas auditivos", "upload_form.description": "Describir para los usuarios con dificultad visual", - "upload_form.edit": "Editar", + "upload_form.edit": "Describir", "upload_form.thumbnail": "Cambiar miniatura", "upload_form.undo": "Borrar", "upload_form.video_description": "Describir para personas con problemas auditivos o visuales", diff --git a/app/javascript/mastodon/locales/fi.json b/app/javascript/mastodon/locales/fi.json index 8916d4339..28ff603e9 100644 --- a/app/javascript/mastodon/locales/fi.json +++ b/app/javascript/mastodon/locales/fi.json @@ -459,7 +459,7 @@ "upload_error.poll": "Tiedon lataaminen ei ole sallittua kyselyissä.", "upload_form.audio_description": "Kuvaile kuulovammaisille", "upload_form.description": "Anna kuvaus näkörajoitteisia varten", - "upload_form.edit": "Muokkaa", + "upload_form.edit": "Kuvaile", "upload_form.thumbnail": "Vaihda pikkukuva", "upload_form.undo": "Peru", "upload_form.video_description": "Kuvaile kuulo- tai näkövammaisille", diff --git a/app/javascript/mastodon/locales/fr.json b/app/javascript/mastodon/locales/fr.json index 214f3aeea..8eedb8d85 100644 --- a/app/javascript/mastodon/locales/fr.json +++ b/app/javascript/mastodon/locales/fr.json @@ -459,7 +459,7 @@ "upload_error.poll": "L’envoi de fichiers n’est pas autorisé avec les sondages.", "upload_form.audio_description": "Décrire pour les personnes ayant des difficultés d’audition", "upload_form.description": "Décrire pour les malvoyant·e·s", - "upload_form.edit": "Modifier", + "upload_form.edit": "Décrire", "upload_form.thumbnail": "Changer la vignette", "upload_form.undo": "Supprimer", "upload_form.video_description": "Décrire pour les personnes ayant des problèmes d’audition ou de vision", diff --git a/app/javascript/mastodon/locales/ja.json b/app/javascript/mastodon/locales/ja.json index 74a621c22..e4334ccc4 100644 --- a/app/javascript/mastodon/locales/ja.json +++ b/app/javascript/mastodon/locales/ja.json @@ -464,7 +464,7 @@ "upload_error.poll": "アンケートではファイルをアップロードできません。", "upload_form.audio_description": "聴取が難しいユーザーへの説明", "upload_form.description": "閲覧が難しいユーザーへの説明", - "upload_form.edit": "編集", + "upload_form.edit": "説明", "upload_form.thumbnail": "サムネイルを変更", "upload_form.undo": "削除", "upload_form.video_description": "視聴が難しいユーザーへの説明", diff --git a/app/javascript/mastodon/locales/locale-data/en-cafe.js b/app/javascript/mastodon/locales/locale-data/en-cafe.js new file mode 100755 index 000000000..363aabc2b --- /dev/null +++ b/app/javascript/mastodon/locales/locale-data/en-cafe.js @@ -0,0 +1,8 @@ +/*eslint eqeqeq: "off"*/ +/*eslint no-nested-ternary: "off"*/ +/*eslint quotes: "off"*/ + +export default [{ + locale: "en-cafe', + parentLocale: 'en', +}]; diff --git a/app/javascript/mastodon/locales/nl.json b/app/javascript/mastodon/locales/nl.json index e19f0b6d3..095114255 100644 --- a/app/javascript/mastodon/locales/nl.json +++ b/app/javascript/mastodon/locales/nl.json @@ -459,7 +459,7 @@ "upload_error.poll": "Het uploaden van bestanden is in polls niet toegestaan.", "upload_form.audio_description": "Omschrijf dit voor mensen met een auditieve beperking", "upload_form.description": "Omschrijf dit voor mensen met een visuele beperking", - "upload_form.edit": "Bewerken", + "upload_form.edit": "Omschrijf", "upload_form.thumbnail": "Miniatuurafbeelding wijzigen", "upload_form.undo": "Verwijderen", "upload_form.video_description": "Omschrijf dit voor mensen met een auditieve of visuele beperking", diff --git a/app/javascript/mastodon/locales/pl.json b/app/javascript/mastodon/locales/pl.json index 780ef3697..f03a0086e 100644 --- a/app/javascript/mastodon/locales/pl.json +++ b/app/javascript/mastodon/locales/pl.json @@ -464,7 +464,7 @@ "upload_error.poll": "Dołączanie plików nie dozwolone z głosowaniami.", "upload_form.audio_description": "Opisz dla osób niesłyszących i niedosłyszących", "upload_form.description": "Wprowadź opis dla niewidomych i niedowidzących", - "upload_form.edit": "Edytuj", + "upload_form.edit": "Opisz", "upload_form.thumbnail": "Zmień miniaturę", "upload_form.undo": "Usuń", "upload_form.video_description": "Opisz dla osób niesłyszących, niedosłyszących, niewidomych i niedowidzących", diff --git a/app/javascript/mastodon/locales/pt-BR.json b/app/javascript/mastodon/locales/pt-BR.json index 65d5815ed..2e0adfa9c 100644 --- a/app/javascript/mastodon/locales/pt-BR.json +++ b/app/javascript/mastodon/locales/pt-BR.json @@ -459,7 +459,7 @@ "upload_error.poll": "Não é possível fazer upload de arquivos com enquetes.", "upload_form.audio_description": "Descrever para pessoas com deficiência auditiva", "upload_form.description": "Descreva para deficientes visuais", - "upload_form.edit": "Editar", + "upload_form.edit": "Descreva", "upload_form.thumbnail": "Alterar miniatura", "upload_form.undo": "Excluir", "upload_form.video_description": "Descreva para pessoas com deficiência auditiva ou visual", diff --git a/app/javascript/mastodon/locales/ru.json b/app/javascript/mastodon/locales/ru.json index 2853b3302..3ce050759 100644 --- a/app/javascript/mastodon/locales/ru.json +++ b/app/javascript/mastodon/locales/ru.json @@ -459,7 +459,7 @@ "upload_error.poll": "К опросам нельзя прикреплять файлы.", "upload_form.audio_description": "Опишите аудиофайл для людей с нарушением слуха", "upload_form.description": "Добавьте описание для людей с нарушениями зрения:", - "upload_form.edit": "Изменить", + "upload_form.edit": "Опишите", "upload_form.thumbnail": "Изменить обложку", "upload_form.undo": "Отменить", "upload_form.video_description": "Опишите видео для людей с нарушением слуха или зрения", diff --git a/app/javascript/mastodon/locales/sk.json b/app/javascript/mastodon/locales/sk.json index 6640d5472..9bb0aa8ce 100644 --- a/app/javascript/mastodon/locales/sk.json +++ b/app/javascript/mastodon/locales/sk.json @@ -459,7 +459,7 @@ "upload_error.poll": "Nahrávanie súborov pri anketách nieje možné.", "upload_form.audio_description": "Popíš, pre ľudí so stratou sluchu", "upload_form.description": "Opis pre slabo vidiacich", - "upload_form.edit": "Uprav", + "upload_form.edit": "Popíš", "upload_form.thumbnail": "Change thumbnail", "upload_form.undo": "Vymaž", "upload_form.video_description": "Popíš, pre ľudí so stratou sluchu, alebo očným znevýhodnením", diff --git a/app/javascript/mastodon/locales/sv.json b/app/javascript/mastodon/locales/sv.json index a75cca8b5..a0fc4a4f3 100644 --- a/app/javascript/mastodon/locales/sv.json +++ b/app/javascript/mastodon/locales/sv.json @@ -459,7 +459,7 @@ "upload_error.poll": "Filuppladdning tillåts inte med omröstningar.", "upload_form.audio_description": "Beskriv för personer med hörselnedsättning", "upload_form.description": "Beskriv för synskadade", - "upload_form.edit": "Redigera", + "upload_form.edit": "Beskriv", "upload_form.thumbnail": "Ändra miniatyr", "upload_form.undo": "Ta bort", "upload_form.video_description": "Beskriv för personer med hörsel- eller synnedsättning", diff --git a/app/javascript/mastodon/locales/whitelist_en-cafe.json b/app/javascript/mastodon/locales/whitelist_en-cafe.json new file mode 100755 index 000000000..0d4f101c7 --- /dev/null +++ b/app/javascript/mastodon/locales/whitelist_en-cafe.json @@ -0,0 +1,2 @@ +[ +] diff --git a/app/javascript/styles/mastodon-light/diff.scss b/app/javascript/styles/mastodon-light/diff.scss index d4290d7e6..18d1f7ad0 100644 --- a/app/javascript/styles/mastodon-light/diff.scss +++ b/app/javascript/styles/mastodon-light/diff.scss @@ -656,12 +656,6 @@ html { background: rgba($error-red, 0.5); text-shadow: none; } - - .recommended { - border-color: $ui-highlight-color; - color: $ui-highlight-color; - background-color: rgba($ui-highlight-color, 0.1); - } } .compose-form .compose-form__warning { diff --git a/app/javascript/styles/mastodon/accounts.scss b/app/javascript/styles/mastodon/accounts.scss index 2c78e81be..332b9f420 100644 --- a/app/javascript/styles/mastodon/accounts.scss +++ b/app/javascript/styles/mastodon/accounts.scss @@ -201,8 +201,7 @@ } } -.account-role, -.simple_form .recommended { +.account-role { display: inline-block; padding: 4px 6px; cursor: default; diff --git a/app/javascript/styles/mastodon/forms.scss b/app/javascript/styles/mastodon/forms.scss index e0604303b..5ace0d97c 100644 --- a/app/javascript/styles/mastodon/forms.scss +++ b/app/javascript/styles/mastodon/forms.scss @@ -83,12 +83,6 @@ code { text-decoration: none; } } - - .recommended { - position: absolute; - margin: 0 4px; - margin-top: -2px; - } } } diff --git a/app/lib/sanitize_config.rb b/app/lib/sanitize_config.rb index 0fb415bd1..89373664a 100644 --- a/app/lib/sanitize_config.rb +++ b/app/lib/sanitize_config.rb @@ -15,6 +15,7 @@ class Sanitize ipfs ipns ssb + gemini gopher xmpp magnet @@ -84,7 +85,7 @@ class Sanitize end MASTODON_STRICT ||= freeze_config( - elements: %w(p br span a abbr del pre blockquote code b strong u sub sup i em h1 h2 h3 h4 h5 ul ol li), + elements: %w(p br span a abbr del pre blockquote code b strong u sub sup i em h1 h2 h3 h4 h5 ul ol li details summary), attributes: { 'a' => %w(href rel class title), diff --git a/app/services/activitypub/process_account_service.rb b/app/services/activitypub/process_account_service.rb index 6afeb92d6..27b088240 100644 --- a/app/services/activitypub/process_account_service.rb +++ b/app/services/activitypub/process_account_service.rb @@ -38,13 +38,14 @@ class ActivityPub::ProcessAccountService < BaseService return if @account.nil? after_protocol_change! if protocol_changed? - after_key_change! if key_changed? && !@options[:signed_with_known_key] clear_tombstones! if key_changed? after_suspension_change! if suspension_changed? + return after_key_change! if key_changed? && !@options[:signed_with_known_key] unless @options[:only_key] || @account.suspended? check_featured_collection! if @account.featured_collection_url.present? check_links! unless @account.fields.empty? + process_sync end @account @@ -131,7 +132,8 @@ class ActivityPub::ProcessAccountService < BaseService end def after_key_change! - RefollowWorker.perform_async(@account.id) + ResetAccountWorker.perform_async(@account.id) + nil end def after_suspension_change! diff --git a/app/views/settings/preferences/appearance/show.html.haml b/app/views/settings/preferences/appearance/show.html.haml index ccea2e9b7..4170c9e44 100644 --- a/app/views/settings/preferences/appearance/show.html.haml +++ b/app/views/settings/preferences/appearance/show.html.haml @@ -25,7 +25,7 @@ = f.input :setting_use_pending_items, as: :boolean, wrapper: :with_label .fields-group - = f.input :setting_auto_play_gif, as: :boolean, wrapper: :with_label, recommended: true + = f.input :setting_auto_play_gif, as: :boolean, wrapper: :with_label = f.input :setting_reduce_motion, as: :boolean, wrapper: :with_label = f.input :setting_disable_swiping, as: :boolean, wrapper: :with_label = f.input :setting_system_font_ui, as: :boolean, wrapper: :with_label diff --git a/app/views/settings/preferences/other/show.html.haml b/app/views/settings/preferences/other/show.html.haml index 3b5c7016d..372d934fb 100644 --- a/app/views/settings/preferences/other/show.html.haml +++ b/app/views/settings/preferences/other/show.html.haml @@ -14,7 +14,7 @@ = f.input :setting_hide_network, as: :boolean, wrapper: :with_label .fields-group - = f.input :setting_aggregate_reblogs, as: :boolean, wrapper: :with_label, recommended: true + = f.input :setting_aggregate_reblogs, as: :boolean, wrapper: :with_label - unless Setting.hide_followers_count .fields-group @@ -33,7 +33,7 @@ = f.input :setting_default_sensitive, as: :boolean, wrapper: :with_label .fields-group - = f.input :setting_show_application, as: :boolean, wrapper: :with_label, recommended: true + = f.input :setting_show_application, as: :boolean, wrapper: :with_label .fields-group = f.input :setting_default_content_type, collection: ['text/plain', 'text/markdown', 'text/html'], wrapper: :with_label, include_blank: false, label_method: lambda { |item| safe_join([t("simple_form.labels.defaults.setting_default_content_type_#{item.split('/')[1]}"), content_tag(:span, t("simple_form.hints.defaults.setting_default_content_type_#{item.split('/')[1]}"), class: 'hint')]) }, required: false, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li' diff --git a/app/views/settings/profiles/show.html.haml b/app/views/settings/profiles/show.html.haml index 6061e9cfd..fb7ce6780 100644 --- a/app/views/settings/profiles/show.html.haml +++ b/app/views/settings/profiles/show.html.haml @@ -31,7 +31,7 @@ - if Setting.profile_directory .fields-group - = f.input :discoverable, as: :boolean, wrapper: :with_label, hint: t('simple_form.hints.defaults.discoverable'), recommended: true + = f.input :discoverable, as: :boolean, wrapper: :with_label, hint: t('simple_form.hints.defaults.discoverable') %hr.spacer/ diff --git a/app/workers/reset_account_worker.rb b/app/workers/reset_account_worker.rb new file mode 100644 index 000000000..f63d8682a --- /dev/null +++ b/app/workers/reset_account_worker.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +class ResetAccountWorker + include Sidekiq::Worker + + def perform(account_id) + account = Account.find(account_id) + return if account.local? + + account_uri = account.uri + SuspendAccountService.new.call(account) + ResolveAccountService.new.call(account_uri) + rescue ActiveRecord::RecordNotFound + true + end +end |