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
6c87e86a
Commit
6c87e86a
authored
May 10, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
marketplace: support dark mode logo version
parent
1edd2885
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
3 deletions
+10
-3
marketplace.ts
types/client/marketplace.ts
+1
-0
MarketplaceAppCard.tsx
ui/marketplace/MarketplaceAppCard.tsx
+4
-1
MarketplaceAppModal.tsx
ui/marketplace/MarketplaceAppModal.tsx
+4
-2
MarketplaceList.tsx
ui/marketplace/MarketplaceList.tsx
+1
-0
No files found.
types/client/marketplace.ts
View file @
6c87e86a
...
...
@@ -3,6 +3,7 @@ export type MarketplaceAppPreview = {
external
?:
boolean
;
title
:
string
;
logo
:
string
;
logoDarkMode
?:
string
;
shortDescription
:
string
;
categories
:
Array
<
string
>
;
url
:
string
;
...
...
ui/marketplace/MarketplaceAppCard.tsx
View file @
6c87e86a
...
...
@@ -22,6 +22,7 @@ const MarketplaceAppCard = ({
external
,
title
,
logo
,
logoDarkMode
,
shortDescription
,
categories
,
onInfoClick
,
...
...
@@ -39,6 +40,8 @@ const MarketplaceAppCard = ({
onFavoriteClick
(
id
,
isFavorite
);
},
[
onFavoriteClick
,
id
,
isFavorite
]);
const
logoUrl
=
useColorModeValue
(
logo
,
logoDarkMode
||
logo
);
return
(
<
LinkBox
_hover=
{
{
...
...
@@ -73,7 +76,7 @@ const MarketplaceAppCard = ({
justifyContent=
"center"
>
<
Image
src=
{
logo
}
src=
{
logo
Url
}
alt=
{
`${ title } app icon`
}
/>
</
Box
>
...
...
ui/marketplace/MarketplaceAppModal.tsx
View file @
6c87e86a
import
{
Box
,
Flex
,
Heading
,
Icon
,
IconButton
,
Image
,
Link
,
List
,
Modal
,
ModalBody
,
ModalCloseButton
,
ModalContent
,
ModalFooter
,
ModalHeader
,
ModalOverlay
,
Tag
,
Text
,
ModalCloseButton
,
ModalContent
,
ModalFooter
,
ModalHeader
,
ModalOverlay
,
Tag
,
Text
,
useColorModeValue
,
}
from
'
@chakra-ui/react
'
;
import
React
,
{
useCallback
}
from
'
react
'
;
...
...
@@ -41,6 +41,7 @@ const MarketplaceAppModal = ({
telegram
,
twitter
,
logo
,
logoDarkMode
,
categories
,
}
=
data
;
...
...
@@ -64,6 +65,7 @@ const MarketplaceAppModal = ({
},
[
onFavoriteClick
,
data
.
id
,
isFavorite
]);
const
isMobile
=
useIsMobile
();
const
logoUrl
=
useColorModeValue
(
logo
,
logoDarkMode
||
logo
);
return
(
<
Modal
...
...
@@ -89,7 +91,7 @@ const MarketplaceAppModal = ({
gridRow=
{
{
base
:
'
1 / 3
'
,
sm
:
'
1 / 4
'
}
}
>
<
Image
src=
{
logo
}
src=
{
logo
Url
}
alt=
{
`${ title } app icon`
}
/>
</
Flex
>
...
...
ui/marketplace/MarketplaceList.tsx
View file @
6c87e86a
...
...
@@ -36,6 +36,7 @@ const MarketplaceList = ({ apps, onAppClick, favoriteApps, onFavoriteClick }: Pr
url=
{
app
.
url
}
title=
{
app
.
title
}
logo=
{
app
.
logo
}
logoDarkMode=
{
app
.
logoDarkMode
}
shortDescription=
{
app
.
shortDescription
}
categories=
{
app
.
categories
}
isFavorite=
{
favoriteApps
.
includes
(
app
.
id
)
}
...
...
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