refactor: removed lazyLoad method
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
This commit is contained in:
		
							parent
							
								
									b730c1d1b4
								
							
						
					
					
						commit
						b7d7454df5
					
				| @ -4,8 +4,6 @@ import Home from './routes/Home.vue' | |||||||
| 
 | 
 | ||||||
| Vue.use(VueRouter) | Vue.use(VueRouter) | ||||||
| 
 | 
 | ||||||
| const lazyLoad = (componentPath) => (() => import(componentPath)); |  | ||||||
| 
 |  | ||||||
| const toolsComponents = [ | const toolsComponents = [ | ||||||
|     { |     { | ||||||
|         title: 'Crypto', |         title: 'Crypto', | ||||||
| @ -14,7 +12,7 @@ const toolsComponents = [ | |||||||
|                 icon: 'fa-key', |                 icon: 'fa-key', | ||||||
|                 text: 'Token generator', |                 text: 'Token generator', | ||||||
|                 path: '/token-generator', |                 path: '/token-generator', | ||||||
|                 component: lazyLoad('./routes/tools/TokenGenerator'), |                 component: () => import('./routes/tools/TokenGenerator'), | ||||||
|                 keywords: ['token', 'random', 'string', 'alphanumeric'], |                 keywords: ['token', 'random', 'string', 'alphanumeric'], | ||||||
|                 description: 'Generate random tokens.' |                 description: 'Generate random tokens.' | ||||||
|             }, |             }, | ||||||
| @ -22,14 +20,14 @@ const toolsComponents = [ | |||||||
|                 icon: 'fa-fingerprint', |                 icon: 'fa-fingerprint', | ||||||
|                 text: 'Uuid generator', |                 text: 'Uuid generator', | ||||||
|                 path: '/uuid-generator', |                 path: '/uuid-generator', | ||||||
|                 component: lazyLoad('./routes/tools/UuidGenerator'), |                 component: () => import('./routes/tools/UuidGenerator'), | ||||||
|                 keywords: ['token', 'v4', 'string', 'alphanumeric'] |                 keywords: ['token', 'v4', 'string', 'alphanumeric'] | ||||||
|             }, |             }, | ||||||
|             { |             { | ||||||
|                 icon: 'fa-font', |                 icon: 'fa-font', | ||||||
|                 text: 'Hash text', |                 text: 'Hash text', | ||||||
|                 path: '/hash', |                 path: '/hash', | ||||||
|                 component: lazyLoad('./routes/tools/Hash'), |                 component: () => import('./routes/tools/Hash'), | ||||||
|                 keywords: ['md5', 'sha1', 'sha256', 'sha224', 'sha512', 'sha384', 'sha3', 'ripemd160', 'random'] |                 keywords: ['md5', 'sha1', 'sha256', 'sha224', 'sha512', 'sha384', 'sha3', 'ripemd160', 'random'] | ||||||
| 
 | 
 | ||||||
|             }, |             }, | ||||||
| @ -37,7 +35,7 @@ const toolsComponents = [ | |||||||
|                 icon: 'fa-lock', |                 icon: 'fa-lock', | ||||||
|                 text: 'Cypher/uncypher text', |                 text: 'Cypher/uncypher text', | ||||||
|                 path: '/cypher', |                 path: '/cypher', | ||||||
|                 component: lazyLoad('./routes/tools/TextCypher'), |                 component: () => import('./routes/tools/TextCypher'), | ||||||
|                 keywords: ['aes', 'tripledes', 'rabbit', 'rabbitlegacy', 'rc4'] |                 keywords: ['aes', 'tripledes', 'rabbit', 'rabbitlegacy', 'rc4'] | ||||||
|             }, |             }, | ||||||
|         ], |         ], | ||||||
| @ -49,21 +47,21 @@ const toolsComponents = [ | |||||||
|                 icon: 'fa-calendar', |                 icon: 'fa-calendar', | ||||||
|                 text: 'Date/Time converter', |                 text: 'Date/Time converter', | ||||||
|                 path: '/date-converter', |                 path: '/date-converter', | ||||||
|                 component: lazyLoad('./routes/tools/DateConverter'), |                 component: () => import('./routes/tools/DateConverter'), | ||||||
|                 keywords: ['locale', 'format', 'iso 8601', 'utc', 'timestamp', 'unix', 'year', 'month', 'day', 'hours', 'minutes', 'seconds'] |                 keywords: ['locale', 'format', 'iso 8601', 'utc', 'timestamp', 'unix', 'year', 'month', 'day', 'hours', 'minutes', 'seconds'] | ||||||
|             }, |             }, | ||||||
|             { |             { | ||||||
|                 icon: 'fa-exchange-alt', |                 icon: 'fa-exchange-alt', | ||||||
|                 text: 'Base converter', |                 text: 'Base converter', | ||||||
|                 path: '/base-converter', |                 path: '/base-converter', | ||||||
|                 component: lazyLoad('./routes/tools/BaseConverter'), |                 component: () => import('./routes/tools/BaseConverter'), | ||||||
|                 keywords: ['binary', 'hexadecimal', 'decimal'] |                 keywords: ['binary', 'hexadecimal', 'decimal'] | ||||||
|             }, |             }, | ||||||
|             { |             { | ||||||
|                 icon: 'fa-palette', |                 icon: 'fa-palette', | ||||||
|                 text: 'Color picker/converter', |                 text: 'Color picker/converter', | ||||||
|                 path: '/color-picker-converter', |                 path: '/color-picker-converter', | ||||||
|                 component: lazyLoad('./routes/tools/ColorConverter'), |                 component: () => import('./routes/tools/ColorConverter'), | ||||||
|                 keywords: ['rgb', 'rgba', 'hexadecimal', 'hsla', 'red', 'green', 'blue', 'alpha'] |                 keywords: ['rgb', 'rgba', 'hexadecimal', 'hsla', 'red', 'green', 'blue', 'alpha'] | ||||||
|             }, |             }, | ||||||
|         ], |         ], | ||||||
| @ -75,14 +73,14 @@ const toolsComponents = [ | |||||||
|                 icon: 'fa-link', |                 icon: 'fa-link', | ||||||
|                 text: 'URL encode/decode', |                 text: 'URL encode/decode', | ||||||
|                 path: '/url-encoder', |                 path: '/url-encoder', | ||||||
|                 component: lazyLoad('./routes/tools/UrlEncoder'), |                 component: () => import('./routes/tools/UrlEncoder'), | ||||||
|                 keywords: ['%20'] |                 keywords: ['%20'] | ||||||
|             }, |             }, | ||||||
|             { |             { | ||||||
|                 icon: 'fa-file-export', |                 icon: 'fa-file-export', | ||||||
|                 text: 'File to Base64', |                 text: 'File to Base64', | ||||||
|                 path: '/file-to-base64', |                 path: '/file-to-base64', | ||||||
|                 component: lazyLoad('./routes/tools/FileToBase64') |                 component: () => import('./routes/tools/FileToBase64') | ||||||
|             }, |             }, | ||||||
|         ], |         ], | ||||||
|     }, |     }, | ||||||
| @ -93,7 +91,7 @@ const toolsComponents = [ | |||||||
|                 icon: 'fa-align-left\n', |                 icon: 'fa-align-left\n', | ||||||
|                 text: 'Text stats', |                 text: 'Text stats', | ||||||
|                 path: '/text-stats', |                 path: '/text-stats', | ||||||
|                 component: lazyLoad('./routes/tools/TextStats'), |                 component: () => import('./routes/tools/TextStats'), | ||||||
|                 keywords: ['word', 'count', 'size', 'bytes', 'length'] |                 keywords: ['word', 'count', 'size', 'bytes', 'length'] | ||||||
|             }, |             }, | ||||||
|         ], |         ], | ||||||
| @ -111,12 +109,12 @@ const routes = [ | |||||||
|     { |     { | ||||||
|         path: '/about', |         path: '/about', | ||||||
|         name: 'About', |         name: 'About', | ||||||
|         component: lazyLoad('./routes/About.vue') |         component: () => import('./routes/About.vue') | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|         path: '*', |         path: '*', | ||||||
|         name: '404', |         name: '404', | ||||||
|         component: lazyLoad('./routes/NotFound.vue') |         component: () => import('./routes/NotFound.vue') | ||||||
|     } |     } | ||||||
| ] | ] | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user