Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
ai-tech
dify
Commits
dbe0c435
Unverified
Commit
dbe0c435
authored
Jun 08, 2023
by
Joel
Committed by
GitHub
Jun 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Chore: support gradient border and text (#317)
parent
f4052fdb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
3 deletions
+27
-3
index.tsx
web/app/components/app/configuration/config-prompt/index.tsx
+2
-1
style.module.css
...mponents/app/configuration/config-prompt/style.module.css
+15
-0
index.tsx
web/app/components/explore/app-list/index.tsx
+2
-2
style.module.css
web/app/components/explore/app-list/style.module.css
+8
-0
No files found.
web/app/components/app/configuration/config-prompt/index.tsx
View file @
dbe0c435
...
@@ -5,6 +5,7 @@ import { useTranslation } from 'react-i18next'
...
@@ -5,6 +5,7 @@ import { useTranslation } from 'react-i18next'
import
{
useBoolean
}
from
'ahooks'
import
{
useBoolean
}
from
'ahooks'
import
cn
from
'classnames'
import
cn
from
'classnames'
import
ConfirmAddVar
from
'./confirm-add-var'
import
ConfirmAddVar
from
'./confirm-add-var'
import
s
from
'./style.module.css'
import
BlockInput
from
'@/app/components/base/block-input'
import
BlockInput
from
'@/app/components/base/block-input'
import
type
{
PromptVariable
}
from
'@/models/debug'
import
type
{
PromptVariable
}
from
'@/models/debug'
import
Tooltip
from
'@/app/components/base/tooltip'
import
Tooltip
from
'@/app/components/base/tooltip'
...
@@ -59,7 +60,7 @@ const Prompt: FC<IPromptProps> = ({
...
@@ -59,7 +60,7 @@ const Prompt: FC<IPromptProps> = ({
}
}
return
(
return
(
<
div
className=
{
cn
(
!
readonly
?
'border border-[#2D0DEE] bg-gray-25'
:
'bg-gray-50'
,
'relative rounded-xl'
)
}
>
<
div
className=
{
cn
(
!
readonly
?
`${s.gradientBorder}`
:
'bg-gray-50'
,
'relative rounded-xl'
)
}
>
<
div
className=
"flex items-center h-11 pl-3 gap-1"
>
<
div
className=
"flex items-center h-11 pl-3 gap-1"
>
<
svg
width=
"14"
height=
"13"
viewBox=
"0 0 14 13"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<
svg
width=
"14"
height=
"13"
viewBox=
"0 0 14 13"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<
path
fillRule=
"evenodd"
clipRule=
"evenodd"
d=
"M3.00001 0.100098C3.21218 0.100098 3.41566 0.184383 3.56569 0.334412C3.71572 0.484441 3.80001 0.687924 3.80001 0.900098V1.7001H4.60001C4.81218 1.7001 5.01566 1.78438 5.16569 1.93441C5.31572 2.08444 5.40001 2.28792 5.40001 2.5001C5.40001 2.71227 5.31572 2.91575 5.16569 3.06578C5.01566 3.21581 4.81218 3.3001 4.60001 3.3001H3.80001V4.1001C3.80001 4.31227 3.71572 4.51575 3.56569 4.66578C3.41566 4.81581 3.21218 4.9001 3.00001 4.9001C2.78783 4.9001 2.58435 4.81581 2.43432 4.66578C2.28429 4.51575 2.20001 4.31227 2.20001 4.1001V3.3001H1.40001C1.18783 3.3001 0.98435 3.21581 0.834321 3.06578C0.684292 2.91575 0.600006 2.71227 0.600006 2.5001C0.600006 2.28792 0.684292 2.08444 0.834321 1.93441C0.98435 1.78438 1.18783 1.7001 1.40001 1.7001H2.20001V0.900098C2.20001 0.687924 2.28429 0.484441 2.43432 0.334412C2.58435 0.184383 2.78783 0.100098 3.00001 0.100098ZM3.00001 8.1001C3.21218 8.1001 3.41566 8.18438 3.56569 8.33441C3.71572 8.48444 3.80001 8.68792 3.80001 8.9001V9.7001H4.60001C4.81218 9.7001 5.01566 9.78438 5.16569 9.93441C5.31572 10.0844 5.40001 10.2879 5.40001 10.5001C5.40001 10.7123 5.31572 10.9158 5.16569 11.0658C5.01566 11.2158 4.81218 11.3001 4.60001 11.3001H3.80001V12.1001C3.80001 12.3123 3.71572 12.5158 3.56569 12.6658C3.41566 12.8158 3.21218 12.9001 3.00001 12.9001C2.78783 12.9001 2.58435 12.8158 2.43432 12.6658C2.28429 12.5158 2.20001 12.3123 2.20001 12.1001V11.3001H1.40001C1.18783 11.3001 0.98435 11.2158 0.834321 11.0658C0.684292 10.9158 0.600006 10.7123 0.600006 10.5001C0.600006 10.2879 0.684292 10.0844 0.834321 9.93441C0.98435 9.78438 1.18783 9.7001 1.40001 9.7001H2.20001V8.9001C2.20001 8.68792 2.28429 8.48444 2.43432 8.33441C2.58435 8.18438 2.78783 8.1001 3.00001 8.1001ZM8.60001 0.100098C8.77656 0.100041 8.94817 0.158388 9.0881 0.266047C9.22802 0.373706 9.32841 0.52463 9.37361 0.695298L10.3168 4.2601L13 5.8073C13.1216 5.87751 13.2226 5.9785 13.2928 6.10011C13.363 6.22173 13.4 6.35967 13.4 6.5001C13.4 6.64052 13.363 6.77847 13.2928 6.90008C13.2226 7.02169 13.1216 7.12268 13 7.1929L10.3168 8.7409L9.37281 12.3049C9.32753 12.4754 9.22716 12.6262 9.08732 12.7337C8.94748 12.8413 8.77602 12.8996 8.59961 12.8996C8.42319 12.8996 8.25173 12.8413 8.11189 12.7337C7.97205 12.6262 7.87169 12.4754 7.82641 12.3049L6.88321 8.7401L4.20001 7.1929C4.0784 7.12268 3.97742 7.02169 3.90721 6.90008C3.837 6.77847 3.80004 6.64052 3.80004 6.5001C3.80004 6.35967 3.837 6.22173 3.90721 6.10011C3.97742 5.9785 4.0784 5.87751 4.20001 5.8073L6.88321 4.2593L7.82721 0.695298C7.87237 0.524762 7.97263 0.373937 8.1124 0.266291C8.25216 0.158646 8.42359 0.100217 8.60001 0.100098Z"
fill=
"#5850EC"
/>
<
path
fillRule=
"evenodd"
clipRule=
"evenodd"
d=
"M3.00001 0.100098C3.21218 0.100098 3.41566 0.184383 3.56569 0.334412C3.71572 0.484441 3.80001 0.687924 3.80001 0.900098V1.7001H4.60001C4.81218 1.7001 5.01566 1.78438 5.16569 1.93441C5.31572 2.08444 5.40001 2.28792 5.40001 2.5001C5.40001 2.71227 5.31572 2.91575 5.16569 3.06578C5.01566 3.21581 4.81218 3.3001 4.60001 3.3001H3.80001V4.1001C3.80001 4.31227 3.71572 4.51575 3.56569 4.66578C3.41566 4.81581 3.21218 4.9001 3.00001 4.9001C2.78783 4.9001 2.58435 4.81581 2.43432 4.66578C2.28429 4.51575 2.20001 4.31227 2.20001 4.1001V3.3001H1.40001C1.18783 3.3001 0.98435 3.21581 0.834321 3.06578C0.684292 2.91575 0.600006 2.71227 0.600006 2.5001C0.600006 2.28792 0.684292 2.08444 0.834321 1.93441C0.98435 1.78438 1.18783 1.7001 1.40001 1.7001H2.20001V0.900098C2.20001 0.687924 2.28429 0.484441 2.43432 0.334412C2.58435 0.184383 2.78783 0.100098 3.00001 0.100098ZM3.00001 8.1001C3.21218 8.1001 3.41566 8.18438 3.56569 8.33441C3.71572 8.48444 3.80001 8.68792 3.80001 8.9001V9.7001H4.60001C4.81218 9.7001 5.01566 9.78438 5.16569 9.93441C5.31572 10.0844 5.40001 10.2879 5.40001 10.5001C5.40001 10.7123 5.31572 10.9158 5.16569 11.0658C5.01566 11.2158 4.81218 11.3001 4.60001 11.3001H3.80001V12.1001C3.80001 12.3123 3.71572 12.5158 3.56569 12.6658C3.41566 12.8158 3.21218 12.9001 3.00001 12.9001C2.78783 12.9001 2.58435 12.8158 2.43432 12.6658C2.28429 12.5158 2.20001 12.3123 2.20001 12.1001V11.3001H1.40001C1.18783 11.3001 0.98435 11.2158 0.834321 11.0658C0.684292 10.9158 0.600006 10.7123 0.600006 10.5001C0.600006 10.2879 0.684292 10.0844 0.834321 9.93441C0.98435 9.78438 1.18783 9.7001 1.40001 9.7001H2.20001V8.9001C2.20001 8.68792 2.28429 8.48444 2.43432 8.33441C2.58435 8.18438 2.78783 8.1001 3.00001 8.1001ZM8.60001 0.100098C8.77656 0.100041 8.94817 0.158388 9.0881 0.266047C9.22802 0.373706 9.32841 0.52463 9.37361 0.695298L10.3168 4.2601L13 5.8073C13.1216 5.87751 13.2226 5.9785 13.2928 6.10011C13.363 6.22173 13.4 6.35967 13.4 6.5001C13.4 6.64052 13.363 6.77847 13.2928 6.90008C13.2226 7.02169 13.1216 7.12268 13 7.1929L10.3168 8.7409L9.37281 12.3049C9.32753 12.4754 9.22716 12.6262 9.08732 12.7337C8.94748 12.8413 8.77602 12.8996 8.59961 12.8996C8.42319 12.8996 8.25173 12.8413 8.11189 12.7337C7.97205 12.6262 7.87169 12.4754 7.82641 12.3049L6.88321 8.7401L4.20001 7.1929C4.0784 7.12268 3.97742 7.02169 3.90721 6.90008C3.837 6.77847 3.80004 6.64052 3.80004 6.5001C3.80004 6.35967 3.837 6.22173 3.90721 6.10011C3.97742 5.9785 4.0784 5.87751 4.20001 5.8073L6.88321 4.2593L7.82721 0.695298C7.87237 0.524762 7.97263 0.373937 8.1124 0.266291C8.25216 0.158646 8.42359 0.100217 8.60001 0.100098Z"
fill=
"#5850EC"
/>
...
...
web/app/components/app/configuration/config-prompt/style.module.css
0 → 100644
View file @
dbe0c435
.gradientBorder
{
background
:
radial-gradient
(
circle
at
100%
100%
,
#fcfcfd
0
,
#fcfcfd
10px
,
transparent
10px
)
0%
0%
/
12px
12px
no-repeat
,
radial-gradient
(
circle
at
0
100%
,
#fcfcfd
0
,
#fcfcfd
10px
,
transparent
10px
)
100%
0%
/
12px
12px
no-repeat
,
radial-gradient
(
circle
at
100%
0
,
#fcfcfd
0
,
#fcfcfd
10px
,
transparent
10px
)
0%
100%
/
12px
12px
no-repeat
,
radial-gradient
(
circle
at
0
0
,
#fcfcfd
0
,
#fcfcfd
10px
,
transparent
10px
)
100%
100%
/
12px
12px
no-repeat
,
linear-gradient
(
#fcfcfd
,
#fcfcfd
)
50%
50%
/
calc
(
100%
-
4px
)
calc
(
100%
-
24px
)
no-repeat
,
linear-gradient
(
#fcfcfd
,
#fcfcfd
)
50%
50%
/
calc
(
100%
-
24px
)
calc
(
100%
-
4px
)
no-repeat
,
radial-gradient
(
at
100%
100%
,
rgba
(
45
,
13
,
238
,
0.8
)
0%
,
transparent
70%
),
radial-gradient
(
at
100%
0%
,
rgba
(
45
,
13
,
238
,
0.8
)
0%
,
transparent
70%
),
radial-gradient
(
at
0%
0%
,
rgba
(
42
,
135
,
245
,
0.8
)
0%
,
transparent
70%
),
radial-gradient
(
at
0%
100%
,
rgba
(
42
,
135
,
245
,
0.8
)
0%
,
transparent
70%
);
border-radius
:
12px
;
padding
:
2px
;
box-sizing
:
border-box
;
}
\ No newline at end of file
web/app/components/explore/app-list/index.tsx
View file @
dbe0c435
...
@@ -83,9 +83,9 @@ const Apps: FC = () => {
...
@@ -83,9 +83,9 @@ const Apps: FC = () => {
}
}
return
(
return
(
<
div
className=
'h-full flex flex-col'
>
<
div
className=
'h-full flex flex-col
border-l border-gray-200
'
>
<
div
className=
'shrink-0 pt-6 px-12'
>
<
div
className=
'shrink-0 pt-6 px-12'
>
<
div
className=
'mb-1 text-primary-600 text-xl font-semibold'
>
{
t
(
'explore.apps.title'
)
}
</
div
>
<
div
className=
{
`mb-1 ${s.textGradient} text-xl font-semibold`
}
>
{
t
(
'explore.apps.title'
)
}
</
div
>
<
div
className=
'text-gray-500 text-sm'
>
{
t
(
'explore.apps.description'
)
}
</
div
>
<
div
className=
'text-gray-500 text-sm'
>
{
t
(
'explore.apps.description'
)
}
</
div
>
</
div
>
</
div
>
<
Category
<
Category
...
...
web/app/components/explore/app-list/style.module.css
View file @
dbe0c435
.textGradient
{
background
:
linear-gradient
(
to
right
,
rgba
(
16
,
74
,
225
,
1
)
0
,
rgba
(
0
,
152
,
238
,
1
)
100%
);
-webkit-background-clip
:
text
;
-webkit-text-fill-color
:
transparent
;
background-clip
:
text
;
text-fill-color
:
transparent
;
}
@media
(
min-width
:
1624px
)
{
@media
(
min-width
:
1624px
)
{
.appList
{
.appList
{
grid-template-columns
:
repeat
(
4
,
minmax
(
0
,
1
fr
))
grid-template-columns
:
repeat
(
4
,
minmax
(
0
,
1
fr
))
...
...
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