forked from MapComplete/MapComplete
		
	Experiment: allow to use the default file picker, see #2202
This commit is contained in:
		
							parent
							
								
									a94a7ecd71
								
							
						
					
					
						commit
						86baf130f3
					
				
					 2 changed files with 10 additions and 2 deletions
				
			
		|  | @ -2,7 +2,7 @@ | ||||||
|   import { createEventDispatcher, onDestroy } from "svelte" |   import { createEventDispatcher, onDestroy } from "svelte" | ||||||
|   import { twMerge } from "tailwind-merge" |   import { twMerge } from "tailwind-merge" | ||||||
| 
 | 
 | ||||||
|   export let accept: string |   export let accept: string | undefined | ||||||
|   export let multiple: boolean = true |   export let multiple: boolean = true | ||||||
| 
 | 
 | ||||||
|   const dispatcher = createEventDispatcher<{ submit: FileList }>() |   const dispatcher = createEventDispatcher<{ submit: FileList }>() | ||||||
|  |  | ||||||
|  | @ -97,7 +97,7 @@ | ||||||
|         <Tr t={error} cls="alert" /> |         <Tr t={error} cls="alert" /> | ||||||
|       {/each} |       {/each} | ||||||
|       <FileSelector |       <FileSelector | ||||||
|         accept="image/*" |         accept=".jpg,.jpeg" | ||||||
|         cls="button border-2 flex flex-col" |         cls="button border-2 flex flex-col" | ||||||
|         multiple={true} |         multiple={true} | ||||||
|         on:submit={(e) => handleFiles(e.detail)} |         on:submit={(e) => handleFiles(e.detail)} | ||||||
|  | @ -122,6 +122,14 @@ | ||||||
|           {/if} |           {/if} | ||||||
|         </div> |         </div> | ||||||
|       </FileSelector> |       </FileSelector> | ||||||
|  |       <FileSelector | ||||||
|  |         accept={undefined} | ||||||
|  |         cls="subtle as-link flex justify-center md:hidden" | ||||||
|  |         multiple={true} | ||||||
|  |         on:submit={(e) => handleFiles(e.detail)} | ||||||
|  |       > | ||||||
|  |         Use the file selector dialog | ||||||
|  |       </FileSelector> | ||||||
|       <div class="subtle text-xs italic"> |       <div class="subtle text-xs italic"> | ||||||
|         <Tr t={Translations.t.general.attribution.panoramaxLicenseCCBYSA} /> |         <Tr t={Translations.t.general.attribution.panoramaxLicenseCCBYSA} /> | ||||||
|         <span class="mx-1">—</span> |         <span class="mx-1">—</span> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue