なんかもうめっちゃ変えた
This commit is contained in:
parent
f8dddc81e2
commit
bc9a8283c6
77 changed files with 170 additions and 165 deletions
16
src/web/app/common/scripts/check-for-update.ts
Normal file
16
src/web/app/common/scripts/check-for-update.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import CONFIG from './config';
|
||||
|
||||
declare var VERSION: string;
|
||||
|
||||
export default function() {
|
||||
fetch(CONFIG.apiUrl + '/meta', {
|
||||
method: 'POST'
|
||||
}).then(res => {
|
||||
res.json().then(meta => {
|
||||
if (meta.version != VERSION) {
|
||||
localStorage.setItem('should-refresh', 'true');
|
||||
alert('%i18n:common.update-available%'.replace('{newer}', meta.version).replace('{current}', VERSION));
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue