diff --git a/src/layouts/Layout.vue b/src/layouts/Layout.vue index f2deae079..0c1acf442 100644 --- a/src/layouts/Layout.vue +++ b/src/layouts/Layout.vue @@ -6,18 +6,25 @@ -
- + +
Uptime Kuma -
+ +
+ + + Uptime Kuma +
@@ -26,6 +33,14 @@
+ +
+ - diff --git a/src/mixins/socket.js b/src/mixins/socket.js index cd96672db..693f2ae01 100644 --- a/src/mixins/socket.js +++ b/src/mixins/socket.js @@ -25,10 +25,14 @@ export default { avgPingList: { }, uptimeList: { }, notificationList: [], + windowWidth: window.innerWidth, + showListMobile: false, } }, created() { + window.addEventListener('resize', this.onResize); + let wsHost; if (localStorage.dev === "dev") { wsHost = ":3001" @@ -136,6 +140,14 @@ export default { methods: { + cancelActiveList() { + this.$root.showListMobile = false; + }, + + onResize() { + this.windowWidth = window.innerWidth; + }, + storage() { return (this.remember) ? localStorage : sessionStorage; }, @@ -209,6 +221,10 @@ export default { computed: { + isMobile() { + return this.windowWidth <= 767.98; + }, + timezone() { if (this.userTimezone === "auto") { diff --git a/src/pages/Dashboard.vue b/src/pages/Dashboard.vue index d96e14b5e..c42f27656 100644 --- a/src/pages/Dashboard.vue +++ b/src/pages/Dashboard.vue @@ -3,17 +3,17 @@
-
+
Add New Monitor
-
+
No Monitors, please add one.
- +
@@ -53,6 +53,7 @@ export default { }, data() { return { + } }, computed: { @@ -86,6 +87,9 @@ export default { return result; }, + showList() { + return ! this.$root.isMobile || this.$root.showListMobile; + }, }, methods: { monitorURL(id) { diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index f108b8ff2..7054d73ac 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -55,6 +55,9 @@
+ +
+

Notifications

Not available, please setup.

diff --git a/src/pages/Settings.vue b/src/pages/Settings.vue index 415baa489..e5670f507 100644 --- a/src/pages/Settings.vue +++ b/src/pages/Settings.vue @@ -51,6 +51,9 @@
+ +
+

Notifications

Not available, please setup.

Please assign the notification to monitor(s) to get it works.