🎏 增加暗黑皮肤,优化翻译

This commit is contained in:
hunlongyu
2020-04-22 01:00:54 +08:00
parent 75cc6dd3c1
commit 0776147a89
13 changed files with 377 additions and 49 deletions

View File

@@ -16,6 +16,24 @@
--l-bsc-2: 0 -4px 23px 0 #8e8da233;
--l-bsc-hover: 0 14px 26px -12px #8e8da26b, 0 4px 23px 0 #8e8da21f, 0 8px 10px -5px #8e8da233;
--l-bsc-scroll: inset 0 0 5px #823aa005;
// dark
--d-c-0: #38dd77;
--d-c-1: #38dd7711;
--d-c-2: #38dd7722;
--d-c-3: #38dd7733;
--d-c-5: #38dd7755;
--d-c-8: #38dd7788;
--d-c-9: #38dd7799;
--d-fc-1: #808695;
--d-fc-2: #808080;
--d-fc-3: #acacac;
--d-bgc-1: #222222;
--d-bgc-2: #2f2f2f;
--d-bsc: 0 3px 1px -2px #38dd7733, 0 2px 2px 0 #38dd7722, 0 1px 5px 0 #38dd7711;
--d-bsc-2: 0 -4px 23px 0 #38dd7733;
--d-bsc-hover: 0 14px 26px -12px #38dd7733, 0 4px 23px 0 #38dd7722, 0 8px 10px -5px #38dd7711;
--d-bsc-scroll: inset 0 0 5px #38dd7705;
}
@import './theme/light.scss';

View File

@@ -0,0 +1,328 @@
.theme-dark{
background-color: var(--d-bgc-1);
.el-pagination{
background-color: var(--d-bgc-1);
color: var(--d-fc-1);
.el-pagination__total, .el-pagination__jump, .el-input__inner{
color: var(--d-fc-1);
background-color: var(--d-bgc-1);
}
.el-input__inner{
border-color: var(--d-c-3);
}
.el-pager{
.number{
background-color: var(--d-bgc-1);
}
.number:hover{
color: var(--d-c-8);
}
.active{
color: var(--d-c-9);
}
}
.more, .btn-next, .btn-prev{
background-color: var(--d-bgc-1);
&:hover{
color: var(--d-c-8);
}
}
}
.zy-select{
color: var(--d-fc-1);
background-color: var(--d-bgc-1);
box-shadow: var(--d-bsc);
&:hover{
box-shadow: var(--d-bsc-hover);
}
.vs-options{
background-color: var(--d-bgc-1);
box-shadow: var(--d-bsc);
ul{
li{
&:hover{
background-color: var(--d-c-1);
}
&.active{
background-color: var(--d-c-3);
}
}
}
}
}
.zy-table{
color: var(--d-fc-2);
.tHead{
background-color: var(--d-bgc-1);
border-bottom-color: var(--d-c-3);
}
.tBody{
border-bottom-color: var(--d-c-3);
ul{
li{
border-bottom-color: var(--d-c-2);
&:hover{
animation: tableHoverAni 0.2s ease both;
@keyframes tableHoverAni {
to{
box-shadow: var(--d-bsc-hover);
}
}
}
span{
&.btn:hover{
color: var(--d-fc-3)
}
}
}
}
}
.tFooter{
.tFooter-span{
color: var(--d-fc-1);
}
}
}
.zy-scroll{
&:hover{
&::-webkit-scrollbar-thumb {
box-shadow: var(--d-bsc-scroll);
background: var(--d-c-3);
}
&::-webkit-scrollbar-track {
box-shadow: var(--d-bsc-scroll);
background: var(--bgc);
}
}
}
.zy-loading{
.loader{
color: var(--d-c-3);
}
}
.zy-body{
background-color: var(--d-bgc-2);
}
.aside{
.zy-svg{
svg{
stroke: var(--d-c-0);
}
&:hover{
background-color: var(--d-c-2);
}
&.active{
svg{
stroke: var(--d-c-0);
stroke-width: 2;
fill: var(--d-c-2);
}
}
}
}
.frame{
span{
&.min{
background-color: #ffbe2a;
}
&.close{
background-color: #ff5f56;
}
}
}
.detail{
color: var(--d-fc-1);
background-color:var(--d-bgc-1);
box-shadow: var(--d-bsc-2);
.detail-content{
.detail-close{
svg{
stroke-width: 1;
stroke: var(--d-c-8);
&:hover{
stroke-width: 2px;
stroke: var(--d-c-9);
}
}
}
.detail-body{
.info, .desc, .m3u8_urls, .mp4_urls{
border-color: var(--d-c-2);
}
.m3u8_urls, .mp4_urls{
.box{
span{
border-color: var(--d-c-5);
&:hover{
color: var(--d-fc-2);
background-color: var(--d-c-1);
border-color: var(--d-c-8);
}
}
}
}
}
}
}
.film{
.top{
.search{
background-color: var(--d-bgc-1);
box-shadow: var(--d-bsc);
&:hover{
box-shadow: var(--d-bsc-hover);
}
svg{
stroke: var(--d-c-0);
stroke-width: 1;
fill: none;
}
.search-box{
background-color: var(--d-bgc-1);
}
&.active{
box-shadow: var(--d-bsc-hover);
svg{
stroke-width: 1.5;
fill: var(--d-c-2);
}
}
input{
color: var(--d-fc-1);
}
}
}
.middle{
background-color: var(--d-bgc-1);
box-shadow: var(--d-bsc);
}
}
.play{
background-color: var(--d-bgc-1);
box-shadow: var(--d-bsc);
.title{
color: var(--d-fc-1);
}
.box{
.more{
span{
svg{
stroke: var(--d-c-5);
stroke-width: 1;
fill: none;
}
&:hover{
svg{
stroke: var(--d-c-8);
stroke-width: 1.5;
fill: var(--d-c-2);
}
}
&.active{
svg{
stroke: var(--d-c-9);
stroke-width: 2;
fill: var(--d-c-3);
}
}
}
}
}
.list{
border: 1px solid var(--d-c-3);
background-color: var(--d-bgc-2);
.list-top{
color: var(--d-fc-2);
.list-top-close{
svg{
stroke: var(--d-c-5);
stroke-width: 1;
fill: none;
&:hover{
stroke: var(--d-c-8);
stroke-width: 1.5;
fill: var(--d-c-2);
}
}
}
}
.list-body{
.list-item{
li{
color: var(--d-fc-1);
&.active{
background-color: var(--d-c-2);
color: var(--d-fc-3);
}
}
}
.list-history{
li{
.title{
color: var(--d-fc-1);
}
&.active{
background-color: var(--d-c-2);
.title{
color: var(--d-fc-3);
}
}
&:hover{
background-color: var(--d-c-3);
.detail-delete{
display: inline-block;
color: var(--d-fc-2);
}
}
.detail-delete{
&:hover{
background-color: var(--d-c-2);
}
}
}
}
}
}
}
.star{
background-color: var(--d-bgc-1);
box-shadow: var(--d-bsc);
}
.setting{
background-color: var(--d-bgc-1);
box-shadow: var(--d-bsc);
.info{
a{
color: var(--d-fc-1);
&:hover{
color: var(--d-fc-2);
}
}
}
.theme{
.title{
color: var(--d-fc-1);
}
.theme-item{
box-shadow: var(--d-bsc);
&:hover{
box-shadow: var(--d-bsc-hover);
.theme-name{
color: var(--d-fc-2)
}
}
.theme-name{
color: var(--d-fc-1);
}
}
}
.qrcode{
.title{
color: var(--d-fc-1);
}
.qrcode-item{
box-shadow: var(--d-bsc);
}
}
}
}

