diff --git a/src/apps/dashboard/features/plugins/components/NoPluginResults.tsx b/src/apps/dashboard/features/plugins/components/NoPluginResults.tsx new file mode 100644 index 0000000000..ad8c6ca121 --- /dev/null +++ b/src/apps/dashboard/features/plugins/components/NoPluginResults.tsx @@ -0,0 +1,51 @@ +import Box from '@mui/material/Box'; +import Button from '@mui/material/Button'; +import Typography from '@mui/material/Typography'; +import React, { type FC } from 'react'; + +import globalize from 'lib/globalize'; + +interface NoPluginResultsProps { + isFiltered: boolean + onViewAll: () => void + query: string +} + +const NoPluginResults: FC = ({ + isFiltered, + onViewAll, + query +}) => { + return ( + + + { + query ? + globalize.translate('SearchResultsEmpty', query) : + globalize.translate('NoSubtitleSearchResultsFound') + } + + + {isFiltered && ( + + )} + + ); +}; + +export default NoPluginResults; diff --git a/src/apps/dashboard/routes/plugins/index.tsx b/src/apps/dashboard/routes/plugins/index.tsx index e85ad9e851..8429345379 100644 --- a/src/apps/dashboard/routes/plugins/index.tsx +++ b/src/apps/dashboard/routes/plugins/index.tsx @@ -12,9 +12,10 @@ import { Link } from 'react-router-dom'; import SearchInput from 'apps/dashboard/components/SearchInput'; import { usePluginDetails } from 'apps/dashboard/features/plugins/api/usePluginDetails'; +import NoPluginResults from 'apps/dashboard/features/plugins/components/NoPluginResults'; import PluginCard from 'apps/dashboard/features/plugins/components/PluginCard'; -import { PluginCategory } from 'apps/dashboard/features/plugins/constants/pluginCategory'; import { CATEGORY_LABELS } from 'apps/dashboard/features/plugins/constants/categoryLabels'; +import { PluginCategory } from 'apps/dashboard/features/plugins/constants/pluginCategory'; import Loading from 'components/loading/LoadingComponent'; import Page from 'components/Page'; import globalize from 'lib/globalize'; @@ -178,15 +179,24 @@ export const Component = () => { - - {filteredPlugins.map(plugin => ( - - - - ))} - + {filteredPlugins.length > 0 ? ( + + {filteredPlugins.map(plugin => ( + + + + ))} + + ) : ( + setCategory(undefined)} + query={searchQuery} + /> + )} )} diff --git a/src/strings/en-us.json b/src/strings/en-us.json index bf999b7353..9977905ca6 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -1127,7 +1127,6 @@ "MessageAreYouSureYouWishToRemoveMediaFolder": "Are you sure you wish to remove this media folder?", "MessageBackupDisclaimer": "Depending on the size of your library, the backup process may take a while.", "MessageBackupInProgress": "Backup in progress", - "MessageBrowsePluginCatalog": "Browse our plugin catalog to view available plugins.", "MessageCancelSeriesTimerError": "An error occurred while canceling the series timer", "MessageCancelTimerError": "An error occurred while canceling the timer", "MessageChangeRecordingPath": "Changing your recording folder will not migrate existing recordings from the old location to the new. You'll need to move them manually if desired.", @@ -1160,13 +1159,11 @@ "MessageLeaveEmptyToInherit": "Leave empty to inherit settings from a parent item or the global default value.", "MessageNoItemsAvailable": "No Items are currently available.", "MessageNoFavoritesAvailable": "No favorites are currently available.", - "MessageNoAvailablePlugins": "No available plugins.", "MessageNoCollectionsAvailable": "Collections allow you to enjoy personalized groupings of Movies, Series, and Albums. Click the '+' button to start creating collections.", "MessageNoGenresAvailable": "Enable some metadata providers to pull genres from the internet.", "MessageNoMovieSuggestionsAvailable": "No movie suggestions are currently available. Start watching and rating your movies, and then come back to view your recommendations.", "MessageNoNextUpItems": "None found. Start watching your shows!", "MessageNoPluginConfiguration": "This plugin has no settings to set up.", - "MessageNoPluginsInstalled": "You have no plugins installed.", "MessageNoRepositories": "No repositories.", "MessageNoServersAvailable": "No servers have been found using the automatic server discovery.", "MessageNothingHere": "Nothing here.", @@ -1609,7 +1606,6 @@ "TabLatest": "Recently Added", "TabLogs": "Logs", "TabMusic": "Music", - "TabMyPlugins": "My Plugins", "TabNetworking": "Networking", "TabNetworks": "TV Networks", "TabNfoSettings": "NFO Settings", @@ -1700,6 +1696,7 @@ "VideoAudio": "Video Audio", "ViewAlbum": "View album", "ViewAlbumArtist": "View album artist", + "ViewAllPlugins": "View all plugins", "ViewLyrics": "View lyrics", "ViewPlaybackInfo": "View playback info", "ViewSettings": "View settings",