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
d43279a1
Unverified
Commit
d43279a1
authored
May 26, 2023
by
Yuhao
Committed by
GitHub
May 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: robot emoji (#217)
parent
10848d74
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
36 deletions
+8
-36
NewAppDialog.tsx
web/app/(commonLayout)/apps/NewAppDialog.tsx
+2
-2
index.tsx
web/app/components/base/app-icon/index.tsx
+1
-1
index.tsx
web/app/components/explore/create-app-modal/index.tsx
+2
-2
app-icon.svg
web/app/components/share/text-generation/icons/app-icon.svg
+0
-22
index.tsx
web/app/components/share/text-generation/index.tsx
+3
-2
style.module.css
web/app/components/share/text-generation/style.module.css
+0
-7
No files found.
web/app/(commonLayout)/apps/NewAppDialog.tsx
View file @
d43279a1
...
@@ -37,7 +37,7 @@ const NewAppDialog = ({ show, onSuccess, onClose }: NewAppDialogProps) => {
...
@@ -37,7 +37,7 @@ const NewAppDialog = ({ show, onSuccess, onClose }: NewAppDialogProps) => {
// Emoji Picker
// Emoji Picker
const
[
showEmojiPicker
,
setShowEmojiPicker
]
=
useState
(
false
)
const
[
showEmojiPicker
,
setShowEmojiPicker
]
=
useState
(
false
)
const
[
emoji
,
setEmoji
]
=
useState
({
icon
:
'🤖
️
'
,
icon_background
:
'#FFEAD5'
})
const
[
emoji
,
setEmoji
]
=
useState
({
icon
:
'🤖'
,
icon_background
:
'#FFEAD5'
})
const
mutateApps
=
useContextSelector
(
AppsContext
,
state
=>
state
.
mutateApps
)
const
mutateApps
=
useContextSelector
(
AppsContext
,
state
=>
state
.
mutateApps
)
...
@@ -102,7 +102,7 @@ const NewAppDialog = ({ show, onSuccess, onClose }: NewAppDialogProps) => {
...
@@ -102,7 +102,7 @@ const NewAppDialog = ({ show, onSuccess, onClose }: NewAppDialogProps) => {
setShowEmojiPicker
(
false
)
setShowEmojiPicker
(
false
)
}
}
}
}
onClose=
{
()
=>
{
onClose=
{
()
=>
{
setEmoji
({
icon
:
'🤖
️
'
,
icon_background
:
'#FFEAD5'
})
setEmoji
({
icon
:
'🤖'
,
icon_background
:
'#FFEAD5'
})
setShowEmojiPicker
(
false
)
setShowEmojiPicker
(
false
)
}
}
}
}
/>
}
/>
}
...
...
web/app/components/base/app-icon/index.tsx
View file @
d43279a1
...
@@ -39,7 +39,7 @@ const AppIcon: FC<AppIconProps> = ({
...
@@ -39,7 +39,7 @@ const AppIcon: FC<AppIconProps> = ({
}
}
}
}
onClick=
{
onClick
}
onClick=
{
onClick
}
>
>
{
innerIcon
?
innerIcon
:
icon
&&
icon
!==
''
?
<
em
-
emoji
id=
{
icon
}
/>
:
<
em
-
emoji
id=
{
'robot'
}
/>
}
{
innerIcon
?
innerIcon
:
icon
&&
icon
!==
''
?
<
em
-
emoji
id=
{
icon
}
/>
:
<
em
-
emoji
id=
'🤖'
/>
}
</
span
>
</
span
>
)
)
}
}
...
...
web/app/components/explore/create-app-modal/index.tsx
View file @
d43279a1
...
@@ -28,7 +28,7 @@ const CreateAppModal = ({
...
@@ -28,7 +28,7 @@ const CreateAppModal = ({
const
[
name
,
setName
]
=
React
.
useState
(
''
)
const
[
name
,
setName
]
=
React
.
useState
(
''
)
const
[
showEmojiPicker
,
setShowEmojiPicker
]
=
useState
(
false
)
const
[
showEmojiPicker
,
setShowEmojiPicker
]
=
useState
(
false
)
const
[
emoji
,
setEmoji
]
=
useState
({
icon
:
'🤖
️
'
,
icon_background
:
'#FFEAD5'
})
const
[
emoji
,
setEmoji
]
=
useState
({
icon
:
'🤖'
,
icon_background
:
'#FFEAD5'
})
const
submit
=
()
=>
{
const
submit
=
()
=>
{
if
(
!
name
.
trim
())
{
if
(
!
name
.
trim
())
{
...
@@ -74,7 +74,7 @@ const CreateAppModal = ({
...
@@ -74,7 +74,7 @@ const CreateAppModal = ({
setShowEmojiPicker
(
false
)
setShowEmojiPicker
(
false
)
}
}
}
}
onClose=
{
()
=>
{
onClose=
{
()
=>
{
setEmoji
({
icon
:
'🤖
️
'
,
icon_background
:
'#FFEAD5'
})
setEmoji
({
icon
:
'🤖'
,
icon_background
:
'#FFEAD5'
})
setShowEmojiPicker
(
false
)
setShowEmojiPicker
(
false
)
}
}
}
}
/>
}
/>
}
...
...
web/app/components/share/text-generation/icons/app-icon.svg
deleted
100644 → 0
View file @
10848d74
This diff is collapsed.
Click to expand it.
web/app/components/share/text-generation/index.tsx
View file @
d43279a1
...
@@ -4,7 +4,6 @@ import { useTranslation } from 'react-i18next'
...
@@ -4,7 +4,6 @@ import { useTranslation } from 'react-i18next'
import
useBreakpoints
,
{
MediaType
}
from
'@/hooks/use-breakpoints'
import
useBreakpoints
,
{
MediaType
}
from
'@/hooks/use-breakpoints'
import
cn
from
'classnames'
import
cn
from
'classnames'
import
{
useBoolean
,
useClickAway
}
from
'ahooks'
import
{
useBoolean
,
useClickAway
}
from
'ahooks'
import
{
useContext
}
from
'use-context-selector'
import
ConfigScence
from
'@/app/components/share/text-generation/config-scence'
import
ConfigScence
from
'@/app/components/share/text-generation/config-scence'
import
NoData
from
'@/app/components/share/text-generation/no-data'
import
NoData
from
'@/app/components/share/text-generation/no-data'
// import History from '@/app/components/share/text-generation/history'
// import History from '@/app/components/share/text-generation/history'
...
@@ -12,6 +11,7 @@ import { fetchAppInfo, fetchAppParams, sendCompletionMessage, updateFeedback, sa
...
@@ -12,6 +11,7 @@ import { fetchAppInfo, fetchAppParams, sendCompletionMessage, updateFeedback, sa
import
type
{
SiteInfo
}
from
'@/models/share'
import
type
{
SiteInfo
}
from
'@/models/share'
import
type
{
PromptConfig
,
MoreLikeThisConfig
,
SavedMessage
}
from
'@/models/debug'
import
type
{
PromptConfig
,
MoreLikeThisConfig
,
SavedMessage
}
from
'@/models/debug'
import
Toast
from
'@/app/components/base/toast'
import
Toast
from
'@/app/components/base/toast'
import
AppIcon
from
'@/app/components/base/app-icon'
import
{
Feedbacktype
}
from
'@/app/components/app/chat'
import
{
Feedbacktype
}
from
'@/app/components/app/chat'
import
{
changeLanguage
}
from
'@/i18n/i18next-config'
import
{
changeLanguage
}
from
'@/i18n/i18next-config'
import
Loading
from
'@/app/components/base/loading'
import
Loading
from
'@/app/components/base/loading'
...
@@ -24,6 +24,7 @@ import s from './style.module.css'
...
@@ -24,6 +24,7 @@ import s from './style.module.css'
import
Button
from
'../../base/button'
import
Button
from
'../../base/button'
import
{
App
}
from
'@/types/app'
import
{
App
}
from
'@/types/app'
import
{
InstalledApp
}
from
'@/models/explore'
import
{
InstalledApp
}
from
'@/models/explore'
import
{
appDefaultIconBackground
}
from
'@/config'
export
type
IMainProps
=
{
export
type
IMainProps
=
{
isInstalledApp
?:
boolean
,
isInstalledApp
?:
boolean
,
...
@@ -283,7 +284,7 @@ const TextGeneration: FC<IMainProps> = ({
...
@@ -283,7 +284,7 @@ const TextGeneration: FC<IMainProps> = ({
<
div
className=
'mb-6'
>
<
div
className=
'mb-6'
>
<
div
className=
'flex justify-between items-center'
>
<
div
className=
'flex justify-between items-center'
>
<
div
className=
'flex items-center space-x-3'
>
<
div
className=
'flex items-center space-x-3'
>
<
div
className=
{
cn
(
s
.
appIcon
,
'shrink-0'
)
}
></
div
>
<
AppIcon
size=
"small"
icon=
{
siteInfo
.
icon
}
background=
{
siteInfo
.
icon_background
||
appDefaultIconBackground
}
/
>
<
div
className=
'text-lg text-gray-800 font-semibold'
>
{
siteInfo
.
title
}
</
div
>
<
div
className=
'text-lg text-gray-800 font-semibold'
>
{
siteInfo
.
title
}
</
div
>
</
div
>
</
div
>
{
!
isPC
&&
(
{
!
isPC
&&
(
...
...
web/app/components/share/text-generation/style.module.css
View file @
d43279a1
...
@@ -4,13 +4,6 @@
...
@@ -4,13 +4,6 @@
box-shadow
:
0px
12px
16px
-4px
rgba
(
16
,
24
,
40
,
0.08
),
0px
4px
6px
-2px
rgba
(
16
,
24
,
40
,
0.03
);
box-shadow
:
0px
12px
16px
-4px
rgba
(
16
,
24
,
40
,
0.08
),
0px
4px
6px
-2px
rgba
(
16
,
24
,
40
,
0.03
);
}
}
.appIcon
{
width
:
32px
;
height
:
32px
;
background
:
url(./icons/app-icon.svg)
center
center
no-repeat
;
background-size
:
contain
;
}
.starIcon
{
.starIcon
{
width
:
16px
;
width
:
16px
;
height
:
16px
;
height
:
16px
;
...
...
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