diff --git a/resources/assets/src/js/admin/index.js b/resources/assets/src/js/admin/common.js
similarity index 100%
rename from resources/assets/src/js/admin/index.js
rename to resources/assets/src/js/admin/common.js
diff --git a/resources/assets/src/js/admin/update.js b/resources/assets/src/js/admin/update.js
index e7c088ab..6147b82c 100644
--- a/resources/assets/src/js/admin/update.js
+++ b/resources/assets/src/js/admin/update.js
@@ -88,6 +88,19 @@ function downloadUpdates() {
}
-if (typeof require !== 'undefined' && typeof module !== 'undefined') {
- module.exports = downloadUpdates;
+function checkForUpdates() {
+ fetch({ url: url('admin/update/check') }).then(data => {
+ if (data.available == true) {
+ let dom = `v${data.latest}`;
+
+ $(`[href="${url('admin/update')}"]`).append(dom);
+ }
+ });
+}
+
+if (typeof require !== 'undefined' && typeof module !== 'undefined') {
+ module.exports = {
+ checkForUpdates,
+ downloadUpdates,
+ };
}
diff --git a/resources/views/admin/master.tpl b/resources/views/admin/master.tpl
index cadd88e4..a540ee12 100644
--- a/resources/views/admin/master.tpl
+++ b/resources/views/admin/master.tpl
@@ -92,16 +92,7 @@
@include('common.dependencies.script', ['module' => 'admin'])
@if (option('check_update'))
-
+
@endif
@if (option('allow_sending_statistics'))