diff --git a/resources/js/app.js b/resources/js/app.js
index 38fc889e..908aa130 100644
--- a/resources/js/app.js
+++ b/resources/js/app.js
@@ -43,6 +43,9 @@ const router = new VueRouter({
Vue.component('vue-json-pretty', VueJsonPretty);
Vue.component('alert', require('./components/Alert.vue').default);
+const app = Vue.component('app', require('./components/App.vue').default);
+const root = document.getElementById('horizon');
+
Vue.mixin(Base);
Vue.directive('tooltip', function (el, binding) {
@@ -54,10 +57,16 @@ Vue.directive('tooltip', function (el, binding) {
});
new Vue({
- el: '#horizon',
-
+ el: root,
router,
-
+ render: (createElement) =>
+ createElement(app, {
+ props: {
+ appName: root.dataset.appName,
+ assetsAreCurrent: root.dataset.assetsAreCurrent,
+ isDownForMaintenance: root.dataset.isDownForMaintenance,
+ },
+ }),
data() {
return {
alert: {
diff --git a/resources/js/base.js b/resources/js/base.js
index dab7123e..44e6aeed 100644
--- a/resources/js/base.js
+++ b/resources/js/base.js
@@ -37,11 +37,11 @@ export default {
* Autoload new entries in listing screens.
*/
autoLoadNewEntries() {
- if (!this.autoLoadsNewEntries) {
- this.autoLoadsNewEntries = true;
+ if (!this.$root.autoLoadsNewEntries) {
+ this.$root.autoLoadsNewEntries = true;
localStorage.autoLoadsNewEntries = 1;
} else {
- this.autoLoadsNewEntries = false;
+ this.$root.autoLoadsNewEntries = false;
localStorage.autoLoadsNewEntries = 0;
}
},
diff --git a/resources/js/components/App.vue b/resources/js/components/App.vue
new file mode 100644
index 00000000..8e8cabea
--- /dev/null
+++ b/resources/js/components/App.vue
@@ -0,0 +1,177 @@
+
+
+
+ Laravel Horizon{{ appName }}
+
+
+ php artisan horizon:publish
+
php artisan horizon:publish
-