mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-03 18:26:13 +02:00
14
src/web/app/common/scripts/check-for-update.js
Normal file
14
src/web/app/common/scripts/check-for-update.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import CONFIG from './config';
|
||||
|
||||
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('Misskeyの新しいバージョンがあります。ページを再度読み込みすると更新が適用されます。');
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user