diff --git a/CHANGELOG.md b/CHANGELOG.md index e70d9b4..42f0571 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +### v1.4.2 2/2/2019 + + - fix: store into a titled list broken + - fix: wrong charset when export to file + - fix: can remove item of list when click + ### v1.4.1 1/31/2019 - fix: drag and drop not work diff --git a/src/common/exchange.js b/src/common/exchange.js index 717bf97..25d77a9 100644 --- a/src/common/exchange.js +++ b/src/common/exchange.js @@ -24,12 +24,13 @@ const exportToText = async compatible => { const exportToFile = (text, {type, suffix}) => { const name = 'BetterOnetab_backup_' + moment().format('L') + suffix - download(text, name, type) + const blob = new Blob(['\ufeff' + text], {type}) + download(blob, name, type) } const types = { - JSON: { type: 'application/json', suffix: '.json' }, - TEXT: { type: 'plain/text', suffix: '.txt' }, + JSON: { type: 'application/json; charset=utf-8', suffix: '.json' }, + TEXT: { type: 'plain/text; charset=utf-8', suffix: '.txt' }, } export default { diff --git a/src/common/tabs.js b/src/common/tabs.js index e5ec6cc..48b8077 100644 --- a/src/common/tabs.js +++ b/src/common/tabs.js @@ -73,7 +73,7 @@ const storeTabs = async (tabs, listIndex) => { } else { const list = lists[listIndex] tabs.forEach(tab => list.tabs.push(tab)) - await listManager.updateListById(lists._id, _.pick(list, 'tabs')) + await listManager.updateListById(list._id, _.pick(list, 'tabs')) } if (opts.addHistory) { for (let i = 0; i < tabs.length; i += 1) { diff --git a/src/manifest.json b/src/manifest.json index 916974b..ce5239c 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "__EXT_NAME__", - "version": "1.4.1", + "version": "1.4.2", "default_locale": "en", "description": "__MSG_ext_desc__", "author": "WangJie ", diff --git a/src/page/main/DetailList.vue b/src/page/main/DetailList.vue index c7f14e9..1f20cfc 100644 --- a/src/page/main/DetailList.vue +++ b/src/page/main/DetailList.vue @@ -141,7 +141,7 @@ v-for="(tab, tabIndex) in list.tabs" :href="opts.itemClickAction !== 'none' ? tab.url : null" :target="opts.itemClickAction !== 'none' ? '_blank' : null" - @click.self="itemClicked([list.index, tabIndex])" + @click.stop="itemClicked([list.index, tabIndex])" @contextmenu="rightClicked(list.index, tabIndex, $event)" class="list-item" :ref="'list-' + list.index + '-tab'" @@ -426,10 +426,10 @@ export default { 'removeTabDirectly', 'setTitle', 'addList', 'setTabs', ]), ...mapActions([ - 'showSnackbar', 'itemClicked', 'getLists', 'itemClicked', - 'removeList', 'removeTab', 'restoreList', 'saveTitle', - 'pinList', 'moveListUp', 'moveListDown', 'expandList', - 'changeColor', 'tabMoved', 'setTags', + 'showSnackbar', 'itemClicked', 'getLists', 'removeList', + 'removeTab', 'restoreList', 'saveTitle', 'pinList', + 'moveListUp', 'moveListDown', 'expandList', 'changeColor', + 'tabMoved', 'setTags', ]), init() { if (DEBUG) window.dl = this