diff --git a/README.md b/README.md index 91d1b75..ebef387 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- +

diff --git a/build/icons/1024x1024.png b/build/icons/1024x1024.png index fe256e6..478320b 100644 Binary files a/build/icons/1024x1024.png and b/build/icons/1024x1024.png differ diff --git a/build/icons/128x128.png b/build/icons/128x128.png index 81bc46f..bff6424 100644 Binary files a/build/icons/128x128.png and b/build/icons/128x128.png differ diff --git a/build/icons/16x16.png b/build/icons/16x16.png index d76e43b..0b77f27 100644 Binary files a/build/icons/16x16.png and b/build/icons/16x16.png differ diff --git a/build/icons/24x24.png b/build/icons/24x24.png index a3bcd91..f846104 100644 Binary files a/build/icons/24x24.png and b/build/icons/24x24.png differ diff --git a/build/icons/256x256.png b/build/icons/256x256.png index 443a804..6f3646b 100644 Binary files a/build/icons/256x256.png and b/build/icons/256x256.png differ diff --git a/build/icons/32x32.png b/build/icons/32x32.png index 1ae10a2..9f5b2ff 100644 Binary files a/build/icons/32x32.png and b/build/icons/32x32.png differ diff --git a/build/icons/48x48.png b/build/icons/48x48.png index 19868d9..5d42e21 100644 Binary files a/build/icons/48x48.png and b/build/icons/48x48.png differ diff --git a/build/icons/512x512.png b/build/icons/512x512.png index ea892ce..afd9d6e 100644 Binary files a/build/icons/512x512.png and b/build/icons/512x512.png differ diff --git a/build/icons/64x64.png b/build/icons/64x64.png index d2fb01d..87b5692 100644 Binary files a/build/icons/64x64.png and b/build/icons/64x64.png differ diff --git a/build/icons/icon.icns b/build/icons/icon.icns index f7e7325..93d0b34 100644 Binary files a/build/icons/icon.icns and b/build/icons/icon.icns differ diff --git a/build/icons/icon.ico b/build/icons/icon.ico index 77a87d1..8159717 100644 Binary files a/build/icons/icon.ico and b/build/icons/icon.ico differ diff --git a/package.json b/package.json index a260952..2c2c9b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zy", - "version": "0.9.24", + "version": "0.9.29", "private": true, "author": { "name": "Hunlongyu", @@ -15,6 +15,7 @@ "dev": "vue-cli-service electron:serve", "postinstall": "electron-builder install-app-deps", "postuninstall": "electron-builder install-app-deps", + "electron:generate-icons": "electron-icon-builder --input=./public/icon.png --output=build --flatten", "release": "vue-cli-service electron:build -p always" }, "main": "background.js", diff --git a/public/icon.png b/public/icon.png index 0879dd6..7fae0b6 100644 Binary files a/public/icon.png and b/public/icon.png differ diff --git a/src/assets/image/logo.png b/src/assets/image/logo.png index 443a804..6f3646b 100644 Binary files a/src/assets/image/logo.png and b/src/assets/image/logo.png differ diff --git a/src/assets/scss/theme/light.scss b/src/assets/scss/theme/light.scss index a455796..fb1265a 100644 --- a/src/assets/scss/theme/light.scss +++ b/src/assets/scss/theme/light.scss @@ -221,6 +221,9 @@ } } } + .mask{ + background-color: var(--l-bgc-1); + } } .list{ border: 1px solid var(--l-c-3); diff --git a/src/background.js b/src/background.js index 84e4071..a07b24f 100644 --- a/src/background.js +++ b/src/background.js @@ -114,12 +114,26 @@ ipcMain.on('miniOpacity', (e, arg) => { mini.setOpacity(arg) }) -app.on('ready', async () => { - if (!process.env.WEBPACK_DEV_SERVER_URL) { - createProtocol('app') - } - createWindow() -}) +const gotTheLock = app.requestSingleInstanceLock() +if (!gotTheLock) { + app.quit() +} else { + app.on('second-instance', (event, commandLine, workingDirectory) => { + // 当运行第二个实例时,将会聚焦到win这个窗口 + if (win) { + if (win.isMinimized()) win.restore() + win.focus() + } + }) + + // 创建 win, 加载应用的其余部分, etc... + app.on('ready', () => { + if (!process.env.WEBPACK_DEV_SERVER_URL) { + createProtocol('app') + } + createWindow() + }) +} // Exit cleanly on request from parent process in development mode. if (isDevelopment) { diff --git a/src/components/Play.vue b/src/components/Play.vue index 812fe7c..fb98985 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -3,6 +3,9 @@

{{name}}
+
+
+
@@ -134,7 +137,8 @@ export default { more: true, showNext: false, isStar: false, - isTop: false + isTop: false, + mask: false } }, computed: { @@ -191,6 +195,7 @@ export default { methods: { ...mapMutations(['SET_VIEW', 'SET_DETAIL', 'SET_VIDEO', 'SET_SHARE']), getUrls () { + this.mask = true if (this.timer !== null) { clearInterval(this.timer) this.timer = null @@ -225,6 +230,9 @@ export default { } else { this.xg.play() } + this.xg.once('play', () => { + this.mask = false + }) this.onPlayVideo() this.xg.once('ended', () => { if (res.m3u8_urls.length > 1 && (res.m3u8_urls.length - 1 > this.video.index)) { @@ -233,8 +241,6 @@ export default { } this.xg.off('ended') }) - }).catch(err => { - this.$m.error(err) }) }, changeVideo () { @@ -292,6 +298,7 @@ export default { const v = { ...this.video } const i = v.index + 1 if (i < this.right.listData.length) { + this.video.currentTime = 0 this.video.index++ } else { this.$m.warning(this.$t('last_video')) @@ -430,6 +437,14 @@ export default { cursor: pointer; } } + .mask{ + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 600; + } } .list{ position: absolute; diff --git a/src/lib/site/sites.js b/src/lib/site/sites.js index f7b805a..23abd8f 100644 --- a/src/lib/site/sites.js +++ b/src/lib/site/sites.js @@ -4,7 +4,7 @@ const sites = [ name: '最大资源网', url: 'http://www.zuidazy5.com', new: 'http://www.zuidazy5.com/?m=vod-index-pg-{page}.html', - view: 'http://www.zuidazy5.com/?m=vod-type-id-{id}-page-{page}.html', + view: 'http://www.zuidazy5.com/?m=vod-type-id-{id}-pg-{page}.html', search: 'http://www.zuidazy5.com/index.php?m=vod-search-pg-{page}-wd-{keywords}.html', type: 0, tags: [