mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-10-31 05:24:13 +00:00 
			
		
		
		
	Fix #4063
This commit is contained in:
		
							parent
							
								
									532821d503
								
							
						
					
					
						commit
						882d829558
					
				
					 2 changed files with 0 additions and 20 deletions
				
			
		|  | @ -5,16 +5,6 @@ import ProgressDialog from '../views/components/progress-dialog.vue'; | ||||||
| export default ($root: any) => { | export default ($root: any) => { | ||||||
| 
 | 
 | ||||||
| 	const cropImage = file => new Promise((resolve, reject) => { | 	const cropImage = file => new Promise((resolve, reject) => { | ||||||
| 
 |  | ||||||
| 		const regex = RegExp('\.(jpg|jpeg|png|gif|webp|bmp|tiff)$'); |  | ||||||
| 		if (!regex.test(file.name) ) { |  | ||||||
| 			$root.dialog({ |  | ||||||
| 				title: locale['desktop']['invalid-filetype'], |  | ||||||
| 				text: null |  | ||||||
| 			}); |  | ||||||
| 			return reject('invalid-filetype'); |  | ||||||
| 		} |  | ||||||
| 
 |  | ||||||
| 		const w = $root.new(CropWindow, { | 		const w = $root.new(CropWindow, { | ||||||
| 			image: file, | 			image: file, | ||||||
| 			title: locale['desktop']['avatar-crop-title'], | 			title: locale['desktop']['avatar-crop-title'], | ||||||
|  |  | ||||||
|  | @ -5,16 +5,6 @@ import ProgressDialog from '../views/components/progress-dialog.vue'; | ||||||
| export default ($root: any) => { | export default ($root: any) => { | ||||||
| 
 | 
 | ||||||
| 	const cropImage = file => new Promise((resolve, reject) => { | 	const cropImage = file => new Promise((resolve, reject) => { | ||||||
| 
 |  | ||||||
| 		const regex = RegExp('\.(jpg|jpeg|png|gif|webp|bmp|tiff)$'); |  | ||||||
| 		if (!regex.test(file.name) ) { |  | ||||||
| 			$root.dialog({ |  | ||||||
| 				title: locale['desktop']['invalid-filetype'], |  | ||||||
| 				text: null |  | ||||||
| 			}); |  | ||||||
| 			return reject('invalid-filetype'); |  | ||||||
| 		} |  | ||||||
| 
 |  | ||||||
| 		const w = $root.new(CropWindow, { | 		const w = $root.new(CropWindow, { | ||||||
| 			image: file, | 			image: file, | ||||||
| 			title: locale['desktop']['banner-crop-title'], | 			title: locale['desktop']['banner-crop-title'], | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue