refactor to method
This commit is contained in:
@ -1159,7 +1159,7 @@
|
|||||||
isShowingHardwareModels: false,
|
isShowingHardwareModels: false,
|
||||||
hardwareModelStats: null,
|
hardwareModelStats: null,
|
||||||
|
|
||||||
isShowingInfoModal: !window.isMobile() && !window.getConfigHasSeenInfoModal(),
|
isShowingInfoModal: this.shouldShowInfoModal(),
|
||||||
isShowingMobileSearch: false,
|
isShowingMobileSearch: false,
|
||||||
isShowingSettings: false,
|
isShowingSettings: false,
|
||||||
|
|
||||||
@ -1203,6 +1203,10 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
shouldShowInfoModal: function() {
|
||||||
|
return !window.getConfigHasSeenInfoModal()
|
||||||
|
&& !window.isMobile();
|
||||||
|
},
|
||||||
loadHardwareModelStats: function() {
|
loadHardwareModelStats: function() {
|
||||||
window.axios.get('/api/v1/stats/hardware-models').then((response) => {
|
window.axios.get('/api/v1/stats/hardware-models').then((response) => {
|
||||||
this.hardwareModelStats = response.data.hardware_model_stats;
|
this.hardwareModelStats = response.data.hardware_model_stats;
|
||||||
|
Reference in New Issue
Block a user