diff --git a/src/components/Star.vue b/src/components/Star.vue
index f537e94..dcc5905 100644
--- a/src/components/Star.vue
+++ b/src/components/Star.vue
@@ -24,49 +24,65 @@
-
+
-
- -
- 名字
- 类型
- 上映
- 片源
- 备注
- 观看至
-
-
-
-
-
-
-
-
-
- -
- {{ i.name }}
- {{ i.type }}
- {{ i.year }}
- {{ getSiteName(i.key) }}
- {{ i.note }}
- {{ getHistoryNote(i.index) }}
-
- 播放
- 分享
- 同步
- 下载
- 删除
-
-
-
-
+
+
+
+
+
+
+
+
+
+ {{ getSiteName(scope.row.key) }}
+
+
+
+
+
+
+ {{ getHistoryNote(scope.row.index) }}
+
+
+
+
+ 播放
+ 分享
+ 同步
+ 下载
+ 删除
+
+
+
@@ -77,7 +93,6 @@
import { mapMutations } from 'vuex'
import { star, history, sites } from '../lib/dexie'
import zy from '../lib/site/tools'
-import draggable from 'vuedraggable'
import { remote } from 'electron'
import fs from 'fs'
@@ -90,9 +105,6 @@ export default {
sites: []
}
},
- components: {
- draggable
- },
computed: {
view: {
get () {
@@ -178,6 +190,14 @@ export default {
info: e
}
},
+ highlightHasUpdate (e) {
+ const stylejson = {}
+ stylejson.backgroundColor = 'var(--highlight-color)'
+ if (e.hasUpdate) {
+ return stylejson
+ }
+ return ''
+ },
clearHasUpdateFlag (e) {
star.find({ id: e.id }).then(res => {
res.hasUpdate = false
@@ -185,17 +205,6 @@ export default {
this.getFavorites()
})
},
- listUpdatedEvent () {
- star.clear().then(res1 => {
- // 重新排序
- var id = this.list.length
- this.list.forEach(element => {
- element.id = id
- star.add(element)
- id -= 1
- })
- })
- },
updateEvent (e) {
zy.detail(e.key, e.ids).then(res => {
var doc = {
@@ -219,6 +228,7 @@ export default {
msg = `同步"${e.name}"成功, 检查到更新。`
this.$message.success(msg)
}
+ this.highlightHasUpdate(e)
star.update(e.id, doc)
this.getFavorites()
})
@@ -371,23 +381,25 @@ export default {
},
created () {
this.getFavorites()
- window.Sortable = require('sortablejs').Sortable
}
}