File tree Expand file tree Collapse file tree 1 file changed +8
-17
lines changed
frontend/src/features/browser-profiles Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export class NewBrowserProfileDialog extends LiteElement {
4747 @reset =${ this . onReset }
4848 @submit =${ this . onSubmit }
4949 >
50- < div class ="grid gap-5 ">
50+ < div class ="grid ">
5151 < div >
5252 < label
5353 id ="startingUrlLabel "
@@ -57,21 +57,10 @@ export class NewBrowserProfileDialog extends LiteElement {
5757 </ label >
5858
5959 < div class ="flex ">
60- < sl-select
61- class ="mr-1 max-w-[8rem] grow-0 "
62- name ="urlPrefix "
63- value ="https:// "
64- hoist
65- @sl-hide =${ this . stopProp }
66- @sl-after-hide =${ this . stopProp }
67- >
68- < sl-option value ="http:// "> http://</ sl-option >
69- < sl-option value ="https:// "> https://</ sl-option >
70- </ sl-select >
7160 < sl-input
7261 class ="grow "
7362 name ="url "
74- placeholder =${ msg ( "example.com" ) }
63+ placeholder =${ msg ( "https:// example.com" ) }
7564 autocomplete ="off"
7665 aria-labelledby="startingUrlLabel"
7766 required
@@ -134,13 +123,15 @@ export class NewBrowserProfileDialog extends LiteElement {
134123 this . isSubmitting = true ;
135124
136125 const formData = new FormData ( event . target as HTMLFormElement ) ;
137- const url = formData . get ( "url" ) as string ;
126+ let url = formData . get ( "url" ) as string ;
138127
139128 try {
129+ url = url . trim ( ) ;
130+ if ( ! url . startsWith ( "http://" ) && ! url . startsWith ( "https://" ) ) {
131+ url = `https://${ url } ` ;
132+ }
140133 const data = await this . createBrowser ( {
141- url : `${ formData . get ( "urlPrefix" ) ?. toString ( ) } ${ url . substring (
142- url . indexOf ( "," ) + 1 ,
143- ) } `,
134+ url : url ,
144135 crawlerChannel : this . crawlerChannel ,
145136 } ) ;
146137
You can’t perform that action at this time.
0 commit comments