parent
21ebc5e84e
commit
d10be71161
7 changed files with 265 additions and 15 deletions
|
|
@ -1,8 +1,8 @@
|
|||
import MiOS from '../mios';
|
||||
import { version } from '../../config';
|
||||
|
||||
export default async function(mios: MiOS) {
|
||||
const meta = await mios.getMeta();
|
||||
export default async function(mios: MiOS, force = false, silent = false) {
|
||||
const meta = await mios.getMeta(force);
|
||||
|
||||
if (meta.version != version) {
|
||||
localStorage.setItem('should-refresh', 'true');
|
||||
|
|
@ -20,6 +20,12 @@ export default async function(mios: MiOS) {
|
|||
console.error(e);
|
||||
}
|
||||
|
||||
alert('%i18n:common.update-available%'.replace('{newer}', meta.version).replace('{current}', version));
|
||||
if (!silent) {
|
||||
alert('%i18n:common.update-available%'.replace('{newer}', meta.version).replace('{current}', version));
|
||||
}
|
||||
|
||||
return meta.version;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue