-
-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat: created basic POC of this feature * feat: added dropdown selector for custom categories * feat: added translations * feat: added translations * fix: fixed issues raised during review + added uncategorized preset * chore: pushing en translation files * fix: runner is now relevant + added validation for new categories * fix: changed category settings layout to favor checkboxes * Group library filters in a dropdown. Add only installed filter * Favorites filter composable. Refresh libraries in background * Re-add translation strings * Fix checked status for store filters * Remove console.log * fix: category filter on small screens * Fix missing windows games when no platform is selected * fix: i18n errors on push --------- Co-authored-by: Ariel Juodziukynas <arieljuod@gmail.com>
- Loading branch information
1 parent
f0cd114
commit b6281f9
Showing
18 changed files
with
417 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#custom-category-selector { | ||
width: 324px; | ||
} | ||
|
||
@media screen and (max-width: 1000px) { | ||
#custom-category-selector { | ||
width: auto; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import SelectField from '../SelectField' | ||
import ContextProvider from 'frontend/state/ContextProvider' | ||
import React, { useContext } from 'react' | ||
import { useTranslation } from 'react-i18next' | ||
import './index.css' | ||
|
||
export default function CategoryFilter() { | ||
const { customCategories, currentCustomCategory, setCurrentCustomCategory } = | ||
useContext(ContextProvider) | ||
const { t } = useTranslation() | ||
|
||
return ( | ||
<SelectField | ||
htmlId="custom-category-selector" | ||
value={currentCustomCategory || ''} | ||
onChange={(e) => { | ||
setCurrentCustomCategory(e.target.value) | ||
}} | ||
> | ||
<option value="">{t('header.all_categories', 'All Categories')}</option> | ||
<option value="preset_uncategorized"> | ||
{t('header.uncategorized', 'Uncategorized')} | ||
</option> | ||
{customCategories.listCategories().map((category) => ( | ||
<option value={category} key={category}> | ||
{category} | ||
</option> | ||
))} | ||
</SelectField> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/frontend/screens/Settings/sections/CategorySettings/index.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.NewCategoryInput { | ||
padding: 0 !important; | ||
|
||
> input[type='text'] { | ||
height: 53px; | ||
} | ||
} |
Oops, something went wrong.