diff --git a/src/components/tabs/StockListTab.vue b/src/components/tabs/StockListTab.vue index 5b56c7f..7f5cce4 100644 --- a/src/components/tabs/StockListTab.vue +++ b/src/components/tabs/StockListTab.vue @@ -523,12 +523,18 @@ export default defineComponent({ if (!entryName) return; if (entryName in this.store.storageStockData) { - const overwriteData = confirm(this.$t('stocklist.prompt-bookmark-overwrite')); + const overwriteDataConfirm = confirm(this.$t('stocklist.prompt-bookmark-overwrite')); - if (!overwriteData) return; + if (!overwriteDataConfirm) return; + + this.store.storageStockData[entryName].updatedAt = new Date(); } - this.store.storageStockData[entryName] = this.store.stockString; + this.store.storageStockData[entryName] = { + id: entryName, + createdAt: new Date(), + stockString: this.store.stockString, + }; try { localStorage.setItem('savedStockData', JSON.stringify(this.store.storageStockData)); diff --git a/src/components/tabs/StorageTab.vue b/src/components/tabs/StorageTab.vue index 9331c32..4048815 100644 --- a/src/components/tabs/StorageTab.vue +++ b/src/components/tabs/StorageTab.vue @@ -1,17 +1,14 @@