parent
77d8bbe438
commit
efa4f4ca10
10 changed files with 2 additions and 23 deletions
|
@ -14,7 +14,6 @@ export interface ApiAccountRoleJSON {
|
|||
|
||||
export interface ApiAccountOtherSettingsJSON {
|
||||
noindex: boolean;
|
||||
noai: boolean;
|
||||
hide_network: boolean;
|
||||
hide_statuses_count: boolean;
|
||||
hide_following_count: boolean;
|
||||
|
|
|
@ -50,7 +50,6 @@ export type AccountOtherSettings = RecordOf<AccountOtherSettingsShape>;
|
|||
|
||||
const AccountOtherSettingsFactory = ImmutableRecord<AccountOtherSettingsShape>({
|
||||
noindex: false,
|
||||
noai: true,
|
||||
hide_network: false,
|
||||
hide_followers_count: false,
|
||||
hide_following_count: false,
|
||||
|
|
|
@ -8,13 +8,6 @@ module Account::OtherSettings
|
|||
user_prefers_noindex? || (settings.present? && settings['noindex']) || false
|
||||
end
|
||||
|
||||
def noai?
|
||||
return user.setting_noai if local? && user.present?
|
||||
return settings['noai'] if settings.present? && settings.key?('noai')
|
||||
|
||||
false
|
||||
end
|
||||
|
||||
def translatable_private?
|
||||
return user.setting_translatable_private if local? && user.present?
|
||||
return settings['translatable_private'] if settings.present? && settings.key?('translatable_private')
|
||||
|
@ -97,7 +90,6 @@ module Account::OtherSettings
|
|||
# Please update `app/javascript/mastodon/api_types/accounts.ts` when making changes to the attributes
|
||||
{
|
||||
'noindex' => noindex?,
|
||||
'noai' => noai?,
|
||||
'hide_network' => hide_collections,
|
||||
'hide_statuses_count' => hide_statuses_count?,
|
||||
'hide_following_count' => hide_following_count?,
|
||||
|
|
|
@ -131,10 +131,6 @@ module User::HasSettings
|
|||
settings['noindex']
|
||||
end
|
||||
|
||||
def setting_noai
|
||||
settings['noai']
|
||||
end
|
||||
|
||||
def setting_translatable_private
|
||||
settings['translatable_private']
|
||||
end
|
||||
|
|
|
@ -11,7 +11,6 @@ class UserSettings
|
|||
setting :aggregate_reblogs, default: true
|
||||
setting :theme, default: -> { ::Setting.theme }
|
||||
setting :noindex, default: -> { ::Setting.noindex }
|
||||
setting :noai, default: true
|
||||
setting :translatable_private, default: false
|
||||
setting :link_preview, default: true
|
||||
setting :bio_markdown, default: false
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
- if @account.noindex?
|
||||
%meta{ name: 'robots', content: 'noindex, noarchive, noai, noimageai' }/
|
||||
%meta{ name: 'CCBot', content: 'nofollow' }/
|
||||
- elsif @account.noai?
|
||||
- else
|
||||
%meta{ name: 'robots', content: 'noai, noimageai' }/
|
||||
%meta{ name: 'CCBot', content: 'nofollow' }/
|
||||
|
||||
|
|
|
@ -21,9 +21,6 @@
|
|||
.fields-group
|
||||
= ff.input :discoverable_local, wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.discoverable_local'), hint: I18n.t('simple_form.hints.defaults.discoverable_local')
|
||||
|
||||
.fields-group
|
||||
= ff.input :noai, wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_noai'), hint: I18n.t('simple_form.hints.defaults.setting_noai')
|
||||
|
||||
.fields-group
|
||||
= f.input :unlocked, as: :boolean, wrapper: :with_label
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
- if @account.noindex?
|
||||
%meta{ name: 'robots', content: 'noindex, noarchive, noai, noimageai' }/
|
||||
%meta{ name: 'CCBot', content: 'nofollow' }/
|
||||
- elsif @account.noai?
|
||||
- else
|
||||
%meta{ name: 'robots', content: 'noai, noimageai' }/
|
||||
%meta{ name: 'CCBot', content: 'nofollow' }/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue