Skip to content

Commit b1f0b19

Browse files
authored
[UI] Small fixes (#1232)
* test * [Fix] Filter Select colors * Fix: dont hide library icons on refresh
1 parent 07bb705 commit b1f0b19

File tree

2 files changed

+56
-56
lines changed

2 files changed

+56
-56
lines changed

src/components/UI/FormControl/index.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
font-size: 14px;
7171
text-transform: uppercase;
7272
font-weight: 600;
73-
color: var(--accent);
73+
color: var(--text-default);
7474
}
7575

7676
.FormControl--segmented > button:not(:disabled):hover {
@@ -79,7 +79,7 @@
7979

8080
.FormControl--segmented > button:not(.non-important):active,
8181
.FormControl--segmented > button:not(.non-important).active {
82-
color: var(--text-default);
82+
color: var(--accent);
8383
}
8484

8585
.FormControl--segmented > button:not(:first-child) {

src/screens/Library/index.tsx

+54-54
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ export const Library = ({ library, showRecentsOnly }: Props) => {
6060
setShowModal({ game: appName, show: true, runner })
6161
}
6262

63-
if (refreshing && !showRecentsOnly) {
64-
return <UpdateComponent inline />
65-
}
66-
6763
function titleWithIcons() {
6864
return (
6965
<div className="titleWithIcons">
@@ -106,57 +102,61 @@ export const Library = ({ library, showRecentsOnly }: Props) => {
106102
<h3 className="libraryHeader">
107103
{showRecentsOnly ? t('Recent', 'Played Recently') : titleWithIcons()}
108104
</h3>
109-
<div
110-
style={!library.length ? { backgroundColor: 'transparent' } : {}}
111-
className={cx({
112-
gameList: showRecentsOnly || layout === 'grid',
113-
gameListLayout: layout !== 'grid' && !showRecentsOnly
114-
})}
115-
>
116-
{!!library.length &&
117-
list.map(
118-
({
119-
title,
120-
art_square,
121-
art_cover,
122-
art_logo,
123-
app_name,
124-
is_installed,
125-
is_mac_native,
126-
is_linux_native,
127-
runner,
128-
cloud_save_enabled,
129-
is_game,
130-
install: { version, install_size, is_dlc }
131-
}: GameInfo) => {
132-
if (is_dlc) {
133-
return null
105+
{refreshing && !showRecentsOnly ? (
106+
<UpdateComponent inline />
107+
) : (
108+
<div
109+
style={!library.length ? { backgroundColor: 'transparent' } : {}}
110+
className={cx({
111+
gameList: showRecentsOnly || layout === 'grid',
112+
gameListLayout: layout !== 'grid' && !showRecentsOnly
113+
})}
114+
>
115+
{!!library.length &&
116+
list.map(
117+
({
118+
title,
119+
art_square,
120+
art_cover,
121+
art_logo,
122+
app_name,
123+
is_installed,
124+
is_mac_native,
125+
is_linux_native,
126+
runner,
127+
cloud_save_enabled,
128+
is_game,
129+
install: { version, install_size, is_dlc }
130+
}: GameInfo) => {
131+
if (is_dlc) {
132+
return null
133+
}
134+
const hasUpdate = gameUpdates?.includes(app_name)
135+
return (
136+
<GameCard
137+
key={app_name}
138+
runner={runner}
139+
cover={art_square}
140+
coverList={art_cover}
141+
logo={art_logo}
142+
hasCloudSave={cloud_save_enabled}
143+
title={title}
144+
appName={app_name}
145+
isInstalled={is_installed}
146+
isGame={is_game}
147+
version={`${version}`}
148+
size={`${install_size}`}
149+
hasUpdate={hasUpdate}
150+
buttonClick={() => handleModal(app_name, runner)}
151+
forceCard={showRecentsOnly}
152+
isMacNative={is_mac_native}
153+
isLinuxNative={is_linux_native}
154+
/>
155+
)
134156
}
135-
const hasUpdate = gameUpdates?.includes(app_name)
136-
return (
137-
<GameCard
138-
key={app_name}
139-
runner={runner}
140-
cover={art_square}
141-
coverList={art_cover}
142-
logo={art_logo}
143-
hasCloudSave={cloud_save_enabled}
144-
title={title}
145-
appName={app_name}
146-
isInstalled={is_installed}
147-
isGame={is_game}
148-
version={`${version}`}
149-
size={`${install_size}`}
150-
hasUpdate={hasUpdate}
151-
buttonClick={() => handleModal(app_name, runner)}
152-
forceCard={showRecentsOnly}
153-
isMacNative={is_mac_native}
154-
isLinuxNative={is_linux_native}
155-
/>
156-
)
157-
}
158-
)}
159-
</div>
157+
)}
158+
</div>
159+
)}
160160
{!showRecentsOnly && (
161161
<button id="backToTopBtn" onClick={backToTop} ref={backToTopElement}>
162162
<ArrowDropUp className="material-icons" />

0 commit comments

Comments
 (0)