⚡ Remove all instances of inject, replace with VueX store
This commit is contained in:
@@ -53,7 +53,6 @@ import { localStorageKeys, serviceEndpoints } from '@/utils/defaults';
|
||||
|
||||
export default {
|
||||
name: 'Item',
|
||||
inject: ['config'],
|
||||
props: {
|
||||
id: String, // The unique ID of a tile (e.g. 001)
|
||||
title: String, // The main text of tile, required
|
||||
@@ -77,6 +76,11 @@ export default {
|
||||
statusCheckInterval: Number,
|
||||
statusCheckAllowInsecure: Boolean,
|
||||
},
|
||||
computed: {
|
||||
appConfig() {
|
||||
return this.$store.getters.appConfig;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
contextMenuOpen: false,
|
||||
@@ -110,7 +114,7 @@ export default {
|
||||
this.$emit('itemClicked');
|
||||
}
|
||||
// Update the most/ last used ledger, for smart-sorting
|
||||
if (!this.config.appConfig.disableSmartSort) {
|
||||
if (!this.appConfig.disableSmartSort) {
|
||||
this.incrementMostUsedCount(this.id);
|
||||
this.incrementLastUsedCount(this.id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user