Compare commits

...

20 Commits

Author SHA1 Message Date
hunlongyu
f8c351aa1e v0.8.0 正式版 2020-01-21 11:12:54 +08:00
hunlongyu
65fc90819a http 2020-01-21 11:11:19 +08:00
hunlongyu
cf634b55d7 Create CNAME 2020-01-21 11:10:02 +08:00
hunlongyu
b6acaf83e0 add docs 2020-01-21 10:52:22 +08:00
hunlongyu
f21d0a6963 v0.7.23tste 2020-01-20 18:25:47 +08:00
hunlongyu
367bd0ebd7 测试 2020-01-20 18:08:44 +08:00
hunlongyu
8f89c3db4d v0.7.22 优化更新 2020-01-20 17:40:19 +08:00
hunlongyu
c8881bec3b v0.7.21 优化loading 暗黑样式 ,新增版本检测 2020-01-20 17:00:43 +08:00
hunlongyu
888e2e838a add logo 2020-01-20 16:17:44 +08:00
hunlongyu
7540cee532 测试 更新 2020-01-20 16:12:10 +08:00
hunlongyu
98a682ab82 修复 抽屉的 暗黑样式 2020-01-20 15:46:07 +08:00
hunlongyu
4a6069c60f test 2020-01-20 15:41:59 +08:00
hunlongyu
cd91bffa05 add readme dark 2020-01-20 15:40:32 +08:00
hunlongyu
d3083a6eb6 v0.7.19 优化完成暗黑主题 2020-01-20 15:37:35 +08:00
hunlongyu
6ba19f6f6b v0.7.18 完成换肤功能, 但是待优化 2020-01-20 10:54:41 +08:00
Hunlongyu
66a91a746f electron update 7.1.9 2020-01-19 22:04:27 +08:00
Hunlongyu
b8cd7cc30c v0.7.17 修复高dpi 显示器 的显示错位问题 2020-01-19 21:27:23 +08:00
Hunlongyu
02c5cc0f1d Merge pull request #1 from Hunlongyu/add-license-1
Create LICENSE
2020-01-19 17:58:57 +08:00
Hunlongyu
dba13326cd Create LICENSE 2020-01-19 17:58:40 +08:00
hunlongyu
14eed868c1 v0.7.16 测试自动更新 2020-01-19 17:45:08 +08:00
41 changed files with 504 additions and 65 deletions

2
.env
View File

@@ -1 +1 @@
tk8b3600eb86beceafc3580faeff9242168aafc7b2
GH_TOKEN=e6b3c80d135bb3367fcf4628d424f2514224296d

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 Hunlongyu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,4 +1,7 @@
<p align="center">
<img src="https://i.loli.net/2020/01/20/WEj3Yw8rPXqTcHe.png" >
</p>
<p align="center">
<img src="https://forthebadge.com/images/badges/built-with-love.svg">
<img src="https://forthebadge.com/images/badges/made-with-vue.svg">
<p>
@@ -10,11 +13,13 @@
# ZY Player
资源播放器, 提供影视资源的搜索,查看,播放,搜藏等功能.
资源播放器, 提供影视资源的浏览,搜索,播放,收藏,查看详情等功能.
### 截图:
主界面 ⬇
![film.png](https://i.loli.net/2020/01/19/U1EPzoJHhTDnuxA.png)
暗黑主题 ⬇
![dark.png](https://i.loli.net/2020/01/20/eU6J3EFcPTXnjlK.png)
搜索 ⬇
![search.png](https://i.loli.net/2020/01/19/BPvJKxlnNfquRI4.png)
搜索结果 ⬇
@@ -23,7 +28,7 @@
![detail.png](https://i.loli.net/2020/01/19/CN8E1ikyMbhzo9t.png)
播放 ⬇
![play.png](https://i.loli.net/2020/01/19/4XlJRqmx2y8zAec.png)
藏 ⬇
藏 ⬇
![star.png](https://i.loli.net/2020/01/19/Q2fkWUvaXKZJcS4.png)
### 下载:
@@ -31,8 +36,8 @@
[下载地址](https://github.com/Hunlongyu/ZY-Player/releases)
### 未完成:
1. 主题: 暗黑主题
2. 更新: 自动更新以及手动更新
1. 更新: 手动检测更新
2. 图标: 求一个 zy 的logo, 256x256 像素的
### 重要:
所有资源来自网上, 该软件不参与任何制作, 上传, 储存, 下载等内容. 该软件仅供学习参考, 请于安装后24小时内删除.

1
docs/CNAME Normal file
View File

@@ -0,0 +1 @@
zy_player.hunlongyu.fun

3
docs/dist/css/style.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 23 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 23 KiB

1
docs/dist/images/feature-01-dark.svg vendored Normal file
View File

@@ -0,0 +1 @@
<svg width="48" height="48" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path fill-opacity=".32" fill="#535FD7" d="M0 0h24v48H0z"/><path fill-opacity=".16" fill="#2FEAFC" d="M28 0h20v20H28z"/><path d="M14 9v4h20V9a1 1 0 0 0-1-1H15a1 1 0 0 0-1 1z" fill="#7C85E1"/><path d="M39 15H9a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h3V23h24v10h3a1 1 0 0 0 1-1V16a1 1 0 0 0-1-1zM20 40v-6h-6z" fill="#61EFFD"/><path d="M14 25v7h7a1 1 0 0 1 1 1v7h11a1 1 0 0 0 1-1V25H14z" fill="#7C85E1"/></g></svg>

After

Width:  |  Height:  |  Size: 500 B

1
docs/dist/images/feature-01-light.svg vendored Normal file
View File

@@ -0,0 +1 @@
<svg width="48" height="48" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path fill-opacity=".64" fill="#93F4FE" d="M0 0h24v48H0z"/><path fill-opacity=".64" fill="#FFCF7B" d="M28 0h20v20H28z"/><path d="M14 9v4h20V9a1 1 0 0 0-1-1H15a1 1 0 0 0-1 1z" fill="#7C85E1"/><path d="M39 15H9a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h3V23h24v10h3a1 1 0 0 0 1-1V16a1 1 0 0 0-1-1zM20 40v-6h-6z" fill="#535FD7"/><path d="M14 25v7h7a1 1 0 0 1 1 1v7h11a1 1 0 0 0 1-1V25H14z" fill="#7C85E1"/></g></svg>

After

Width:  |  Height:  |  Size: 500 B

1
docs/dist/images/feature-02-dark.svg vendored Normal file
View File

@@ -0,0 +1 @@
<svg width="48" height="48" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path fill-opacity=".32" fill="#535FD7" d="M0 0h24v48H0z"/><path fill-opacity=".16" fill="#2FEAFC" d="M28 0h20v20H28z"/><path d="M40 19v-5a2 2 0 0 0-2-2H10a2 2 0 0 0-2 2v5h32z" fill="#61EFFD"/><path d="M8 23v11a2 2 0 0 0 2 2h28a2 2 0 0 0 2-2V23H8zm13 8h-9v-2h9v2zm15 0h-4v-2h4v2z" fill="#7C85E1"/></g></svg>

After

Width:  |  Height:  |  Size: 405 B

1
docs/dist/images/feature-02-light.svg vendored Normal file
View File

@@ -0,0 +1 @@
<svg width="48" height="48" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill-opacity=".64"><path fill="#93F4FE" d="M0 0h24v48H0z"/><path fill="#FFCF7B" d="M28 0h20v20H28z"/></g><path d="M40 19v-5a2 2 0 0 0-2-2H10a2 2 0 0 0-2 2v5h32z" fill="#535FD7"/><path d="M8 23v11a2 2 0 0 0 2 2h28a2 2 0 0 0 2-2V23H8zm13 8h-9v-2h9v2zm15 0h-4v-2h4v2z" fill="#7C85E1"/></g></svg>

After

Width:  |  Height:  |  Size: 393 B

1
docs/dist/images/feature-03-dark.svg vendored Normal file
View File

@@ -0,0 +1 @@
<svg width="48" height="48" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path fill-opacity=".16" fill="#2FEAFC" d="M28 0h20v20H28z"/><path fill-opacity=".32" fill="#535FD7" d="M0 0h24v48H0z"/><path d="M18 9.256l-9.287 2.786A1.001 1.001 0 0 0 8 13v26l10-3.656V9.256z" fill="#61EFFD"/><path fill="#7C85E1" d="M28 12.523l-8-3.2v26.154l8 3.2z"/><path d="M40 9l-10 3.656v26.088l9.287-2.786c.423-.127.713-.517.713-.958V9z" fill="#61EFFD"/></g></svg>

After

Width:  |  Height:  |  Size: 469 B

1
docs/dist/images/feature-03-light.svg vendored Normal file
View File

@@ -0,0 +1 @@
<svg width="48" height="48" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path fill-opacity=".64" fill="#FFCF7B" d="M28 0h20v20H28z"/><path fill-opacity=".64" fill="#93F4FE" d="M0 0h24v48H0z"/><path d="M18 9.256l-9.287 2.786A1.001 1.001 0 0 0 8 13v26l10-3.656V9.256z" fill="#535FD7"/><path fill="#7C85E1" d="M28 12.523l-8-3.2v26.154l8 3.2z"/><path d="M40 9l-10 3.656v26.088l9.287-2.786c.423-.127.713-.517.713-.958V9z" fill="#535FD7"/></g></svg>

After

Width:  |  Height:  |  Size: 469 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.5 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 21 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 21 KiB

1
docs/dist/images/logo-dark.svg vendored Normal file
View File

@@ -0,0 +1 @@
<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient x1="20.313%" y1="83.13%" x2="79.211%" y2="18.665%" id="a"><stop stop-color="#93F4FE" offset="0%"/><stop stop-color="#535FD7" offset="100%"/></linearGradient><linearGradient x1="50%" y1="0%" x2="77.135%" y2="77.109%" id="b"><stop stop-color="#FFF" stop-opacity=".48" offset="0%"/><stop stop-color="#FFF" stop-opacity="0" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M16 0C7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16C31.99 7.168 24.832.01 16 0z" fill="url(#a)"/><path d="M29.012 25.313A11.98 11.98 0 0 1 25 26c-6.627 0-12-5.373-12-12 0-6.235 4.756-11.36 10.838-11.944C28.705 4.8 31.993 10.016 32 16c0 3.474-1.107 6.69-2.988 9.313z" fill="url(#b)"/></g></svg>

After

Width:  |  Height:  |  Size: 786 B

1
docs/dist/images/logo-light.svg vendored Normal file
View File

@@ -0,0 +1 @@
<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient x1="50%" y1="0%" x2="77.135%" y2="77.109%" id="a"><stop stop-color="#FE7E1F" offset="0%"/><stop stop-color="#FFCF7B" offset="100%"/></linearGradient><linearGradient x1="50%" y1="0%" x2="77.135%" y2="77.109%" id="b"><stop stop-color="#FFF" stop-opacity=".48" offset="0%"/><stop stop-color="#FFF" stop-opacity="0" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M16 0C7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16C31.99 7.168 24.832.01 16 0z" fill="url(#a)"/><path d="M29.012 25.313A11.98 11.98 0 0 1 25 26c-6.627 0-12-5.373-12-12 0-6.235 4.756-11.36 10.838-11.944C28.705 4.8 31.993 10.016 32 16c0 3.474-1.107 6.69-2.988 9.313z" fill="url(#b)"/></g></svg>

After

Width:  |  Height:  |  Size: 778 B

1
docs/dist/js/main.min.js vendored Normal file
View File

@@ -0,0 +1 @@
!function(){const e=document,t=e.documentElement,n=e.body,i=e.getElementById("lights-toggle"),s=window.sr=ScrollReveal();function a(){let e=i.parentNode.querySelector(".label-text");i.checked?(n.classList.remove("lights-off"),e&&(e.innerHTML="dark")):(n.classList.add("lights-off"),e&&(e.innerHTML="light"))}t.classList.remove("no-js"),t.classList.add("js"),window.addEventListener("load",function(){n.classList.add("is-loaded")}),n.classList.contains("has-animations")&&window.addEventListener("load",function(){s.reveal(".feature",{duration:600,distance:"20px",easing:"cubic-bezier(0.215, 0.61, 0.355, 1)",origin:"right",viewFactor:.2})}),i&&(window.addEventListener("load",a),i.addEventListener("change",a))}();

149
docs/index.html Normal file
View File

@@ -0,0 +1,149 @@
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ZY Player</title>
<link href="https://fonts.googleapis.com/css?family=Heebo:400,700|IBM+Plex+Sans:600" rel="stylesheet">
<link rel="stylesheet" href="dist/css/style.css">
<script src="https://unpkg.com/scrollreveal@4.0.0/dist/scrollreveal.min.js"></script>
</head>
<body class="is-boxed has-animations">
<div class="body-wrap boxed-container">
<header class="site-header">
<div class="container">
<div class="site-header-inner">
<div class="brand header-brand">
<h1 class="m-0">
<a href="#">
<img class="header-logo-image asset-light" src="dist/images/logo-light.svg" alt="Logo">
<img class="header-logo-image asset-dark" src="dist/images/logo-dark.svg" alt="Logo">
</a>
</h1>
</div>
</div>
</div>
</header>
<main>
<section class="hero">
<div class="container">
<div class="hero-inner">
<div class="hero-copy">
<h1 class="hero-title mt-0">ZY Player</h1>
<p class="hero-paragraph">ZY Player 影视资源播放器, 可以直接浏览或者搜索影视资源,所有资源点击即可播放.软件免费,没有广告~</p>
<div class="hero-cta">
<a class="button button-primary" href="https://github.com/Hunlongyu/ZY-Player/releases/latest">立即下载</a>
<div class="lights-toggle">
<input id="lights-toggle" type="checkbox" name="lights-toggle" class="switch" checked="checked">
<label for="lights-toggle" class="text-xs"><span>切换主题<span class="label-text">dark</span></span></label>
</div>
</div>
</div>
<div class="hero-media">
<div class="header-illustration">
<img class="header-illustration-image asset-light" src="dist/images/header-illustration-light.svg" alt="Header illustration">
<img class="header-illustration-image asset-dark" src="dist/images/header-illustration-dark.svg" alt="Header illustration">
</div>
<div class="hero-media-illustration">
<img class="hero-media-illustration-image asset-light" src="dist/images/hero-media-illustration-light.svg" alt="Hero media illustration">
<img class="hero-media-illustration-image asset-dark" src="dist/images/hero-media-illustration-dark.svg" alt="Hero media illustration">
</div>
<div class="hero-media-container">
<img class="hero-media-image asset-light" src="https://i.loli.net/2020/01/21/HfRhqXDTJMlEIaP.jpg" alt="Hero media">
<img class="hero-media-image asset-dark" src="https://i.loli.net/2020/01/21/hGYrDKQbXZctfVs.jpg" alt="Hero media">
</div>
</div>
</div>
</div>
</section>
<section class="features section">
<div class="container">
<div class="features-inner section-inner has-bottom-divider">
<div class="features-header text-center">
<div class="container-sm">
<div class="features-image">
<img class="features-illustration asset-dark" src="dist/images/features-illustration-dark.svg" alt="Feature illustration">
<img style="transform: none;" class="features-box asset-dark" src="https://i.loli.net/2020/01/21/exXt3mfsJSGuhn5.jpg" alt="Feature box">
<img class="features-illustration asset-dark" src="dist/images/features-illustration-top-dark.svg" alt="Feature illustration top">
<img class="features-illustration asset-light" src="dist/images/features-illustration-light.svg" alt="Feature illustration">
<img style="transform: none;" class="features-box asset-light" src="https://i.loli.net/2020/01/21/exXt3mfsJSGuhn5.jpg" alt="Feature box">
<img class="features-illustration asset-light" src="dist/images/features-illustration-top-light.svg" alt="Feature illustration top">
</div>
</div>
</div>
<div class="features-wrap">
<div class="feature is-revealing">
<div class="feature-inner">
<div class="feature-icon">
<img class="asset-light" src="dist/images/feature-01-light.svg" alt="Feature 01">
<img class="asset-dark" src="dist/images/feature-01-dark.svg" alt="Feature 01">
</div>
<div class="feature-content">
<h3 class="feature-title mt-0">开源免费</h3>
<p class="text-sm mb-0">代码开源, 软件免费使用, 无广告, 不窃取用户信息, MIT协议.</p>
</div>
</div>
</div>
<div class="feature is-revealing">
<div class="feature-inner">
<div class="feature-icon">
<img class="asset-light" src="dist/images/feature-02-light.svg" alt="Feature 02">
<img class="asset-dark" src="dist/images/feature-02-dark.svg" alt="Feature 02">
</div>
<div class="feature-content">
<h3 class="feature-title mt-0">资源丰富</h3>
<p class="text-sm mb-0">所有资源都来自多个著名资源网站, 海量资源, 应有尽有.</p>
</div>
</div>
</div>
<div class="feature is-revealing">
<div class="feature-inner">
<div class="feature-icon">
<img class="asset-light" src="dist/images/feature-03-light.svg" alt="Feature 03">
<img class="asset-dark" src="dist/images/feature-03-dark.svg" alt="Feature 03">
</div>
<div class="feature-content">
<h3 class="feature-title mt-0">功能强大</h3>
<p class="text-sm mb-0">支持多源切换, 搜索. 支持预览详情, 支持收藏, 支持暗黑主题.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
<!-- <footer class="site-footer has-top-divider">
<div class="container">
<div class="site-footer-inner">
<div class="brand footer-brand">
<a href="#">
<img class="asset-light" src="dist/images/logo-light.svg" alt="Logo">
<img class="asset-dark" src="dist/images/logo-dark.svg" alt="Logo">
</a>
</div>
<ul class="footer-links list-reset">
<li>
<a href="#">Contact</a>
</li>
<li>
<a href="#">About us</a>
</li>
<li>
<a href="#">FAQ's</a>
</li>
<li>
<a href="#">Support</a>
</li>
</ul>
</div>
</div>
</footer> -->
</div>
<script src="dist/js/main.min.js"></script>
</body>
</html>

View File

@@ -1,6 +1,8 @@
{
"name": "zy",
"version": "0.7.13",
"version": "0.8.0",
"author": "Hunlongyu",
"description": "ZY Player 资源播放器",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
@@ -11,7 +13,7 @@
"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",
"publish": "electron:build --win -p always"
"bp": "vue-cli-service electron:build --win -p always"
},
"main": "background.js",
"dependencies": {
@@ -37,7 +39,7 @@
"@vue/eslint-config-standard": "^4.0.0",
"@vue/eslint-config-typescript": "^4.0.0",
"babel-plugin-component": "^1.1.1",
"electron": "^7.1.8",
"electron": "^7.1.9",
"electron-icon-builder": "^1.0.2",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",

View File

@@ -1,5 +1,5 @@
<template>
<el-container id="app" class="theme-light">
<el-container id="app" :class="appTheme">
<el-header class="Header">
<i class="el-icon-minus" @click="clickFrameEvent('min')"></i>
<i class="el-icon-plus" @click="clickFrameEvent('max')"></i>
@@ -40,7 +40,9 @@ import { mapMutations } from 'vuex'
const { ipcRenderer: ipc } = require('electron')
export default Vue.extend({
data () {
return {}
return {
appTheme: 'theme-light'
}
},
computed: {
Main: {
@@ -58,6 +60,14 @@ export default Vue.extend({
set (val) {
this.SET_DETAIL(val)
}
},
theme () {
return this.$store.getters.getTheme
}
},
watch: {
theme () {
this.changeTheme()
}
},
components: {
@@ -70,12 +80,15 @@ export default Vue.extend({
},
asideMenuClick (e:string) {
this.Main = e
},
changeTheme () {
this.appTheme = `theme-${this.theme}`
}
},
created () {}
}
})
</script>
<style lang="scss">
@import './assets/theme/global.scss';
@import './assets/theme/dark.scss';
@import './assets/theme/light.scss';
*{

BIN
src/assets/image/dark.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 78 KiB

View File

@@ -1,7 +1,51 @@
@import './global.scss';
.theme-dark{
color: var(--d-c);
color: var(--d-c);
background-color: var(--d-bgc);
.el-button, input, select, .el-select{
color: var(--d-c);
background-color: var(--d-bgc);
border-color: var(--d-bdc);
}
.el-button--text{
border: none;
}
.el-tabs__item, .el-tabs__nav-wrap::after{
color: var(--d-c);
background-color: var(--d-bgc);
border-color: var(--d-dbc);
}
.el-table, .el-table th, .el-table tr,
.el-table--striped .el-table__body tr.el-table__row--striped td,
.el-table--enable-row-hover .el-table__body tr:hover>td,
.el-table td, .el-table th.is-leaf{
color: var(--d-c);
background-color: var(--d-bgc);
border-color: var(--d-dbc);
}
.el-pagination, .el-pagination .el-pagination__total, .el-pagination .el-pagination__jump,
.el-pagination .btn-next, .el-pagination .btn-prev, .el-pager li{
color: var(--d-c);
background-color: var(--d-bgc);
}
.el-input__inner,
.el-input-group__append, .el-input-group__prepend{
background-color: var(--d-bgc);
border-color: var(--d-dbc);
}
.el-select-dropdown{
color: var(--d-c);
}
.el-drawer{
background-color: var(--d-bgc) !important;
overflow: auto;
&::-webkit-scrollbar{
width: 0px;
}
}
.el-loading-mask{
background-color: var(--d-bgc);
opacity: 0.9;
}
.Header, .Aside{
i{
color: var(--d-icon);
@@ -20,4 +64,45 @@
}
}
}
.Main{
.film, .search, .star, .player{
.table-box{
&::-webkit-scrollbar-track {
box-shadow: inset 0 0 6px var(--d-bdc);
}
&::-webkit-scrollbar-thumb {
background-color: var(--d-icon);
outline: 1px solid var(--d-icon);
}
}
}
.setting{
.el-link, .card{
color: var(--d-c);
background-color: var(--d-bgc);
border-color: var(--d-bdc);
}
}
}
.detail{
color: var(--d-c);
&::-webkit-scrollbar-track {
box-shadow: inset 0 0 6px var(--d-bdc);
}
&::-webkit-scrollbar-thumb {
background-color: var(--d-icon);
outline: 1px solid var(--d-icon);
}
.box, .info, .urls{
border: 1px solid var(--d-bdc);
}
.vodInfo{
li, span, a{
color: var(--d-c);
}
label{
color: #f90;
}
}
}
}

View File

@@ -15,5 +15,5 @@
--d-icon-h: #919191;
--d-bgc: #242424;
--d-bgc-h: #454545;
--d-bdc: #dcdee2;
--d-bdc: #7a7a7a;
}

View File

@@ -1,4 +1,3 @@
@import './global.scss';
.theme-light{
color: var(--l-c);
background-color: var(--l-bgc);

View File

@@ -10,11 +10,11 @@
<el-table-column prop="name" label="影片名称"></el-table-column>
<el-table-column prop="type" label="影片类别" width="120"></el-table-column>
<el-table-column prop="time" label="更新时间" width="180"></el-table-column>
<el-table-column label="操作" width="130">
<el-table-column label="操作" width="120">
<template slot-scope="scope">
<el-button type="text" @click="tableBtnClick('detail', scope.row)">详情</el-button>
<el-button type="text" @click="tableBtnClick('star', scope.row)">收藏</el-button>
<el-button type="text" @click="tableBtnClick('play', scope.row)">播放</el-button>
<el-button size="small" type="text" @click="tableBtnClick('detail', scope.row)">详情</el-button>
<el-button size="small" type="text" @click="tableBtnClick('star', scope.row)">收藏</el-button>
<el-button size="small" type="text" @click="tableBtnClick('play', scope.row)">播放</el-button>
</template>
</el-table-column>
</el-table>
@@ -32,6 +32,7 @@
small
layout="total, prev, pager, next, jumper"
:current-page="filmPage"
@current-change="pageChange"
:page-size="50"
:total="filmTotal">
</el-pagination>
@@ -84,6 +85,7 @@ export default Vue.extend({
methods: {
...mapMutations(['SET_SITE', 'SET_DETAIL', 'SET_MAIN', 'SET_VIDEO']),
tabClick (tab:any) {
this.filmPage = 1
this.getFilmList(this.site, this.filmPage, tab.name)
},
selectSite (e:any) {
@@ -92,6 +94,10 @@ export default Vue.extend({
this.filmPage = 1
this.getFilmList(e, 1, '0')
},
pageChange (e:number) {
this.filmPage = e
this.getFilmList(this.site, this.filmPage, this.tabs)
},
getFilmList (n: number = 0, p: number = 1, type: string = '0') {
this.loading = true
this.filmData = []

View File

@@ -13,11 +13,11 @@
<el-table-column prop="name" label="影片名称"></el-table-column>
<el-table-column prop="type" label="影片类别" width="120"></el-table-column>
<el-table-column prop="time" label="更新时间" width="180"></el-table-column>
<el-table-column label="操作" width="130">
<el-table-column label="操作" width="120">
<template slot-scope="scope">
<el-button type="text" @click="tableBtnClick('detail', scope.row)">详情</el-button>
<el-button type="text" @click="tableBtnClick('star', scope.row)">收藏</el-button>
<el-button type="text" @click="tableBtnClick('play', scope.row)">播放</el-button>
<el-button size="small" type="text" @click="tableBtnClick('detail', scope.row)">详情</el-button>
<el-button size="small" type="text" @click="tableBtnClick('star', scope.row)">收藏</el-button>
<el-button size="small" type="text" @click="tableBtnClick('play', scope.row)">播放</el-button>
</template>
</el-table-column>
</el-table>

View File

@@ -1,48 +1,146 @@
<template>
<el-row class="setting">
<el-row class="item about">
<el-row class="title"><i class="el-icon-view"></i><span>关于</span></el-row>
<el-row class="item site">
<el-row class="title"><i class="el-icon-set-up"></i><span>默认资源</span></el-row>
<el-row class="info">
<ul>
<li><el-link :underline="false" @click="linkOpen('https://zy_player.hunlongyu.fun')">官网: ZY Player</el-link></li>
<li><el-link :underline="false" @click="linkOpen('https://github.com/Hunlongyu/ZY-Player/issues')">反馈: Issues</el-link></li>
</ul>
<el-select v-model="dbSite" placeholder="请选择" size="small" @change="selectSite">
<el-option
v-for="(i, j) in sites"
:key="i.id"
:label="i.name"
:value="j">
</el-option>
</el-select>
</el-row>
</el-row>
<el-row class="item theme">
<el-row class="title"><i class="el-icon-picture-outline-round"></i><span>主题 (即将来到...)</span></el-row>
<el-row class="title"><i class="el-icon-picture-outline-round"></i><span>主题</span></el-row>
<el-row class="card-box">
<el-card shadow="hover" class="card">
<img src="@/assets/image/light.png" class="image">
<img src="@/assets/image/light.png" class="image" @click="selectTheme('light')">
<span size="mini">Light</span>
</el-card>
<el-card shadow="hover" class="card">
<img src="@/assets/image/light.png" class="image">
<img src="@/assets/image/dark.png" class="image" @click="selectTheme('dark')">
<span size="mini">Dark</span>
</el-card>
</el-row>
</el-row>
<!-- <el-row class="item update">
<el-row class="item update about">
<el-row class="title"><i class="el-icon-refresh"></i><span>更新</span></el-row>
<el-row class="btns">
<el-button size="small">检查更新</el-button>
<el-row class="info">
<ul>
<li>当前版本: {{oldVersion}}</li>
<li>最新版本: {{newVersion}}</li>
</ul>
</el-row>
</el-row> -->
<el-row class="btns">
<el-button v-show="download" size="small" @click="linkOpen('https://github.com/Hunlongyu/ZY-Player/releases/latest')">下载更新</el-button>
</el-row>
</el-row>
<el-row class="item about">
<el-row class="title"><i class="el-icon-view"></i><span>关于</span></el-row>
<el-row class="info">
<ul>
<li><el-link :underline="false" @click="linkOpen('http://zy_player.hunlongyu.fun')">官网: ZY Player</el-link></li>
<li><el-link :underline="false" @click="linkOpen('https://github.com/Hunlongyu/ZY-Player/issues')">反馈: Issues</el-link></li>
</ul>
</el-row>
</el-row>
</el-row>
</template>
<script lang="ts">
import Vue from 'vue'
import sites from '@/lib/sites'
import { mapMutations } from 'vuex'
import { shell } from 'electron'
import setting from '@/plugins/dexie/setting'
import site from '@/plugins/dexie/site'
import theme from '@/plugins/dexie/theme'
import fly from 'flyio'
export default Vue.extend({
name: 'setting',
data () {
return {
sites: sites,
dbSite: 0,
oldVersion: 'v0.8.0',
newVersion: '',
download: false
}
},
computed: {
site: {
get () {
return this.$store.getters.getSite
},
set (val) {
this.SET_SITE(val)
}
},
theme: {
get () {
return this.$store.getters.getTheme
},
set (val) {
this.SET_THEME(val)
}
}
},
methods: {
...mapMutations(['SET_SITE', 'SET_THEME']),
linkOpen (e:string) {
if (e) {
shell.openExternal(e)
}
},
initSetting () {
site.find().then(res => {
if (!res) {
site.add({ site: 0 })
} else {
this.dbSite = res.site
this.site = res.site
}
})
theme.find().then(res => {
if (!res) {
theme.add({ theme: 'light' })
} else {
this.theme = res.theme
}
})
},
selectSite () {
site.update({ site: this.dbSite }).then(res => {
this.site = this.dbSite
this.$message.success('设置默认资源成功~')
}).catch(() => {
this.$message.warning('设置默认资源失败~')
})
},
selectTheme (e: string) {
theme.update({ theme: e }).then(res => {
this.theme = e
this.$message.success('切换主题成功~')
}).catch(() => {
this.$message.warning('切换主题失败~')
})
},
checkUpdate () {
fly.get('https://api.github.com/repos/Hunlongyu/ZY-Player/releases/latest').then(res => {
this.newVersion = res.data.tag_name
if (res.data.tag_name !== this.oldVersion) {
this.download = true
} else {
this.download = false
}
})
}
},
created () {}
created () {
this.initSetting()
this.checkUpdate()
}
})
</script>
<style lang="scss" scoped>
@@ -77,8 +175,8 @@ export default Vue.extend({
width: 160px;
margin-right: 20px;
text-align: center;
cursor: pointer;
img{
cursor: pointer;
width: 100%;
}
span{

View File

@@ -5,11 +5,11 @@
<el-table-column prop="name" label="影片名称"></el-table-column>
<el-table-column prop="type" label="影片类别" width="120"></el-table-column>
<el-table-column prop="time" label="更新时间" width="180"></el-table-column>
<el-table-column label="操作" width="130">
<el-table-column label="操作" width="120">
<template slot-scope="scope">
<el-button type="text" @click="tableBtnClick('detail', scope.row)">详情</el-button>
<el-button type="text" @click="tableBtnClick('delete', scope.row)">删除</el-button>
<el-button type="text" @click="tableBtnClick('play', scope.row)">播放</el-button>
<el-button size="small" type="text" @click="tableBtnClick('detail', scope.row)">详情</el-button>
<el-button size="small" type="text" @click="tableBtnClick('delete', scope.row)">删除</el-button>
<el-button size="small" type="text" @click="tableBtnClick('play', scope.row)">播放</el-button>
</template>
</el-table-column>
</el-table>

View File

@@ -1,25 +1,32 @@
import Dexie from 'dexie'
class ZYDB extends Dexie {
setting: Dexie.Table<setting, number>
theme: Dexie.Table<theme, number>
site: Dexie.Table<site, number>
video: Dexie.Table<video, number>
constructor () {
super('ZYDB')
this.version(1).stores({
setting: '++id, theme, site',
theme: '++id, theme',
site: '++id, site',
video: '++id, name, type, time, detail, urls, index'
})
this.setting = this.table('setting')
this.theme = this.table('theme')
this.site = this.table('site')
this.video = this.table('video')
}
}
export interface setting {
id?: number
export interface theme {
id: number
theme?: string
site?: object
}
export interface site {
id: number
site?: number
}
export interface video {

View File

@@ -3,25 +3,25 @@ import db from './index'
export default {
add (data: any): Promise<any> {
return new Promise((resolve, reject) => {
db.setting.add(data).then(res => {
db.site.add(data).then(res => {
resolve(res)
}).catch(err => {
reject(err)
})
})
},
find (data?: any): Promise<any> {
find (): Promise<any> {
return new Promise((resolve, reject) => {
db.setting.get(data).then(res => {
db.site.get(1).then((res: any) => {
resolve(res)
}).catch(err => {
reject(err)
})
})
},
update (id: number, data: any): Promise<any> {
update (data: any): Promise<any> {
return new Promise((resolve, reject) => {
db.setting.update(id, data).then(updated => {
db.site.update(1, data).then(updated => {
if (updated) {
resolve(updated)
} else {
@@ -29,14 +29,5 @@ export default {
}
})
})
},
count (): Promise<any> {
return new Promise((resolve, reject) => {
db.setting.count().then(res => {
resolve(res)
}).catch(err => {
reject(err)
})
})
}
}

View File

@@ -0,0 +1,33 @@
import db from './index'
export default {
add (data: any): Promise<any> {
return new Promise((resolve, reject) => {
db.theme.add(data).then(res => {
resolve(res)
}).catch(err => {
reject(err)
})
})
},
find (): Promise<any> {
return new Promise((resolve, reject) => {
db.theme.get(1).then((res: any) => {
resolve(res)
}).catch(err => {
reject(err)
})
})
},
update (data: any): Promise<any> {
return new Promise((resolve, reject) => {
db.theme.update(1, data).then(updated => {
if (updated) {
resolve(updated)
} else {
reject(updated)
}
})
})
}
}

View File

@@ -10,7 +10,7 @@ export default {
})
})
},
find (data?: any): Promise<any> {
find (data: any): Promise<any> {
return new Promise((resolve, reject) => {
db.video.get(data).then(res => {
resolve(res)

View File

@@ -7,6 +7,7 @@ export default new Vuex.Store({
state: {
Main: 'Search',
site: 0,
theme: 'light',
detail: {
show: false,
video: ''
@@ -21,6 +22,9 @@ export default new Vuex.Store({
getSite: state => {
return state.site
},
getTheme: state => {
return state.theme
},
getDetail: state => {
return state.detail
},
@@ -35,6 +39,9 @@ export default new Vuex.Store({
SET_SITE: (state, payload) => {
state.site = payload
},
SET_THEME: (state, payload) => {
state.theme = payload
},
SET_DETAIL: (state, payload) => {
state.detail = payload
},