View File

@@ -191,6 +191,9 @@
.play{
background-color: var(--l-bgc-1);
box-shadow: var(--l-bsc);
.title{
color: var(--d-fc-1);
}
.box{
.more{
span{

View File

@@ -21,7 +21,7 @@ function createWindow () {
height: 720,
frame: false,
resizable: true,
transparent: false,
transparent: true,
webPreferences: {
webSecurity: false,
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION
@@ -89,22 +89,6 @@ ipcMain.on('min', () => {
ipcMain.on('close', () => {
win.close()
})
ipcMain.on('top', () => {
if (win) {
if (win.isAlwaysOnTop()) {
win.setAlwaysOnTop(false)
} else {
win.setAlwaysOnTop(true)
}
}
})
ipcMain.on('checkTop', (e) => {
if (win.isAlwaysOnTop()) {
e.sender.send('isTop', true)
} else {
e.sender.send('isTop', false)
}
})
ipcMain.on('mini', () => {
createMini()

View File

@@ -112,7 +112,7 @@ export default {
const name = e.split('$')[0]
const txt = encodeURI(e.split('$')[1])
clipboard.writeText(txt)
this.$message.success(`已复制 ${name} 下载链接, 快去下载吧!`)
this.$m.success(name + this.$t('copy_success'))
},
allDownload () {
const urls = [...this.vDetail.mp4_urls]
@@ -122,7 +122,7 @@ export default {
txt += (url + '\n')
}
clipboard.writeText(txt)
this.$message.success('已复制全集下载链接, 快去下载吧!')
this.$m.success(this.$t('copy_success'))
}
},
created () {

View File

@@ -219,7 +219,7 @@ export default {
searchEvent () {
const flag = this.site.search
if (flag === '') {
this.$message.warning(this.$t('not_support_search'))
this.$m.warning(this.$t('not_support_search'))
return false
}
this.tb.loading = true
@@ -244,10 +244,10 @@ export default {
starEvent (e) {
video.find({ detail: e.detail }).then(res => {
if (res) {
this.$message.warning(this.$t('exists'))
this.$m.warning(this.$t('exists'))
} else {
video.add(e).then(res => {
this.$message.success(this.$t('star_success'))
this.$m.success(this.$t('star_success'))
})
}
})

View File

@@ -33,15 +33,6 @@
<path d="M12,21 L10.55,19.7051771 C5.4,15.1242507 2,12.1029973 2,8.39509537 C2,5.37384196 4.42,3 7.5,3 C9.24,3 10.91,3.79455041 12,5.05013624 C13.09,3.79455041 14.76,3 16.5,3 C19.58,3 22,5.37384196 22,8.39509537 C22,12.1029973 18.6,15.1242507 13.45,19.7149864 L12,21 Z"></path>
</svg>
</span>
<span class="zy-svg" @click="topEvent" :class="isTop ? 'active' : ''" v-show="right.listData.length > 0">
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-labelledby="arrowUpIconTitle">
<title id="arrowUpIconTitle">{{$t('top')}}</title>
<path d="M9 10.5l3-3 3 3"></path>
<path d="M12 16.5V9"></path>
<path stroke-linecap="round" d="M12 7.5V9"></path>
<circle cx="12" cy="12" r="10"></circle>
</svg>
</span>
<span class="zy-svg" @click="detailEvent" v-show="right.listData.length > 0">
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-labelledby="feedIconTitle">
<title id="feedIconTitle">{{$t('detail')}}</title>
@@ -234,6 +225,8 @@ export default {
this.xg.play()
}
this.onPlayVideo()
}).catch(err => {
this.$m.error(err)
})
},
changeVideo () {
@@ -292,7 +285,7 @@ export default {
if (i < this.right.listData.length) {
this.video.index++
} else {
this.$message.warning(this.$t('last_video'))
this.$m.warning(this.$t('last_video'))
}
},
listEvent () {
@@ -320,7 +313,7 @@ export default {
video.find({ detail: this.video.detail }).then(res => {
if (res !== undefined) {
video.remove(res.id).then(r => {
this.$message.info(this.$t('delete_success'))
this.$m.info(this.$t('delete_success'))
this.isStar = false
})
} else {
@@ -329,16 +322,12 @@ export default {
delete v.id
}
video.add(v).then(r => {
this.$message.success(this.$t('star_success'))
this.$m.success(this.$t('star_success'))
this.isStar = true
})
}
})
},
topEvent () {
ipc.send('top')
this.checkTop()
},
detailEvent () {
this.detail = {
show: true,

View File

@@ -109,7 +109,7 @@ export default {
this.$i18n.locale = e
this.s.language = e
setting.update(this.s).then(res => {
this.$message.success(this.$t('set_success'))
this.$m.success(this.$t('set_success'))
})
},
siteClick (e) {
@@ -117,14 +117,14 @@ export default {
this.show.site = false
this.s.site = e
setting.update(this.s).then(res => {
this.$message.success(this.$t('set_success'))
this.$m.success(this.$t('set_success'))
})
},
changeTheme (e) {
this.theme = e
this.s.theme = e
setting.update(this.s).then(res => {
this.$message.success(this.$t('set_success'))
this.$m.success(this.$t('set_success'))
})
}
},

View File

@@ -78,7 +78,7 @@ export default {
const png = res.toDataURL('image/png')
const p = nativeImage.createFromDataURL(png)
clipboard.writeImage(p)
this.$message.success(this.$t('share_tips'))
this.$m.success(this.$t('share_tips'))
this.share.show = true
})
})

View File

@@ -107,9 +107,9 @@ export default {
deleteEvent (e) {
video.remove(e.id).then(res => {
if (res) {
this.$message.warning(this.$t('delete_failed'))
this.$m.warning(this.$t('delete_failed'))
} else {
this.$message.success(this.$t('delete_success'))
this.$m.success(this.$t('delete_success'))
}
this.getAllStar()
})
@@ -125,12 +125,12 @@ export default {
const nameOne = e.name.replace(/\s*/g, '')
const nameTwo = res.name.replace(/\s*/g, '')
if (nameOne === nameTwo) {
this.$message.info('同步成功, 未查询到更新.')
this.$m.info(this.$t('async_failed'))
} else {
const h = e
h.name = res.name
video.update(h.id, h).then(res => {
this.$message.success('同步成功, 查询到更新.')
this.$m.success(this.$t('async_success'))
})
}
})

View File

@@ -3,4 +3,4 @@ import { Message, Pagination } from 'element-ui'
Vue.use(Pagination)
Vue.prototype.$message = Message
Vue.prototype.$m = Message

View File

@@ -40,5 +40,8 @@
"qr_tips": "Long click recognition.",
"zy_tips": "Prohibit the dissemination of illegal resources.",
"share_tips": "It has been copied to the clipboard. Please share it~",
"not_support_search": "Search is not supported on this site."
"not_support_search": "Search is not supported on this site.",
"copy_success": "has been copied, Download it now",
"async_failed": "Synchronization successful, no updates found.",
"async_success": "Synchronization succeeded, update found."
}

View File

@@ -40,5 +40,8 @@
"qr_tips": "长按二维码,识别播放。",
"zy_tips": "『ZY Player』技术支持,严禁传播违法资源。",
"share_tips": "已复制到剪贴板,快去分享吧~",
"not_support_search": "这个网站不支持搜索。"
"not_support_search": "这个网站不支持搜索。",
"copy_success": "已复制,快去下载吧。",
"async_failed": "同步成功, 未查询到更新。",
"async_success": "同步成功, 查询到更新。"
}