✌️
This commit is contained in:
		| @@ -1,11 +1,10 @@ | |||||||
| import MiOS from '../mios'; | import MiOS from '../mios'; | ||||||
|  | import { version } from '../../config'; | ||||||
| declare const _VERSION_: string; |  | ||||||
|  |  | ||||||
| export default async function(mios: MiOS) { | export default async function(mios: MiOS) { | ||||||
| 	const meta = await mios.getMeta(); | 	const meta = await mios.getMeta(); | ||||||
|  |  | ||||||
| 	if (meta.version != _VERSION_) { | 	if (meta.version != version) { | ||||||
| 		localStorage.setItem('should-refresh', 'true'); | 		localStorage.setItem('should-refresh', 'true'); | ||||||
|  |  | ||||||
| 		// Clear cache (serive worker) | 		// Clear cache (serive worker) | ||||||
| @@ -19,6 +18,6 @@ export default async function(mios: MiOS) { | |||||||
| 			console.error(e); | 			console.error(e); | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		alert('%i18n:common.update-available%'.replace('{newer}', meta.version).replace('{current}', _VERSION_)); | 		alert('%i18n:common.update-available%'.replace('{newer}', meta.version).replace('{current}', version)); | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 syuilo
					syuilo