Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Anything Llm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
MachineLearning
Mintplex Labs
Anything Llm
Commits
bc0cc206
Unverified
Commit
bc0cc206
authored
6 months ago
by
Timothy Carambat
Committed by
GitHub
6 months ago
Browse files
Options
Downloads
Patches
Plain Diff
handle onblur for emebed domains (#2199)
bump browser extension commit handle onblur for emebed domains
parent
334fd9cd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
browser-extension
+1
-1
1 addition, 1 deletion
browser-extension
frontend/src/pages/GeneralSettings/EmbedConfigs/NewEmbedModal/index.jsx
+20
-0
20 additions, 0 deletions
...ages/GeneralSettings/EmbedConfigs/NewEmbedModal/index.jsx
with
21 additions
and
1 deletion
browser-extension
@
f2715e95
Compare
d9b28cc1
...
f2715e95
Subproject commit
d9b28cc1e23b64fdb4e666d5b5b49cc8e583aabd
Subproject commit
f2715e950e3c8afc471609afe518bf5452bc1049
This diff is collapsed.
Click to expand it.
frontend/src/pages/GeneralSettings/EmbedConfigs/NewEmbedModal/index.jsx
+
20
−
0
View file @
bc0cc206
...
...
@@ -250,6 +250,25 @@ export const PermittedDomains = ({ defaultValue = [] }) => {
setDomains
(
validDomains
);
};
const
handleBlur
=
(
event
)
=>
{
const
currentInput
=
event
.
target
.
value
;
if
(
!
currentInput
)
return
;
const
validDomains
=
[...
domains
,
currentInput
].
map
((
input
)
=>
{
let
url
=
input
;
if
(
!
url
.
includes
(
"
http://
"
)
&&
!
url
.
includes
(
"
https://
"
))
url
=
`https://
${
url
}
`
;
try
{
new
URL
(
url
);
return
url
;
}
catch
{
return
null
;
}
});
event
.
target
.
value
=
""
;
setDomains
(
validDomains
);
};
return
(
<
div
>
<
div
className
=
"flex flex-col mb-2"
>
...
...
@@ -270,6 +289,7 @@ export const PermittedDomains = ({ defaultValue = [] }) => {
<
TagsInput
value
=
{
domains
}
onChange
=
{
handleChange
}
onBlur
=
{
handleBlur
}
placeholder
=
"https://mysite.com, https://anythingllm.com"
classNames
=
{
{
tag
:
"
bg-blue-300/10 text-zinc-800 m-1
"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment