Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
b5e35553
Commit
b5e35553
authored
Oct 06, 2022
by
Yuri Mikhin
Committed by
Yuri Mikhin
Oct 06, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Micro fixes to the marketplace.
parent
165787db
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
16 deletions
+25
-16
AppCard.tsx
ui/apps/AppCard.tsx
+6
-3
AppList.tsx
ui/apps/AppList.tsx
+1
-1
AppModal.tsx
ui/apps/AppModal.tsx
+0
-3
CategoriesMenu.tsx
ui/apps/CategoriesMenu.tsx
+1
-1
CategoriesMenuItem.tsx
ui/apps/CategoriesMenuItem.tsx
+14
-1
constants.ts
ui/apps/constants.ts
+1
-1
MarketplaceApp.tsx
ui/pages/MarketplaceApp.tsx
+2
-6
No files found.
ui/apps/AppCard.tsx
View file @
b5e35553
...
@@ -28,7 +28,6 @@ const AppCard = ({ id,
...
@@ -28,7 +28,6 @@ const AppCard = ({ id,
isFavorite
,
isFavorite
,
onFavoriteClick
,
onFavoriteClick
,
}:
Props
)
=>
{
}:
Props
)
=>
{
const
categoriesLabel
=
categories
.
map
(
c
=>
APP_CATEGORIES
[
c
]).
filter
(
notEmpty
).
join
(
'
,
'
);
const
categoriesLabel
=
categories
.
map
(
c
=>
APP_CATEGORIES
[
c
]).
filter
(
notEmpty
).
join
(
'
,
'
);
const
handleInfoClick
=
useCallback
((
event
:
MouseEvent
)
=>
{
const
handleInfoClick
=
useCallback
((
event
:
MouseEvent
)
=>
{
...
@@ -55,6 +54,7 @@ const AppCard = ({ id,
...
@@ -55,6 +54,7 @@ const AppCard = ({ id,
padding=
{
{
base
:
3
,
sm
:
'
20px
'
}
}
padding=
{
{
base
:
3
,
sm
:
'
20px
'
}
}
border=
"1px"
border=
"1px"
borderColor=
{
useColorModeValue
(
'
gray.200
'
,
'
gray.600
'
)
}
borderColor=
{
useColorModeValue
(
'
gray.200
'
,
'
gray.600
'
)
}
role=
"group"
>
>
<
Box
<
Box
display=
{
{
base
:
'
grid
'
,
sm
:
'
block
'
}
}
display=
{
{
base
:
'
grid
'
,
sm
:
'
block
'
}
}
...
@@ -71,6 +71,7 @@ const AppCard = ({ id,
...
@@ -71,6 +71,7 @@ const AppCard = ({ id,
h=
{
{
base
:
'
64px
'
,
sm
:
'
96px
'
}
}
h=
{
{
base
:
'
64px
'
,
sm
:
'
96px
'
}
}
>
>
<
Image
<
Image
borderRadius=
{
8
}
src=
{
logo
}
src=
{
logo
}
alt=
{
`${ title } app icon`
}
alt=
{
`${ title } app icon`
}
/>
/>
...
@@ -133,9 +134,11 @@ const AppCard = ({ id,
...
@@ -133,9 +134,11 @@ const AppCard = ({ id,
</
Box
>
</
Box
>
<
IconButton
<
IconButton
display=
{
{
base
:
'
block
'
,
sm
:
isFavorite
?
'
block
'
:
'
none
'
}
}
_groupHover=
{
{
display
:
'
block
'
}
}
position=
"absolute"
position=
"absolute"
right=
{
{
base
:
3
,
sm
:
'
2
0px
'
}
}
right=
{
{
base
:
3
,
sm
:
'
1
0px
'
}
}
top=
{
{
base
:
3
,
sm
:
'
20
px
'
}
}
top=
{
{
base
:
3
,
sm
:
'
14
px
'
}
}
aria
-
label=
"Mark as favorite"
aria
-
label=
"Mark as favorite"
title=
"Mark as favorite"
title=
"Mark as favorite"
variant=
"ghost"
variant=
"ghost"
...
...
ui/apps/AppList.tsx
View file @
b5e35553
...
@@ -28,7 +28,7 @@ const AppList = ({ apps, onAppClick, displayedAppId, onModalClose, favoriteApps,
...
@@ -28,7 +28,7 @@ const AppList = ({ apps, onAppClick, displayedAppId, onModalClose, favoriteApps,
{
apps
.
length
>
0
?
(
{
apps
.
length
>
0
?
(
<
Grid
<
Grid
templateColumns=
{
{
templateColumns=
{
{
sm
:
'
repeat(auto-fill, minmax(17
0
px, 1fr))
'
,
sm
:
'
repeat(auto-fill, minmax(17
8
px, 1fr))
'
,
lg
:
'
repeat(auto-fill, minmax(260px, 1fr))
'
,
lg
:
'
repeat(auto-fill, minmax(260px, 1fr))
'
,
}
}
}
}
autoRows=
"1fr"
autoRows=
"1fr"
...
...
ui/apps/AppModal.tsx
View file @
b5e35553
...
@@ -100,9 +100,6 @@ const AppModal = ({
...
@@ -100,9 +100,6 @@ const AppModal = ({
fontWeight=
"medium"
fontWeight=
"medium"
lineHeight=
{
1
}
lineHeight=
{
1
}
color=
"blue.600"
color=
"blue.600"
whiteSpace=
"nowrap"
overflow=
"hidden"
textOverflow=
"ellipsis"
>
>
{
title
}
{
title
}
</
Heading
>
</
Heading
>
...
...
ui/apps/CategoriesMenu.tsx
View file @
b5e35553
...
@@ -37,7 +37,7 @@ const CategoriesMenu = ({ selectedCategoryId, onSelect }: Props) => {
...
@@ -37,7 +37,7 @@ const CategoriesMenu = ({ selectedCategoryId, onSelect }: Props) => {
display=
"flex"
display=
"flex"
alignItems=
"center"
alignItems=
"center"
>
>
{
selectedCategory
?
selectedCategory
.
name
:
'
All
'
}
{
selectedCategory
?.
name
}
<
Icon
transform=
"rotate(-90deg)"
ml=
{
{
base
:
'
auto
'
,
sm
:
1
}
}
as=
{
eastMiniArrowIcon
}
w=
{
5
}
h=
{
5
}
/>
<
Icon
transform=
"rotate(-90deg)"
ml=
{
{
base
:
'
auto
'
,
sm
:
1
}
}
as=
{
eastMiniArrowIcon
}
w=
{
5
}
h=
{
5
}
/>
</
Box
>
</
Box
>
</
MenuButton
>
</
MenuButton
>
...
...
ui/apps/CategoriesMenuItem.tsx
View file @
b5e35553
import
{
MenuItem
}
from
'
@chakra-ui/react
'
;
import
{
Icon
,
MenuItem
}
from
'
@chakra-ui/react
'
;
import
type
{
FunctionComponent
,
SVGAttributes
}
from
'
react
'
;
import
React
,
{
useCallback
}
from
'
react
'
;
import
React
,
{
useCallback
}
from
'
react
'
;
import
type
{
MarketplaceCategoriesIds
}
from
'
types/client/apps
'
;
import
type
{
MarketplaceCategoriesIds
}
from
'
types/client/apps
'
;
import
starFilledIcon
from
'
icons/star_filled.svg
'
;
type
Props
=
{
type
Props
=
{
id
:
MarketplaceCategoriesIds
;
id
:
MarketplaceCategoriesIds
;
name
:
string
;
name
:
string
;
onClick
:
(
category
:
MarketplaceCategoriesIds
)
=>
void
;
onClick
:
(
category
:
MarketplaceCategoriesIds
)
=>
void
;
}
}
const
ICONS
=
{
favorites
:
starFilledIcon
,
}
as
{
[
key
in
MarketplaceCategoriesIds
]:
FunctionComponent
<
SVGAttributes
<
SVGElement
>>
};
const
CategoriesMenuItem
=
({
id
,
name
,
onClick
}:
Props
)
=>
{
const
CategoriesMenuItem
=
({
id
,
name
,
onClick
}:
Props
)
=>
{
const
handleSelection
=
useCallback
(()
=>
{
const
handleSelection
=
useCallback
(()
=>
{
onClick
(
id
);
onClick
(
id
);
...
@@ -18,7 +25,13 @@ const CategoriesMenuItem = ({ id, name, onClick }: Props) => {
...
@@ -18,7 +25,13 @@ const CategoriesMenuItem = ({ id, name, onClick }: Props) => {
<
MenuItem
<
MenuItem
key=
{
id
}
key=
{
id
}
onClick=
{
handleSelection
}
onClick=
{
handleSelection
}
display=
"flex"
alignItems=
"center"
>
>
{
id
in
ICONS
&&
(
<
Icon
mr=
{
3
}
as=
{
ICONS
[
id
]
}
w=
{
4
}
h=
{
4
}
color=
"blackAlpha.800"
/>
)
}
{
name
}
{
name
}
</
MenuItem
>
</
MenuItem
>
);
);
...
...
ui/apps/constants.ts
View file @
b5e35553
import
type
{
MarketplaceCategoriesIds
}
from
'
types/client/apps
'
;
import
type
{
MarketplaceCategoriesIds
}
from
'
types/client/apps
'
;
export
const
APP_CATEGORIES
:
{[
key
in
MarketplaceCategoriesIds
]:
string
}
=
{
export
const
APP_CATEGORIES
:
{[
key
in
MarketplaceCategoriesIds
]:
string
}
=
{
all
:
'
All
'
,
favorites
:
'
Favorites
'
,
favorites
:
'
Favorites
'
,
all
:
'
All apps
'
,
defi
:
'
DeFi
'
,
defi
:
'
DeFi
'
,
exchanges
:
'
Exchanges
'
,
exchanges
:
'
Exchanges
'
,
finance
:
'
Finance
'
,
finance
:
'
Finance
'
,
...
...
ui/pages/MarketplaceApp.tsx
View file @
b5e35553
...
@@ -4,6 +4,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
...
@@ -4,6 +4,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
import
type
{
AppItemOverview
}
from
'
types/client/apps
'
;
import
type
{
AppItemOverview
}
from
'
types/client/apps
'
;
import
useNetwork
from
'
lib/hooks/useNetwork
'
;
import
useNetwork
from
'
lib/hooks/useNetwork
'
;
import
ContentLoader
from
'
ui/shared/ContentLoader
'
;
import
Page
from
'
ui/shared/Page/Page
'
;
import
Page
from
'
ui/shared/Page/Page
'
;
type
Props
=
{
type
Props
=
{
...
@@ -40,12 +41,7 @@ const MarketplaceApp = ({ app, isLoading }: Props) => {
...
@@ -40,12 +41,7 @@ const MarketplaceApp = ({ app, isLoading }: Props) => {
paddingTop=
{
{
base
:
'
138px
'
,
lg
:
0
}
}
paddingTop=
{
{
base
:
'
138px
'
,
lg
:
0
}
}
>
>
{
(
isFrameLoading
)
&&
(
{
(
isFrameLoading
)
&&
(
<
Center
<
ContentLoader
/>
h=
"100%"
w=
"100%"
>
Loading...
</
Center
>
)
}
)
}
{
app
&&
(
{
app
&&
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment