From 8b54758a40e8c61deff5fd0e5f925d9b0c22a6e8 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Fri, 29 Mar 2024 23:57:37 +1300 Subject: [PATCH] refactor to method --- src/public/index.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/public/index.html b/src/public/index.html index 11368bc..4f03f06 100644 --- a/src/public/index.html +++ b/src/public/index.html @@ -1159,7 +1159,7 @@ isShowingHardwareModels: false, hardwareModelStats: null, - isShowingInfoModal: !window.isMobile() && !window.getConfigHasSeenInfoModal(), + isShowingInfoModal: this.shouldShowInfoModal(), isShowingMobileSearch: false, isShowingSettings: false, @@ -1203,6 +1203,10 @@ }, methods: { + shouldShowInfoModal: function() { + return !window.getConfigHasSeenInfoModal() + && !window.isMobile(); + }, loadHardwareModelStats: function() { window.axios.get('/api/v1/stats/hardware-models').then((response) => { this.hardwareModelStats = response.data.hardware_model_stats;