Part of #19.\n\nCreate src/store/bookmarks.ts as a Pinia store that wraps the plain Links class in Vue reactivity.\n\nts\nimport { defineStore } from 'pinia'\nimport { reactive } from 'vue'\nimport { Links } from '../core/links'\n\nexport const useBookmarksStore = defineStore('bookmarks', () => {\n const links = reactive(new Links())\n\n function setLinks(json: string) {\n const loaded = Links.fromJson(json)\n links.links = loaded.links\n links.searchedTags = []\n links.searchString = ''\n }\n\n return { links, setLinks }\n})\n\n\nsidebar.js will call setLinks after retrieving bookmarks from the background page.
Part of #19.\n\nCreate
src/store/bookmarks.tsas a Pinia store that wraps the plainLinksclass in Vue reactivity.\n\nts\nimport { defineStore } from 'pinia'\nimport { reactive } from 'vue'\nimport { Links } from '../core/links'\n\nexport const useBookmarksStore = defineStore('bookmarks', () => {\n const links = reactive(new Links())\n\n function setLinks(json: string) {\n const loaded = Links.fromJson(json)\n links.links = loaded.links\n links.searchedTags = []\n links.searchString = ''\n }\n\n return { links, setLinks }\n})\n\n\nsidebar.jswill callsetLinksafter retrieving bookmarks from the background page.