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
cfe3760d
Commit
cfe3760d
authored
Nov 25, 2022
by
Yuri Mikhin
Committed by
Yuri Mikhin
Nov 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix external links in the AppModal.
parent
25fb91ae
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
15 deletions
+53
-15
AppCard.tsx
ui/apps/AppCard.tsx
+2
-2
AppCardLink.tsx
ui/apps/AppCardLink.tsx
+0
-0
AppModal.tsx
ui/apps/AppModal.tsx
+10
-13
AppModalLink.tsx
ui/apps/AppModalLink.tsx
+41
-0
No files found.
ui/apps/AppCard.tsx
View file @
cfe3760d
...
...
@@ -9,7 +9,7 @@ import starFilledIcon from 'icons/star_filled.svg';
import
starOutlineIcon
from
'
icons/star_outline.svg
'
;
import
notEmpty
from
'
lib/notEmpty
'
;
import
App
Link
from
'
./App
Link
'
;
import
App
CardLink
from
'
./AppCard
Link
'
;
import
{
APP_CATEGORIES
}
from
'
./constants
'
;
interface
Props
extends
AppItemPreview
{
...
...
@@ -87,7 +87,7 @@ const AppCard = ({
size=
{
{
base
:
'
xs
'
,
sm
:
'
sm
'
}
}
fontWeight=
"semibold"
>
<
AppLink
<
App
Card
Link
id=
{
id
}
url=
{
url
}
external=
{
external
}
...
...
ui/apps/AppLink.tsx
→
ui/apps/App
Card
Link.tsx
View file @
cfe3760d
File moved
ui/apps/AppModal.tsx
View file @
cfe3760d
import
{
Box
,
Button
,
Flex
,
Heading
,
Icon
,
IconButton
,
Image
,
Link
,
List
,
Modal
,
ModalBody
,
Box
,
Flex
,
Heading
,
Icon
,
IconButton
,
Image
,
Link
,
List
,
Modal
,
ModalBody
,
ModalCloseButton
,
ModalContent
,
ModalFooter
,
ModalHeader
,
ModalOverlay
,
Tag
,
Text
,
}
from
'
@chakra-ui/react
'
;
import
NextLink
from
'
next/link
'
;
import
React
,
{
useCallback
}
from
'
react
'
;
import
type
{
AppItemOverview
,
MarketplaceCategoriesIds
}
from
'
types/client/apps
'
;
...
...
@@ -15,9 +14,9 @@ import twIcon from 'icons/social/tweet.svg';
import
starFilledIcon
from
'
icons/star_filled.svg
'
;
import
starOutlineIcon
from
'
icons/star_outline.svg
'
;
import
{
nbsp
}
from
'
lib/html-entities
'
;
import
link
from
'
lib/link/link
'
;
import
notEmpty
from
'
lib/notEmpty
'
;
import
AppModalLink
from
'
./AppModalLink
'
;
import
{
APP_CATEGORIES
}
from
'
./constants
'
;
type
Props
=
{
...
...
@@ -35,6 +34,8 @@ const AppModal = ({
}:
Props
)
=>
{
const
{
title
,
url
,
external
,
author
,
description
,
site
,
...
...
@@ -119,16 +120,12 @@ const AppModal = ({
marginTop=
{
{
base
:
6
,
sm
:
0
}
}
>
<
Box
display=
"flex"
>
<
NextLink
href=
{
link
(
'
app_index
'
,
{
id
:
id
})
}
passHref
>
<
Button
as=
"a"
size=
"sm"
marginRight=
{
2
}
width=
{
{
base
:
'
100%
'
,
sm
:
'
auto
'
}
}
>
Launch app
</
Button
>
</
NextLink
>
<
AppModalLink
id=
{
id
}
url=
{
url
}
external=
{
external
}
title=
{
title
}
/>
<
IconButton
aria
-
label=
"Mark as favorite"
...
...
ui/apps/AppModalLink.tsx
0 → 100644
View file @
cfe3760d
import
{
Button
}
from
'
@chakra-ui/react
'
;
import
NextLink
from
'
next/link
'
;
import
React
from
'
react
'
;
import
link
from
'
lib/link/link
'
;
type
Props
=
{
id
:
string
;
url
:
string
;
external
:
boolean
;
title
:
string
;
}
const
AppModalLink
=
({
url
,
external
,
id
}:
Props
)
=>
{
const
buttonProps
=
{
size
:
'
sm
'
,
marginRight
:
2
,
width
:
{
base
:
'
100%
'
,
sm
:
'
auto
'
},
...(
external
?
{
target
:
'
_blank
'
,
rel
:
'
noopener noreferrer
'
,
}
:
{}),
};
return
external
?
(
<
Button
as=
"a"
href=
{
url
}
{
...
buttonProps
}
>
Launch app
</
Button
>
)
:
(
<
NextLink
href=
{
link
(
'
app_index
'
,
{
id
:
id
})
}
passHref
>
<
Button
as=
"a"
{
...
buttonProps
}
>
Launch app
</
Button
>
</
NextLink
>
);
};
export
default
AppModalLink
;
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