Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd85987e72 | ||
|
|
5c28cf19ed | ||
|
|
4e06e30a5c | ||
|
|
15fa6f3bfb |
@@ -1,5 +1,5 @@
|
||||
<p align="center">
|
||||
<img src="https://i.loli.net/2020/02/22/jvfBbnEuOq5RS9J.png" >
|
||||
<img src="https://i.loli.net/2020/05/07/9kLvPnWVCp7538c.png" >
|
||||
</p>
|
||||
<p align="center">
|
||||
<img src="https://forthebadge.com/images/badges/built-with-love.svg">
|
||||
|
||||
|
Before Width: | Height: | Size: 233 KiB After Width: | Height: | Size: 136 KiB |
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 831 B After Width: | Height: | Size: 838 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 353 KiB After Width: | Height: | Size: 353 KiB |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "zy",
|
||||
"version": "0.9.24",
|
||||
"version": "0.9.28",
|
||||
"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",
|
||||
@@ -44,6 +45,7 @@
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-plugin-component": "^1.1.1",
|
||||
"electron": "^8.2.1",
|
||||
"electron-icon-builder": "^1.0.2",
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-plugin-import": "^2.20.2",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
|
||||
BIN
public/icon.png
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 22 KiB |
@@ -221,6 +221,9 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.mask{
|
||||
background-color: var(--l-bgc-1);
|
||||
}
|
||||
}
|
||||
.list{
|
||||
border: 1px solid var(--l-c-3);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
<div class="box">
|
||||
<div class="title">{{name}}</div>
|
||||
<div id="xg"></div>
|
||||
<div class="mask zy-loading" v-show="mask">
|
||||
<div class="loader"></div>
|
||||
</div>
|
||||
<div class="more" v-show="more">
|
||||
<span class="zy-svg" @click="nextEvent" v-show="showNext">
|
||||
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-labelledby="forwardIconTitle">
|
||||
@@ -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;
|
||||
|
||||