Skip to content

Commit

Permalink
fix: store into a titled list broken & etc.
Browse files Browse the repository at this point in the history
 - fix: store into a titled list broken (fixes cnwangjie#108)
 - fix: can remove item of list when click (fixes cnwangjie#109)
 - fix: wrong charset when export to file (fixes cnwangjie#110)
  • Loading branch information
cnwangjie committed Feb 2, 2019
1 parent afec538 commit 7f0e027
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 4 additions & 3 deletions src/common/exchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/common/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
Expand Down
10 changes: 5 additions & 5 deletions src/page/main/DetailList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7f0e027

Please sign in to comment.