Skip to content

Commit 7f0e027

Browse files
committed
fix: store into a titled list broken & etc.
- fix: store into a titled list broken (fixes #108) - fix: can remove item of list when click (fixes #109) - fix: wrong charset when export to file (fixes #110)
1 parent afec538 commit 7f0e027

File tree

5 files changed

+17
-10
lines changed

5 files changed

+17
-10
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
### v1.4.2 2/2/2019
2+
3+
- fix: store into a titled list broken
4+
- fix: wrong charset when export to file
5+
- fix: can remove item of list when click
6+
17
### v1.4.1 1/31/2019
28

39
- fix: drag and drop not work

src/common/exchange.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ const exportToText = async compatible => {
2424

2525
const exportToFile = (text, {type, suffix}) => {
2626
const name = 'BetterOnetab_backup_' + moment().format('L') + suffix
27-
download(text, name, type)
27+
const blob = new Blob(['\ufeff' + text], {type})
28+
download(blob, name, type)
2829
}
2930

3031
const types = {
31-
JSON: { type: 'application/json', suffix: '.json' },
32-
TEXT: { type: 'plain/text', suffix: '.txt' },
32+
JSON: { type: 'application/json; charset=utf-8', suffix: '.json' },
33+
TEXT: { type: 'plain/text; charset=utf-8', suffix: '.txt' },
3334
}
3435

3536
export default {

src/common/tabs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const storeTabs = async (tabs, listIndex) => {
7373
} else {
7474
const list = lists[listIndex]
7575
tabs.forEach(tab => list.tabs.push(tab))
76-
await listManager.updateListById(lists._id, _.pick(list, 'tabs'))
76+
await listManager.updateListById(list._id, _.pick(list, 'tabs'))
7777
}
7878
if (opts.addHistory) {
7979
for (let i = 0; i < tabs.length; i += 1) {

src/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "__EXT_NAME__",
4-
"version": "1.4.1",
4+
"version": "1.4.2",
55
"default_locale": "en",
66
"description": "__MSG_ext_desc__",
77
"author": "WangJie <[email protected]>",

src/page/main/DetailList.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
v-for="(tab, tabIndex) in list.tabs"
142142
:href="opts.itemClickAction !== 'none' ? tab.url : null"
143143
:target="opts.itemClickAction !== 'none' ? '_blank' : null"
144-
@click.self="itemClicked([list.index, tabIndex])"
144+
@click.stop="itemClicked([list.index, tabIndex])"
145145
@contextmenu="rightClicked(list.index, tabIndex, $event)"
146146
class="list-item"
147147
:ref="'list-' + list.index + '-tab'"
@@ -426,10 +426,10 @@ export default {
426426
'removeTabDirectly', 'setTitle', 'addList', 'setTabs',
427427
]),
428428
...mapActions([
429-
'showSnackbar', 'itemClicked', 'getLists', 'itemClicked',
430-
'removeList', 'removeTab', 'restoreList', 'saveTitle',
431-
'pinList', 'moveListUp', 'moveListDown', 'expandList',
432-
'changeColor', 'tabMoved', 'setTags',
429+
'showSnackbar', 'itemClicked', 'getLists', 'removeList',
430+
'removeTab', 'restoreList', 'saveTitle', 'pinList',
431+
'moveListUp', 'moveListDown', 'expandList', 'changeColor',
432+
'tabMoved', 'setTags',
433433
]),
434434
init() {
435435
if (DEBUG) window.dl = this

0 commit comments

Comments
 (0)