
Reduced time counter increment interval. Added badge service. Refactored user service. Replaced Google+ with People API.
26 lines
531 B
JavaScript
26 lines
531 B
JavaScript
import Vue from 'vue';
|
|
|
|
export default {
|
|
namespaced: true,
|
|
state: {
|
|
itemsById: {},
|
|
},
|
|
mutations: {
|
|
setItem: ({ itemsById }, item) => {
|
|
const itemToSet = {
|
|
...item,
|
|
};
|
|
const existingItem = itemsById[item.id];
|
|
if (existingItem) {
|
|
if (!itemToSet.name) {
|
|
itemToSet.name = existingItem.name;
|
|
}
|
|
if (!itemToSet.imageUrl) {
|
|
itemToSet.imageUrl = existingItem.imageUrl;
|
|
}
|
|
}
|
|
Vue.set(itemsById, item.id, itemToSet);
|
|
},
|
|
},
|
|
};
|