From 74a7d6b35b16fc351cdf22d5141335f9bc77e5cc Mon Sep 17 00:00:00 2001 From: hunlongyu Date: Thu, 23 Apr 2020 17:26:16 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=20=E8=BF=9B=E4=B8=80=E6=AD=A5?= =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=B0=8F=E7=AA=97=E5=8F=A3=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/background.js | 6 +- src/components/Play.vue | 8 +-- src/components/Star.vue | 11 ---- src/mini/Mini.vue | 119 ++++++++++++++++++++++++++++++++++++++-- 4 files changed, 122 insertions(+), 22 deletions(-) diff --git a/src/background.js b/src/background.js index 0be5c78..edf420c 100644 --- a/src/background.js +++ b/src/background.js @@ -42,8 +42,10 @@ function createWindow () { function createMini () { mini = new BrowserWindow({ - width: 540, - height: 335, + width: 550, + minWidth: 260, + height: 340, + minHeight: 180, frame: false, resizable: true, transparent: true, diff --git a/src/components/Play.vue b/src/components/Play.vue index c925ed2..4b0ea86 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -231,9 +231,6 @@ export default { this.video.index++ } }) - this.xg.on('error', () => { - console.log('play error') - }) }).catch(err => { this.$m.error(err) }) @@ -263,6 +260,7 @@ export default { const h = { ...this.video } history.find({ detail: h.detail }).then(res => { if (res) { + h.id = res.id history.update(res.id, h) } else { h.currentTime = '' @@ -347,11 +345,11 @@ export default { this.xg.pause() mini.find().then(res => { const d = { ...this.video } - delete d.id + d.currentTime = this.xg.currentTime + d.id = 0 if (res) { mini.update(d) } else { - d.id = 0 mini.add(d) } ipc.send('min') diff --git a/src/components/Star.vue b/src/components/Star.vue index a6e1e95..628a9aa 100644 --- a/src/components/Star.vue +++ b/src/components/Star.vue @@ -29,8 +29,6 @@
{{data.length}} {{$t('total')}} - 一键更新 - 取消更新
@@ -123,15 +121,6 @@ export default { v: e } }, - oneClickUpdate () { - video.all().then(res => { - const arr = res.reverse() - for (const i of arr) { - console.log(i, 'iiiii') - } - }) - }, - cancleUpdate () {}, updateEvent (e) { tools.detail_get(e.site, e.detail).then(res => { const nameOne = e.name.replace(/\s*/g, '') diff --git a/src/mini/Mini.vue b/src/mini/Mini.vue index 21dffe9..de5b876 100644 --- a/src/mini/Mini.vue +++ b/src/mini/Mini.vue @@ -2,8 +2,21 @@
+ {{index + 1}} / {{length}} + + + Backwards + + + + + + Forward + + + - +
@@ -19,6 +32,7 @@