mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-30 08:09:35 +02:00
fix bookmarks display
fix apps search search in urls in addition to names
This commit is contained in:
parent
e7cd4d7705
commit
423670adb5
3 changed files with 24 additions and 14 deletions
|
@ -26,15 +26,19 @@ export const AppGrid = (props: Props): JSX.Element => {
|
|||
config: { config }
|
||||
} = useSelector((state: State) => state);
|
||||
|
||||
const shouldBeShown = (category: Category) => {
|
||||
return !config.hideEmptyCategories || category.apps.length > 0 || !fromHomepage
|
||||
}
|
||||
|
||||
let apps: JSX.Element;
|
||||
|
||||
if (categories.length) {
|
||||
if (categories.length && categories.some(shouldBeShown)) {
|
||||
if (searching && !categories[0].apps.length) {
|
||||
apps = <Message>No apps match your search criteria</Message>;
|
||||
} else {
|
||||
apps = (
|
||||
<div className={classes.AppGrid}>
|
||||
{categories.filter((category : Category) => !config.hideEmptyCategories || category.apps.length > 0).map(
|
||||
{categories.filter(shouldBeShown).map(
|
||||
(category: Category): JSX.Element => (
|
||||
<AppCard
|
||||
category={category}
|
||||
|
@ -47,7 +51,7 @@ export const AppGrid = (props: Props): JSX.Element => {
|
|||
);
|
||||
}
|
||||
} else {
|
||||
if (totalCategories) {
|
||||
if (totalCategories && !config.hideEmptyCategories) {
|
||||
apps = (
|
||||
<Message>
|
||||
There are no pinned categories. You can pin them from the{' '}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue