Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8c351aa1e | ||
|
|
65fc90819a | ||
|
|
cf634b55d7 | ||
|
|
b6acaf83e0 | ||
|
|
f21d0a6963 | ||
|
|
367bd0ebd7 | ||
|
|
8f89c3db4d | ||
|
|
c8881bec3b | ||
|
|
888e2e838a | ||
|
|
7540cee532 | ||
|
|
98a682ab82 | ||
|
|
4a6069c60f | ||
|
|
cd91bffa05 | ||
|
|
d3083a6eb6 | ||
|
|
6ba19f6f6b | ||
|
|
66a91a746f | ||
|
|
b8cd7cc30c | ||
|
|
02c5cc0f1d | ||
|
|
dba13326cd | ||
|
|
14eed868c1 |
2
.env
@@ -1 +1 @@
|
||||
tk8b3600eb86beceafc3580faeff9242168aafc7b2
|
||||
GH_TOKEN=e6b3c80d135bb3367fcf4628d424f2514224296d
|
||||
21
LICENSE
Normal 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.
|
||||
13
README.md
@@ -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
|
||||
|
||||
资源播放器, 提供影视资源的搜索,查看,播放,搜藏等功能.
|
||||
资源播放器, 提供影视资源的浏览,搜索,播放,收藏,查看详情等功能.
|
||||
|
||||
### 截图:
|
||||
主界面 ⬇
|
||||

|
||||
暗黑主题 ⬇
|
||||

|
||||
搜索 ⬇
|
||||

|
||||
搜索结果 ⬇
|
||||
@@ -23,7 +28,7 @@
|
||||

|
||||
播放 ⬇
|
||||

|
||||
搜藏 ⬇
|
||||
收藏 ⬇
|
||||

|
||||
|
||||
### 下载:
|
||||
@@ -31,8 +36,8 @@
|
||||
[下载地址](https://github.com/Hunlongyu/ZY-Player/releases)
|
||||
|
||||
### 未完成:
|
||||
1. 主题: 暗黑主题
|
||||
2. 更新: 自动更新以及手动更新
|
||||
1. 更新: 手动检测更新
|
||||
2. 图标: 求一个 zy 的logo, 256x256 像素的
|
||||
|
||||
### 重要:
|
||||
所有资源来自网上, 该软件不参与任何制作, 上传, 储存, 下载等内容. 该软件仅供学习参考, 请于安装后24小时内删除.
|
||||
|
||||
1
docs/CNAME
Normal file
@@ -0,0 +1 @@
|
||||
zy_player.hunlongyu.fun
|
||||
3
docs/dist/css/style.css
vendored
Normal file
1
docs/dist/images/cta-illustration-dark.svg
vendored
Normal file
|
After Width: | Height: | Size: 23 KiB |
1
docs/dist/images/cta-illustration-light.svg
vendored
Normal file
|
After Width: | Height: | Size: 23 KiB |
1
docs/dist/images/feature-01-dark.svg
vendored
Normal 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 |
1
docs/dist/images/features-illustration-dark.svg
vendored
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
1
docs/dist/images/features-illustration-light.svg
vendored
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
1
docs/dist/images/features-illustration-top-dark.svg
vendored
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
1
docs/dist/images/features-illustration-top-light.svg
vendored
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
1
docs/dist/images/header-illustration-dark.svg
vendored
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
1
docs/dist/images/header-illustration-light.svg
vendored
Normal file
|
After Width: | Height: | Size: 10 KiB |
1
docs/dist/images/hero-media-illustration-dark.svg
vendored
Normal file
|
After Width: | Height: | Size: 21 KiB |
1
docs/dist/images/hero-media-illustration-light.svg
vendored
Normal file
|
After Width: | Height: | Size: 21 KiB |
1
docs/dist/images/logo-dark.svg
vendored
Normal 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
@@ -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
@@ -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
@@ -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>
|
||||
@@ -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",
|
||||
|
||||
21
src/App.vue
@@ -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
|
After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 78 KiB |
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,5 +15,5 @@
|
||||
--d-icon-h: #919191;
|
||||
--d-bgc: #242424;
|
||||
--d-bgc-h: #454545;
|
||||
--d-bdc: #dcdee2;
|
||||
--d-bdc: #7a7a7a;
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
@import './global.scss';
|
||||
.theme-light{
|
||||
color: var(--l-c);
|
||||
background-color: var(--l-bgc);
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
33
src/plugins/dexie/theme.ts
Normal 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)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||