mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-05-05 18:34:50 +08:00
🎏 自动构建跨平台软件
This commit is contained in:
37
.github/workflows/release.yml
vendored
Normal file
37
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: release-build
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*.*.*
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest, macos-latest, ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
|
||||
- run: |
|
||||
yarn
|
||||
yarn electron:build
|
||||
shell: pwsh
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
dist_electron/*.exe
|
||||
dist_electron/*.dmg
|
||||
dist_electron/*.snap
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -59,6 +59,7 @@ function createMini () {
|
||||
webSecurity: false,
|
||||
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION
|
||||
},
|
||||
// eslint-disable-next-line
|
||||
icon: path.join(__static, 'icon.png')
|
||||
})
|
||||
|
||||
@@ -102,14 +103,14 @@ ipcMain.on('mini', () => {
|
||||
createMini()
|
||||
win.close()
|
||||
})
|
||||
ipcMain.on('mini-min', () => {
|
||||
ipcMain.on('miniMin', () => {
|
||||
mini.minimize()
|
||||
})
|
||||
ipcMain.on('mini-close', () => {
|
||||
ipcMain.on('miniClose', () => {
|
||||
mini.close()
|
||||
createWindow()
|
||||
})
|
||||
ipcMain.on('mini-opacity', (e, arg) => {
|
||||
ipcMain.on('miniOpacity', (e, arg) => {
|
||||
mini.setOpacity(arg)
|
||||
})
|
||||
|
||||
|
||||
@@ -369,9 +369,13 @@ export default {
|
||||
},
|
||||
listItemEvent (n) {
|
||||
this.video.index = n
|
||||
this.right.show = false
|
||||
this.right.type = ''
|
||||
},
|
||||
historyItemEvent (e) {
|
||||
this.video = e
|
||||
this.right.show = false
|
||||
this.right.type = ''
|
||||
},
|
||||
removeItem (e) {
|
||||
history.remove(e.id).then(res => {
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
<div class="mini">
|
||||
<div class="top">
|
||||
<div class="left">
|
||||
<span class="number">{{index + 1}} / {{length}}</span>
|
||||
<span class="number" v-show="show.number">{{index + 1}} / {{length}}</span>
|
||||
<span class="zy-svg" @click="prevEvent" v-show="show.prev">
|
||||
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-labelledby="backIconTitle">
|
||||
<title id="backIconTitle">Backwards</title>
|
||||
<title id="backIconTitle">上一集</title>
|
||||
<path d="M14 14.74L21 19V5l-7 4.26V5L2 12l12 7v-4.26z"></path>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="zy-svg" @click="nextEvent" v-show="show.next">
|
||||
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-labelledby="forwardIconTitle">
|
||||
<title id="forwardIconTitle">Forward</title>
|
||||
<title id="forwardIconTitle">下一集</title>
|
||||
<path d="M10 14.74L3 19V5l7 4.26V5l12 7-12 7v-4.26z"></path>
|
||||
</svg>
|
||||
</span>
|
||||
@@ -20,8 +20,8 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<span class="min" @click="frameClickEvent('mini-min')"></span>
|
||||
<span class="close" @click="frameClickEvent('mini-close')"></span>
|
||||
<span class="min" @click="frameClickEvent('miniMin')"></span>
|
||||
<span class="close" @click="frameClickEvent('miniClose')"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
@@ -58,8 +58,9 @@ export default {
|
||||
video: {},
|
||||
d: {},
|
||||
show: {
|
||||
prev: true,
|
||||
next: true
|
||||
prev: false,
|
||||
next: false,
|
||||
number: false
|
||||
},
|
||||
index: 0,
|
||||
length: 0
|
||||
@@ -75,8 +76,9 @@ export default {
|
||||
getUrls () {
|
||||
mini.find().then(res => {
|
||||
const v = res
|
||||
if (v.index <= 0) {
|
||||
this.show.prev = false
|
||||
if (v.index > 0) {
|
||||
this.show.next = true
|
||||
this.show.number = true
|
||||
}
|
||||
this.video = res
|
||||
tools.detail_get(v.site, v.detail).then(res => {
|
||||
@@ -200,6 +202,7 @@ html,body{
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
.number{
|
||||
color: #fff;
|
||||
@@ -210,6 +213,7 @@ html,body{
|
||||
-webkit-app-region: no-drag;
|
||||
margin-left: 10px;
|
||||
input{
|
||||
text-indent: 4px;
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
border: 1px solid #aaa;
|
||||
@@ -218,7 +222,10 @@ html,body{
|
||||
}
|
||||
.right{
|
||||
width: 80px;
|
||||
text-align: right;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
span{
|
||||
-webkit-app-region: no-drag;
|
||||
display: inline-block;
|
||||
|
||||
Reference in New Issue
Block a user