feat(blacklist): hide blacklisted items from discover pages for admins (#1601)
* feat(blacklist): add 'Hide Blacklisted Items' setting to general settings and UI * feat(migration): add HideBlacklistedItems migration for PostgreSQL and SQLite * feat(settings): add hideBlacklisted option to application settings * feat(settings): add tooltips for hideAvailable and hideBlacklisted options in settings * chore(migration): remove HideBlacklistedItems migration files for PostgreSQL and SQLite * docs(settings): clarify description of 'Hide Blacklisted Items' setting to specify it affects all users * docs(settings): update tooltip and description for 'Hide Blacklisted Items' to clarify it applies to all users, including administrators * docs(settings): clarify 'Hide Blacklisted Items' functionality to specify it applies only to administrators with the "Manage Blacklist" permission * fix(hooks): update permission check for 'Hide Blacklisted Items' to include 'Manage Blacklist' * fix(settings): update tooltip for 'Hide Blacklisted Items' to clarify it applies to all users with the "Manage Blacklist" permission * feat(settings): add experimental badge to settings tooltip for 'Hide Available' option
This commit is contained in:
@@ -45,11 +45,16 @@ const messages = defineMessages('components.Settings.SettingsMain', {
|
||||
'The "Process Blacklisted Tags" job will blacklist this many pages into each sort. Larger numbers will create a more accurate blacklist, but use more space.',
|
||||
streamingRegion: 'Streaming Region',
|
||||
streamingRegionTip: 'Show streaming sites by regional availability',
|
||||
hideBlacklisted: 'Hide Blacklisted Items',
|
||||
hideBlacklistedTip:
|
||||
'Hide blacklisted items from discover pages for all users with the "Manage Blacklist" permission',
|
||||
toastApiKeySuccess: 'New API key generated successfully!',
|
||||
toastApiKeyFailure: 'Something went wrong while generating a new API key.',
|
||||
toastSettingsSuccess: 'Settings saved successfully!',
|
||||
toastSettingsFailure: 'Something went wrong while saving settings.',
|
||||
hideAvailable: 'Hide Available Media',
|
||||
hideAvailableTip:
|
||||
'Hide available media from the discover pages but not search results',
|
||||
cacheImages: 'Enable Image Caching',
|
||||
cacheImagesTip:
|
||||
'Cache externally sourced images (requires a significant amount of disk space)',
|
||||
@@ -145,6 +150,7 @@ const SettingsMain = () => {
|
||||
applicationTitle: data?.applicationTitle,
|
||||
applicationUrl: data?.applicationUrl,
|
||||
hideAvailable: data?.hideAvailable,
|
||||
hideBlacklisted: data?.hideBlacklisted,
|
||||
locale: data?.locale ?? 'en',
|
||||
discoverRegion: data?.discoverRegion,
|
||||
originalLanguage: data?.originalLanguage,
|
||||
@@ -163,6 +169,7 @@ const SettingsMain = () => {
|
||||
applicationTitle: values.applicationTitle,
|
||||
applicationUrl: values.applicationUrl,
|
||||
hideAvailable: values.hideAvailable,
|
||||
hideBlacklisted: values.hideBlacklisted,
|
||||
locale: values.locale,
|
||||
discoverRegion: values.discoverRegion,
|
||||
streamingRegion: values.streamingRegion,
|
||||
@@ -428,6 +435,9 @@ const SettingsMain = () => {
|
||||
{intl.formatMessage(messages.hideAvailable)}
|
||||
</span>
|
||||
<SettingsBadge badgeType="experimental" />
|
||||
<span className="label-tip">
|
||||
{intl.formatMessage(messages.hideAvailableTip)}
|
||||
</span>
|
||||
</label>
|
||||
<div className="form-input-area">
|
||||
<Field
|
||||
@@ -440,6 +450,29 @@ const SettingsMain = () => {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="form-row">
|
||||
<label htmlFor="hideBlacklisted" className="checkbox-label">
|
||||
<span className="mr-2">
|
||||
{intl.formatMessage(messages.hideBlacklisted)}
|
||||
</span>
|
||||
<span className="label-tip">
|
||||
{intl.formatMessage(messages.hideBlacklistedTip)}
|
||||
</span>
|
||||
</label>
|
||||
<div className="form-input-area">
|
||||
<Field
|
||||
type="checkbox"
|
||||
id="hideBlacklisted"
|
||||
name="hideBlacklisted"
|
||||
onChange={() => {
|
||||
setFieldValue(
|
||||
'hideBlacklisted',
|
||||
!values.hideBlacklisted
|
||||
);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="form-row">
|
||||
<label
|
||||
htmlFor="partialRequestsEnabled"
|
||||
|
||||
Reference in New Issue
Block a user