From 13d2d5606be1d7a73727bc8688caa78b5719e87e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Wed, 30 Jan 2019 15:03:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96ktv=E6=A8=A1=E5=BC=8F;?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=9F=B3=E4=B9=90=E6=89=AB=E6=8F=8F;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/css/app.css | 2 +- src/css/app.scss | 4 +++ src/css/common.css | 2 +- src/css/common.scss | 2 +- src/css/modules.css | 2 +- src/css/modules.scss | 12 ++++----- src/js/api.js | 6 +++-- src/js/app.js | 53 ++++++++++++++++++++++------------------ src/js/modules/ktv.js | 5 ++++ src/js/modules/local.js | 11 +++++++-- src/js/modules/search.js | 53 +++++++++++++++++++++++++++++++++++++--- src/main.js | 11 +++++++-- src/tools/windows.js | 3 +-- src/views/ktv.htm | 4 +++ src/views/local.htm | 4 +-- src/views/search.htm | 11 ++++++--- 16 files changed, 135 insertions(+), 50 deletions(-) diff --git a/src/css/app.css b/src/css/app.css index edae558..04c5efa 100644 --- a/src/css/app.css +++ b/src/css/app.css @@ -1 +1 @@ -.do-mod-app{position:relative;display:flex;flex-flow:column wrap;width:100%;height:100%;background:#fff}.do-mod-app .title-bar{position:relative;z-index:9;display:flex;flex:0 5rem}.do-mod-app .title-bar .btn-box{position:absolute;left:1.2rem;top:0;width:auto;height:3rem;padding:.9rem 0}.do-mod-app .title-bar .btn-box .item{display:inline-block;width:1.2rem;height:1.2rem;margin:0 .2rem;background:url(/images/btn-grey.svg) no-repeat;background-size:cover}.do-mod-app .title-bar .btn-box.focus .quit{background-image:url(/images/btn-close.svg)}.do-mod-app .title-bar .btn-box.focus .min{background-image:url(/images/btn-mini.svg)}.do-mod-app .title-bar .btn-box:hover .quit{background-image:url(/images/btn-close_a.svg)}.do-mod-app .title-bar .btn-box:hover .min{background-image:url(/images/btn-mini_a.svg)}.do-mod-app .title-bar .btn-box-win{position:absolute;right:1.2rem;top:0;width:auto;height:4rem;padding:.9rem 0;line-height:1.8rem}.do-mod-app .title-bar .btn-box-win .item,.do-mod-app .title-bar .btn-box-win .opt{position:relative;display:inline-block;width:2.2rem;height:2.2rem;margin:0 .2rem;padding:.2rem;font-size:1.6rem}.do-mod-app .title-bar .btn-box-win .item{text-align:center}.do-mod-app .title-bar .btn-box-win .item:hover{background:rgba(0,0,0,0.05)}.do-mod-app .title-bar .btn-box-win .item.quit:hover{color:#ff5061}.do-mod-app .title-bar .btn-box-win .item.disabled{color:#dae1e9;background:none}.do-mod-app .title-bar .btn-box-win .opt i{font-size:1.8rem}.do-mod-app .title-bar .btn-box-win .opt-list{position:absolute;z-index:100;right:0;top:2.2rem;width:13rem;height:auto;padding:.8rem 0;background:#fff;box-shadow:0 0.5rem 2rem rgba(0,0,0,0.1);font-size:1.4rem}.do-mod-app .title-bar .btn-box-win .opt-list span{display:flex;align-items:center;height:3rem;padding:0 2rem;line-height:3rem}.do-mod-app .title-bar .btn-box-win .opt-list span i{padding-right:.8rem}.do-mod-app .title-bar .btn-box-win .opt-list span.pipe{height:.1rem;margin:.5rem 0;border-bottom:0.1rem solid #f3f5fb}.do-mod-app .title-bar .btn-box-win .opt-list span:hover{background:#f3f5fb}.do-mod-app .title-bar .holder{flex:0 22rem;height:100%;background:#f3f5fb}.do-mod-app .title-bar .tools{flex:1;padding:1rem}.do-mod-app .title-bar .tools .search{position:relative;display:inline-block;line-height:3rem}.do-mod-app .title-bar .tools .icon{position:absolute;right:0;top:0;width:2.6rem;height:3rem}.do-mod-app .title-bar .tools input{width:20rem;padding:0 1.3rem;border-radius:1.5rem}.do-mod-app .main-body{flex:1;display:flex}.do-mod-app .main-body .sidebar{flex:0 22rem;position:relative;height:100%;background:#f3f5fb}.do-mod-app .main-body .sidebar .user-box{width:18rem;height:16.5rem;margin:0 2rem;text-align:center}.do-mod-app .main-body .sidebar .user-box .avatar{overflow:hidden;width:12rem;height:12rem;margin:0 3rem;border:.6rem solid #fff;border-radius:50%;box-shadow:0 0.5rem 1.5rem rgba(0,0,0,0.15)}.do-mod-app .main-body .sidebar .user-box img{width:100%;height:100%}.do-mod-app .main-body .sidebar .user-box .uname{line-height:2;font-weight:normal}.do-mod-app .main-body .sidebar .music-box{width:100%;height:auto;padding:0 1.5rem}.do-mod-app .main-body .sidebar .music-box dt.title{line-height:4rem;color:#98acae}.do-mod-app .main-body .sidebar .music-box dd.item{height:3rem;margin:.3rem 0;padding:0 .8rem;line-height:3rem;color:#748182}.do-mod-app .main-body .sidebar .music-box dd.item .icon{float:left;width:3rem;height:3rem;padding:0 .5rem;font-size:2.4rem}.do-mod-app .main-body .sidebar .music-box dd.item:hover{padding-left:.9rem;color:#3fc2a7}.do-mod-app .main-body .sidebar .music-box dd.item.active{border-radius:.3rem;background:#3fc2a7;color:#fff}.do-mod-app .main-body .sidebar .music-box dd.item.disabled{opacity:.25}.do-mod-app .main-body .module{position:relative;flex:1;display:flex;flex-flow:column wrap}.do-mod-app .contrl-bar{position:relative;z-index:99;display:flex;flex:0 8rem;background:#f3f5fb}.do-mod-app .contrl-bar .play-box{flex:0 22rem;display:flex;justify-content:center;align-items:center;height:8rem;padding:1rem 2rem;text-align:center}.do-mod-app .contrl-bar .play-box .item{flex:0 5rem;margin:0 .5rem;line-height:1;font-size:4.2rem;color:#19b491;transition:all .2s ease-in-out}.do-mod-app .contrl-bar .play-box .item:hover{color:#ffb618}.do-mod-app .contrl-bar .play-box .item:active{color:#3fc2a7;-webkit-transform:scale(1.1);transform:scale(1.1)}.do-mod-app .contrl-bar .play-box .play{font-size:5rem}.do-mod-app .contrl-bar .stat-box{position:relative;flex:1;display:flex;justify-content:center;align-items:center}.do-mod-app .contrl-bar .stat-box .song-stat{flex:1;height:8rem;margin:0 2rem 0 0}.do-mod-app .contrl-bar .stat-box .song-stat canvas{display:flex;width:100%;height:100%}.do-mod-app .contrl-bar .stat-box .ctrl{position:relative;flex:0 1 3.5rem;height:3rem;line-height:3rem;text-align:center;color:#19b491;font-size:2rem}.do-mod-app .contrl-bar .stat-box .ctrl:hover{color:#3fc2a7}.do-mod-app .contrl-bar .stat-box .ctrl:active{color:#16967a}.do-mod-app .contrl-bar .stat-box .ctrl.lrc{margin-right:2rem;font-size:1.6rem}.do-mod-app .contrl-bar .stat-box .ctrl .volume-ctrl{display:none;flex-direction:column;justify-content:flex-end;position:absolute;left:.5rem;bottom:3rem;width:2.4rem;height:12rem;padding:1rem .8rem;background:#fff;border-radius:.3rem;box-shadow:0 0 1rem rgba(0,0,0,0.1)}.do-mod-app .contrl-bar .stat-box .ctrl .volume-ctrl em{flex:0 0;border-radius:.5rem;background:#3fc2a7}.do-mod-app .contrl-bar .stat-box .ctrl.volume:hover .volume-ctrl{display:flex}.do-mod-app.blur{background:rgba(255,255,255,0.85);-webkit-backdrop-filter:blur(1rem);backdrop-filter:blur(1rem)}.do-mod-app.blur .title-bar .holder{background:rgba(255,255,255,0.3)}.do-mod-app.blur .title-bar .tools input{background:rgba(255,255,255,0.8)}.do-mod-app.blur .main-body .sidebar{background:rgba(255,255,255,0.3)}.do-mod-app.blur .contrl-bar{background:rgba(255,255,255,0.35)}.do-mod-app.ktv .contrl-bar{background:rgba(233,233,233,0.1)}.do-mod-app.ktv .contrl-bar .play-box .item,.do-mod-app.ktv .contrl-bar .stat-box .ctrl{color:#fff}.do-mod-app.ktv .contrl-bar .play-box .item:hover,.do-mod-app.ktv .contrl-bar .stat-box .ctrl:hover{color:#ff5061}.do-mod-app .ktv-box{overflow:hidden;position:absolute;z-index:80;left:0;top:0;width:100%;height:100%;background-color:#425064;background-size:cover;background-repeat:no-repeat;color:#fff}.do-mod-app .ktv-box .inner-content{display:flex;flex-flow:column wrap;width:100%;height:100%;padding-bottom:8rem;background:rgba(29,35,44,0.767);-webkit-backdrop-filter:blur(1rem);backdrop-filter:blur(1rem)}.do-mod-app .ktv-box .inner-content .info{flex:1;display:flex;justify-content:center;align-items:center;padding:0 10rem;line-height:2}.do-mod-app .ktv-box .inner-content .info img{width:30rem;height:30rem;border:0.5rem solid rgba(255,255,255,0.5);border-radius:50%}.do-mod-app .ktv-box .inner-content .info .summary{flex:1;padding:0 5rem}.do-mod-app .ktv-box .inner-content .info pre{overflow:auto;height:30rem}.do-mod-app .ktv-box .inner-content .info h3{line-height:3;font-size:1.8rem}.do-mod-app .ktv-box .inner-content .lrc-box{flex:0 10rem;display:flex;flex-flow:column wrap;padding:0 5rem;line-height:5rem;color:#fff;font-size:3rem}.do-mod-app .ktv-box .inner-content .lrc-box section{flex:1;display:flex}.do-mod-app .ktv-box .inner-content .lrc-box section.left{justify-content:flex-start}.do-mod-app .ktv-box .inner-content .lrc-box section.right{justify-content:flex-end}.do-mod-app .ktv-box .inner-content .lrc-box section span{-webkit-background-clip:text !important;background-clip:text !important;color:transparent}.do-mod-app .ktv-box .inner-content .tool-box{position:absolute;right:0;top:15rem;width:13rem;height:auto;padding:1.5rem 0;background:rgba(255,255,255,0.1);border-radius:.3rem 0 0 .3rem;opacity:.3;-webkit-transform:translateX(8.8rem);transform:translateX(8.8rem);transition:all .2s ease-in-out}.do-mod-app .ktv-box .inner-content .tool-box .item{height:3.4rem;padding:0 .8rem;line-height:3.4rem}.do-mod-app .ktv-box .inner-content .tool-box .item:hover{background:rgba(255,255,255,0.1)}.do-mod-app .ktv-box .inner-content .tool-box i{padding:0 1rem 0 .8rem}.do-mod-app .ktv-box .inner-content .tool-box:hover{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}.do-mod-app .ktv-box .inner-content .search-box{display:flex;justify-content:center;align-items:center;position:absolute;left:0;top:0;z-index:82;width:100%;height:56rem;background:rgba(29,35,44,0.5);-webkit-backdrop-filter:blur(0.4rem);backdrop-filter:blur(0.4rem)}.do-mod-app .ktv-box .inner-content .search-box .content{width:60rem;height:auto;padding:2rem;background:rgba(255,255,255,0.8);color:#62778d}.do-mod-app .ktv-box .inner-content .search-box .content .title{height:3rem;line-height:2rem;font-size:1.4rem;text-align:center}.do-mod-app .ktv-box .inner-content .search-box .content .title i{float:right;font-size:2rem;color:#ff5061}.do-mod-app .ktv-box .inner-content .search-box .content .section{height:3.5rem}.do-mod-app .ktv-box .inner-content .search-box .content .section input{width:100%}.do-mod-app .ktv-box .inner-content .search-box .content .result{overflow-y:auto;width:100%;max-height:30rem;padding:1rem;background:rgba(255,255,255,0.2)}.do-mod-app .ktv-box .inner-content .search-box .content .result .item{display:flex;justify-content:center;align-items:center;margin:.3rem 0;text-align:center}.do-mod-app .ktv-box .inner-content .search-box .content .result .item:nth-child(1){line-height:2;border-bottom:0.1rem solid #98acae}.do-mod-app .ktv-box .inner-content .search-box .content .result .item span{flex:1}.do-mod-app .ktv-box .inner-content .search-box .content .result .item span:nth-child(1){flex:3}.do-mod-app .loading{position:fixed;left:0;top:0;z-index:65536;display:flex;justify-content:center;align-items:center;width:100%;height:100%}.do-mod-app .loading .box{position:relative;display:flex;justify-content:center;align-items:center;width:8rem;height:8rem}.do-mod-app .loading .box i{position:absolute;width:8rem;height:8rem;border:3px solid #3fc2a7;border-radius:50%;opacity:.5}.do-mod-app .loading .box i:nth-child(1){-webkit-animation:load 2.5s ease-in-out infinite;animation:load 2.5s ease-in-out infinite}.do-mod-app .loading .box i:nth-child(2){-webkit-animation:load 2.5s .5s ease-in-out infinite;animation:load 2.5s .5s ease-in-out infinite}.do-mod-app .loading .box i:nth-child(3){-webkit-animation:load 2.5s 1s ease-in-out infinite;animation:load 2.5s 1s ease-in-out infinite}.do-mod-app .loading .box i:nth-child(4){-webkit-animation:load 2.5s 1.5s ease-in-out infinite;animation:load 2.5s 1.5s ease-in-out infinite}.do-mod-app .loading .box i:nth-child(5){-webkit-animation:load 2.5s 2s ease-in-out infinite;animation:load 2.5s 2s ease-in-out infinite}.do-mod-app .loading .box span{position:absolute;width:8rem;height:8rem;background:url(/images/load1.png) no-repeat center center;background-size:cover}.do-mod-app .loading .box span:nth-child(6){-webkit-animation:play 1.5s linear infinite;animation:play 1.5s linear infinite}.do-mod-app .loading .box span:nth-child(7){background-image:url(/images/load2.png);-webkit-animation:load2 2.5s linear infinite;animation:load2 2.5s linear infinite}.do-mod-app .loading .box cite{font-size:2.4rem}.do-mod-contextmenu{width:145px;height:auto;padding:8px 0;line-height:35px;font-size:1.3rem}.do-mod-contextmenu li{overflow:hidden;width:100%;height:35px;padding:0 10px;transition:background .2s ease-in-out;cursor:default}.do-mod-contextmenu li:hover{background:#f3f5fb}.do-mod-contextmenu li i{padding:0 3px;font-size:1.6rem;vertical-align:bottom}.do-layer .layer-box.do-mod-contextmenu__fixed{padding:0}@-webkit-keyframes load{from{opacity:.5;-webkit-transform:scale(1);transform:scale(1)}to{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}}@keyframes load{from{opacity:.5;-webkit-transform:scale(1);transform:scale(1)}to{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}}@-webkit-keyframes load2{from{-webkit-transform:rotate(360deg);transform:rotate(360deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}@keyframes load2{from{-webkit-transform:rotate(360deg);transform:rotate(360deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}@-webkit-keyframes play{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes play{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}} +.do-mod-app{position:relative;display:flex;flex-flow:column wrap;width:100%;height:100%;background:#fff}.do-mod-app .title-bar{position:relative;z-index:9;display:flex;flex:0 5rem}.do-mod-app .title-bar .btn-box{position:absolute;left:1.2rem;top:0;width:auto;height:3rem;padding:.9rem 0}.do-mod-app .title-bar .btn-box .item{display:inline-block;width:1.2rem;height:1.2rem;margin:0 .2rem;background:url(/images/btn-grey.svg) no-repeat;background-size:cover}.do-mod-app .title-bar .btn-box.focus .quit{background-image:url(/images/btn-close.svg)}.do-mod-app .title-bar .btn-box.focus .min{background-image:url(/images/btn-mini.svg)}.do-mod-app .title-bar .btn-box:hover .quit{background-image:url(/images/btn-close_a.svg)}.do-mod-app .title-bar .btn-box:hover .min{background-image:url(/images/btn-mini_a.svg)}.do-mod-app .title-bar .btn-box-win{position:absolute;right:1.2rem;top:0;width:auto;height:4rem;padding:.9rem 0;line-height:1.8rem}.do-mod-app .title-bar .btn-box-win .item,.do-mod-app .title-bar .btn-box-win .opt{position:relative;display:inline-block;width:2.2rem;height:2.2rem;margin:0 .2rem;padding:.2rem;font-size:1.6rem}.do-mod-app .title-bar .btn-box-win .item{text-align:center}.do-mod-app .title-bar .btn-box-win .item:hover{background:rgba(0,0,0,0.05)}.do-mod-app .title-bar .btn-box-win .item.quit:hover{color:#ff5061}.do-mod-app .title-bar .btn-box-win .item.disabled{color:#dae1e9;background:none}.do-mod-app .title-bar .btn-box-win .opt i{font-size:1.8rem}.do-mod-app .title-bar .btn-box-win .opt-list{position:absolute;z-index:100;right:0;top:2.2rem;width:13rem;height:auto;padding:.8rem 0;background:#fff;box-shadow:0 0.5rem 2rem rgba(0,0,0,0.1);font-size:1.4rem}.do-mod-app .title-bar .btn-box-win .opt-list span{display:flex;align-items:center;height:3rem;padding:0 2rem;line-height:3rem}.do-mod-app .title-bar .btn-box-win .opt-list span i{padding-right:.8rem}.do-mod-app .title-bar .btn-box-win .opt-list span.pipe{height:.1rem;margin:.5rem 0;border-bottom:0.1rem solid #f3f5fb}.do-mod-app .title-bar .btn-box-win .opt-list span:hover{background:#f3f5fb}.do-mod-app .title-bar .holder{flex:0 22rem;height:100%;background:#f3f5fb}.do-mod-app .title-bar .tools{flex:1;padding:1rem}.do-mod-app .title-bar .tools .search{position:relative;display:inline-block;line-height:3rem}.do-mod-app .title-bar .tools .icon{position:absolute;right:0;top:0;width:2.6rem;height:3rem}.do-mod-app .title-bar .tools input{width:20rem;padding:0 1.3rem;border-radius:1.5rem}.do-mod-app .main-body{flex:1;display:flex}.do-mod-app .main-body .sidebar{flex:0 22rem;position:relative;height:100%;background:#f3f5fb}.do-mod-app .main-body .sidebar .user-box{width:18rem;height:16.5rem;margin:0 2rem;text-align:center}.do-mod-app .main-body .sidebar .user-box .avatar{overflow:hidden;width:12rem;height:12rem;margin:0 3rem;border:.6rem solid #fff;border-radius:50%;box-shadow:0 0.5rem 1.5rem rgba(0,0,0,0.15)}.do-mod-app .main-body .sidebar .user-box img{width:100%;height:100%}.do-mod-app .main-body .sidebar .user-box .uname{line-height:2;font-weight:normal}.do-mod-app .main-body .sidebar .music-box{width:100%;height:auto;padding:0 1.5rem}.do-mod-app .main-body .sidebar .music-box dt.title{line-height:4rem;color:#98acae}.do-mod-app .main-body .sidebar .music-box dd.item{height:3rem;margin:.3rem 0;padding:0 .8rem;line-height:3rem;color:#748182}.do-mod-app .main-body .sidebar .music-box dd.item .icon{float:left;width:3rem;height:3rem;padding:0 .5rem;font-size:2.4rem}.do-mod-app .main-body .sidebar .music-box dd.item:hover{padding-left:.9rem;color:#3fc2a7}.do-mod-app .main-body .sidebar .music-box dd.item.active{border-radius:.3rem;background:#3fc2a7;color:#fff}.do-mod-app .main-body .sidebar .music-box dd.item.disabled{opacity:.25}.do-mod-app .main-body .module{position:relative;flex:1;display:flex;flex-flow:column wrap}.do-mod-app .contrl-bar{position:relative;z-index:99;display:flex;flex:0 8rem;background:#f3f5fb}.do-mod-app .contrl-bar .play-box{flex:0 22rem;display:flex;justify-content:center;align-items:center;height:8rem;padding:1rem 2rem;text-align:center}.do-mod-app .contrl-bar .play-box .item{flex:0 5rem;margin:0 .5rem;line-height:1;font-size:4.2rem;color:#19b491;transition:all .2s ease-in-out}.do-mod-app .contrl-bar .play-box .item:hover{color:#ffb618}.do-mod-app .contrl-bar .play-box .item:active{color:#3fc2a7;-webkit-transform:scale(1.1);transform:scale(1.1)}.do-mod-app .contrl-bar .play-box .play{font-size:5rem}.do-mod-app .contrl-bar .stat-box{position:relative;flex:1;display:flex;justify-content:center;align-items:center}.do-mod-app .contrl-bar .stat-box .song-stat{flex:1;height:8rem;margin:0 2rem 0 0}.do-mod-app .contrl-bar .stat-box .song-stat canvas{display:flex;width:100%;height:100%}.do-mod-app .contrl-bar .stat-box .ctrl{position:relative;flex:0 1 3.5rem;height:3rem;line-height:3rem;text-align:center;color:#19b491;font-size:2rem}.do-mod-app .contrl-bar .stat-box .ctrl:hover{color:#3fc2a7}.do-mod-app .contrl-bar .stat-box .ctrl:active{color:#16967a}.do-mod-app .contrl-bar .stat-box .ctrl.lrc{margin-right:2rem;font-size:1.6rem}.do-mod-app .contrl-bar .stat-box .ctrl .volume-ctrl{display:none;flex-direction:column;justify-content:flex-end;position:absolute;left:.5rem;bottom:3rem;width:2.4rem;height:12rem;padding:1rem .8rem;background:#fff;border-radius:.3rem;box-shadow:0 0 1rem rgba(0,0,0,0.1)}.do-mod-app .contrl-bar .stat-box .ctrl .volume-ctrl em{flex:0 0;border-radius:.5rem;background:#3fc2a7}.do-mod-app .contrl-bar .stat-box .ctrl.volume:hover .volume-ctrl{display:flex}.do-mod-app.blur{background:rgba(255,255,255,0.85);-webkit-backdrop-filter:blur(1rem);backdrop-filter:blur(1rem)}.do-mod-app.blur .title-bar .holder{background:rgba(255,255,255,0.3)}.do-mod-app.blur .title-bar .tools input{background:rgba(255,255,255,0.8)}.do-mod-app.blur .main-body .sidebar{background:rgba(255,255,255,0.3)}.do-mod-app.blur .contrl-bar{background:rgba(255,255,255,0.35)}.do-mod-app.ktv .contrl-bar{background:rgba(233,233,233,0.1)}.do-mod-app.ktv .contrl-bar .play-box .item,.do-mod-app.ktv .contrl-bar .stat-box .ctrl{color:#fff}.do-mod-app.ktv .contrl-bar .play-box .item:hover,.do-mod-app.ktv .contrl-bar .stat-box .ctrl:hover{color:#ff5061}.do-mod-app .ktv-box{overflow:hidden;position:absolute;z-index:80;left:0;top:0;width:100%;height:100%;background-color:#425064;background-size:cover;background-repeat:no-repeat;color:#fff}.do-mod-app .ktv-box .inner-content{display:flex;flex-flow:column wrap;width:100%;height:100%;padding-bottom:8rem;background:rgba(29,35,44,0.767);-webkit-backdrop-filter:blur(1rem);backdrop-filter:blur(1rem)}.do-mod-app .ktv-box .inner-content .info{flex:1;display:flex;justify-content:center;align-items:center;padding:0 10rem;line-height:2}.do-mod-app .ktv-box .inner-content .info img{width:30rem;height:30rem;border:0.5rem solid rgba(255,255,255,0.5);border-radius:50%}.do-mod-app .ktv-box .inner-content .info .summary{flex:1;padding:0 5rem}.do-mod-app .ktv-box .inner-content .info pre{overflow:auto;height:30rem}.do-mod-app .ktv-box .inner-content .info h3{line-height:3;font-size:1.8rem}.do-mod-app .ktv-box .inner-content .lrc-box{flex:0 10rem;display:flex;flex-flow:column wrap;padding:0 5rem;line-height:5rem;color:#fff;font-size:3rem}.do-mod-app .ktv-box .inner-content .lrc-box section{flex:1;display:flex}.do-mod-app .ktv-box .inner-content .lrc-box section.left{justify-content:flex-start}.do-mod-app .ktv-box .inner-content .lrc-box section.right{justify-content:flex-end}.do-mod-app .ktv-box .inner-content .lrc-box section span{-webkit-background-clip:text !important;background-clip:text !important;color:transparent}.do-mod-app .ktv-box .inner-content .tool-box{position:absolute;right:0;top:15rem;width:13rem;height:auto;padding:1.5rem 0;background:rgba(255,255,255,0.1);border-radius:.3rem 0 0 .3rem;opacity:.3;-webkit-transform:translateX(8.8rem);transform:translateX(8.8rem);transition:all .2s ease-in-out}.do-mod-app .ktv-box .inner-content .tool-box .item{height:3.4rem;padding:0 .8rem;line-height:3.4rem}.do-mod-app .ktv-box .inner-content .tool-box .item:hover{background:rgba(255,255,255,0.1)}.do-mod-app .ktv-box .inner-content .tool-box i{padding:0 1rem 0 .8rem}.do-mod-app .ktv-box .inner-content .tool-box:hover{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}.do-mod-app .ktv-box .inner-content .slide-down{position:absolute;right:1rem;top:1rem;width:3rem;height:2rem;line-height:1.8rem;border:0.1rem solid #98acae;border-radius:.3rem;text-align:center}.do-mod-app .ktv-box .inner-content .slide-down i{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.do-mod-app .ktv-box .inner-content .search-box{display:flex;justify-content:center;align-items:center;position:absolute;left:0;top:0;z-index:82;width:100%;height:56rem;background:rgba(29,35,44,0.5);-webkit-backdrop-filter:blur(0.4rem);backdrop-filter:blur(0.4rem)}.do-mod-app .ktv-box .inner-content .search-box .content{width:60rem;height:auto;padding:2rem;background:rgba(255,255,255,0.8);color:#62778d}.do-mod-app .ktv-box .inner-content .search-box .content .title{height:3rem;line-height:2rem;font-size:1.4rem;text-align:center}.do-mod-app .ktv-box .inner-content .search-box .content .title i{float:right;font-size:2rem;color:#ff5061}.do-mod-app .ktv-box .inner-content .search-box .content .section{height:3.5rem}.do-mod-app .ktv-box .inner-content .search-box .content .section input{width:100%}.do-mod-app .ktv-box .inner-content .search-box .content .result{overflow-y:auto;width:100%;max-height:30rem;padding:1rem;background:rgba(255,255,255,0.2)}.do-mod-app .ktv-box .inner-content .search-box .content .result .item{display:flex;justify-content:center;align-items:center;margin:.3rem 0;text-align:center}.do-mod-app .ktv-box .inner-content .search-box .content .result .item:nth-child(1){line-height:2;border-bottom:0.1rem solid #98acae}.do-mod-app .ktv-box .inner-content .search-box .content .result .item span{flex:1}.do-mod-app .ktv-box .inner-content .search-box .content .result .item span:nth-child(1){flex:3}.do-mod-app .loading{position:fixed;left:0;top:0;z-index:65536;display:flex;justify-content:center;align-items:center;width:100%;height:100%}.do-mod-app .loading .box{position:relative;display:flex;justify-content:center;align-items:center;width:8rem;height:8rem}.do-mod-app .loading .box i{position:absolute;width:8rem;height:8rem;border:3px solid #3fc2a7;border-radius:50%;opacity:.5}.do-mod-app .loading .box i:nth-child(1){-webkit-animation:load 2.5s ease-in-out infinite;animation:load 2.5s ease-in-out infinite}.do-mod-app .loading .box i:nth-child(2){-webkit-animation:load 2.5s .5s ease-in-out infinite;animation:load 2.5s .5s ease-in-out infinite}.do-mod-app .loading .box i:nth-child(3){-webkit-animation:load 2.5s 1s ease-in-out infinite;animation:load 2.5s 1s ease-in-out infinite}.do-mod-app .loading .box i:nth-child(4){-webkit-animation:load 2.5s 1.5s ease-in-out infinite;animation:load 2.5s 1.5s ease-in-out infinite}.do-mod-app .loading .box i:nth-child(5){-webkit-animation:load 2.5s 2s ease-in-out infinite;animation:load 2.5s 2s ease-in-out infinite}.do-mod-app .loading .box span{position:absolute;width:8rem;height:8rem;background:url(/images/load1.png) no-repeat center center;background-size:cover}.do-mod-app .loading .box span:nth-child(6){-webkit-animation:play 1.5s linear infinite;animation:play 1.5s linear infinite}.do-mod-app .loading .box span:nth-child(7){background-image:url(/images/load2.png);-webkit-animation:load2 2.5s linear infinite;animation:load2 2.5s linear infinite}.do-mod-app .loading .box cite{font-size:2.4rem}.do-mod-contextmenu{width:145px;height:auto;padding:8px 0;line-height:35px;font-size:1.3rem}.do-mod-contextmenu li{overflow:hidden;width:100%;height:35px;padding:0 10px;transition:background .2s ease-in-out;cursor:default}.do-mod-contextmenu li:hover{background:#f3f5fb}.do-mod-contextmenu li i{padding:0 3px;font-size:1.6rem;vertical-align:bottom}.do-layer .layer-box.do-mod-contextmenu__fixed{padding:0}@-webkit-keyframes load{from{opacity:.5;-webkit-transform:scale(1);transform:scale(1)}to{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}}@keyframes load{from{opacity:.5;-webkit-transform:scale(1);transform:scale(1)}to{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}}@-webkit-keyframes load2{from{-webkit-transform:rotate(360deg);transform:rotate(360deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}@keyframes load2{from{-webkit-transform:rotate(360deg);transform:rotate(360deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}@-webkit-keyframes play{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes play{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}} diff --git a/src/css/app.scss b/src/css/app.scss index 62d4c92..544263a 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -209,6 +209,10 @@ &:hover {opacity:1;transform:translateX(0)} } + .slide-down {position:absolute;right:1rem;top:1rem;width:3rem;height:2rem;line-height:1.8rem;border:.1rem solid nth($cgr, 1);border-radius:.3rem;text-align:center; + i {transform:rotate(90deg)} + } + .search-box {display:flex;justify-content:center;align-items:center;position:absolute;left:0;top:0;z-index:82;width:100%;height:56rem;background:rgba(29, 35, 44, 0.5);backdrop-filter:blur(.4rem); diff --git a/src/css/common.css b/src/css/common.css index a5a1681..31f2d52 100644 --- a/src/css/common.css +++ b/src/css/common.css @@ -1 +1 @@ -@font-face{font-family:"sonist font";src:url("data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAysAAsAAAAAFOAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY9ikkYY21hcAAAAYAAAACpAAACRLbi0KRnbHlmAAACLAAACAwAAA0QU/XrjmhlYWQAAAo4AAAALwAAADYTt0/UaGhlYQAACmgAAAAcAAAAJAfeA5FobXR4AAAKhAAAAA8AAABAQAAAAGxvY2EAAAqUAAAAIgAAACIcSBmSbWF4cAAACrgAAAAfAAAAIAElAK5uYW1lAAAK2AAAAVAAAAKRbYZNvnBvc3QAAAwoAAAAgwAAAL22eIcreJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWCcwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeizxXY27438AQw9zA0AAUZgTJAQDhxQwfeJztkcsRwkAMQ7UkhF8gFyCTQ/iTE7VQECeKoxeVEeQVZWDP2/Has5+RAEwBFOIhSiC9kRDxUjflfoFl7pd4aj9XTgC27DiMo6qtqj6qHEnzjTKqic6WeqHCTN2F7lmhxlrT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wnXwr7GPkPQkHuPPe/Z7VY6enarJRSWTy2OTOL0yeFE5teahnq3RsD5QDHGlbJCZX7bB1oA50ru1+ZrGedZyLVWxNpvrs6jQ1amnNQkcunDu37DabsehhZDIesQcLjTEc1ymvdYIN1wQRDHLE5eroK0pKuDv29/qQqRlWSDnBnvD8r46Y3CaSslZoI0TrhHdAb176j89ZYM3/d6g6urcJy0xG6ktW82wpWWFZ9hZUIuoh5mVqiS6afOMjf1jeQPYH10p3s3icbYxbDoIwFAV7Cq0WUHEhLKqRG23sA/sg6upFDX45X5OTyWGcfWnYf3pwVKghILHBFgoNWnTYYY8DehxZpa1VdCvGmidFcSEds3AlmZOarH4M1qTM3VxH7a8yGX+mKBcfgxNRjyZ8NkttCn4pB0/3vPoUae5W1yX9ovcxYy/tJyzCAA==") format("woff")}[class^="s-icon-"],[class*=" s-icon-"]{display:inline-block;font-family:"sonist font" !important;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.s-icon-all:before{content:"\e714"}.s-icon-eq:before{content:"\e715"}.s-icon-heart:before{content:"\e716"}.s-icon-music:before{content:"\e717"}.s-icon-play-list:before{content:"\e719"}.s-icon-mv:before{content:"\e71d"}.s-icon-rank:before{content:"\e71e"}.s-icon-singer:before{content:"\e71f"}.s-icon-random:before{content:"\e720"}.s-icon-radio:before{content:"\e721"}.s-icon-single:before{content:"\e722"}.s-icon-next:before{content:"\e723"}.s-icon-prev:before{content:"\e724"}.s-icon-pause:before{content:"\e725"}.s-icon-play:before{content:"\e726"}.do-fn-drag{-webkit-app-region:drag;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.do-fn-nodrag{-webkit-app-region:no-drag}html{font-size:62.5%}body{position:fixed;left:0;top:0;display:flex;width:100%;height:100%;line-height:1.5;background:#fff;font-size:1.4rem;color:#62778d;background-size:cover;background-repeat:no-repeat}table{overflow:auto;display:table;width:100%;line-height:2.5rem}table thead tr{height:4.5rem;border-bottom:0.1rem solid rgba(200,200,200,0.15)}table thead th{padding:1rem .8rem;border:0}table tbody tr{height:auto;transition:background .3s ease-in-out}table tbody tr:hover{background:rgba(63,194,168,0.08)}table tbody td{padding:.9rem .8rem}::-webkit-scrollbar{width:.6rem;height:.6rem;background:none}::-webkit-scrollbar:hover{background:rgba(255,255,255,0.1)}::-webkit-scrollbar-button{display:none}::-webkit-scrollbar-thumb{background:#dae1e9}::-webkit-scrollbar-thumb:hover{background:#3fc2a7} +@font-face{font-family:"sonist font";src:url("data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAysAAsAAAAAFOAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY9ikkYY21hcAAAAYAAAACpAAACRLbi0KRnbHlmAAACLAAACAwAAA0QU/XrjmhlYWQAAAo4AAAALwAAADYTt0/UaGhlYQAACmgAAAAcAAAAJAfeA5FobXR4AAAKhAAAAA8AAABAQAAAAGxvY2EAAAqUAAAAIgAAACIcSBmSbWF4cAAACrgAAAAfAAAAIAElAK5uYW1lAAAK2AAAAVAAAAKRbYZNvnBvc3QAAAwoAAAAgwAAAL22eIcreJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWCcwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeizxXY27438AQw9zA0AAUZgTJAQDhxQwfeJztkcsRwkAMQ7UkhF8gFyCTQ/iTE7VQECeKoxeVEeQVZWDP2/Has5+RAEwBFOIhSiC9kRDxUjflfoFl7pd4aj9XTgC27DiMo6qtqj6qHEnzjTKqic6WeqHCTN2F7lmhxlrTRuMK/6jz+vntmlDThPbcmaz33oRXbE34xc6Ej+yN9AYPRsqDRyMPwJORG+DZhL+8GDkEXk38jjcj18C7CXc5GDRf39Ms5gAAAHiclRZbbBvHcWfveLf34JFHHo+iJFI6HnUXWzQlPkTKkkxJ1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eroK0pKuDv29/qQqRlWSDnBnvD8r46Y3CaSslZoI0TrhHdAb176j89ZYM3/d6g6urcJy0xG6ktW82wpWWFZ9hZUIuoh5mVqiS6afOMjf1jeQPYH10p3s3icbYxbDoIwFAV7Cq0WUHEhLKqRG23sA/sg6upFDX45X5OTyWGcfWnYf3pwVKghILHBFgoNWnTYYY8DehxZpa1VdCvGmidFcSEds3AlmZOarH4M1qTM3VxH7a8yGX+mKBcfgxNRjyZ8NkttCn4pB0/3vPoUae5W1yX9ovcxYy/tJyzCAA==") format("woff")}[class^="s-icon-"],[class*=" s-icon-"]{display:inline-block;font-family:"sonist font" !important;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.s-icon-all:before{content:"\e714"}.s-icon-eq:before{content:"\e715"}.s-icon-heart:before{content:"\e716"}.s-icon-music:before{content:"\e717"}.s-icon-play-list:before{content:"\e719"}.s-icon-mv:before{content:"\e71d"}.s-icon-rank:before{content:"\e71e"}.s-icon-singer:before{content:"\e71f"}.s-icon-random:before{content:"\e720"}.s-icon-radio:before{content:"\e721"}.s-icon-single:before{content:"\e722"}.s-icon-next:before{content:"\e723"}.s-icon-prev:before{content:"\e724"}.s-icon-pause:before{content:"\e725"}.s-icon-play:before{content:"\e726"}.do-fn-drag{-webkit-app-region:drag;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.do-fn-nodrag{-webkit-app-region:no-drag}html{font-size:62.5%}body{position:fixed;left:0;top:0;display:flex;width:100%;height:100%;line-height:1.5;background:#fff;font-size:1.4rem;color:#62778d;background-size:cover;background-repeat:no-repeat}table{overflow:auto;display:table;width:100%;line-height:2.5rem}table thead tr{height:4.5rem;border-bottom:0.1rem solid rgba(200,200,200,0.15)}table thead th{padding:1rem .8rem;border:0}table tbody tr{height:auto;transition:background .3s ease-in-out}table tbody tr:hover{background:rgba(29,35,44,0.08)}table tbody td{padding:.9rem .8rem}::-webkit-scrollbar{width:.6rem;height:.6rem;background:none}::-webkit-scrollbar:hover{background:rgba(255,255,255,0.1)}::-webkit-scrollbar-button{display:none}::-webkit-scrollbar-thumb{background:#dae1e9}::-webkit-scrollbar-thumb:hover{background:#3fc2a7} diff --git a/src/css/common.scss b/src/css/common.scss index 24d4678..1b51e14 100644 --- a/src/css/common.scss +++ b/src/css/common.scss @@ -39,7 +39,7 @@ table {overflow:auto;display:table;width:100%;line-height:2.5rem; thead tr {height:4.5rem;border-bottom:.1rem solid rgba(200, 200, 200, .15)} thead th {padding:1rem .8rem;border:0;} tbody tr {height:auto;@include ts(background, .3s); - &:hover {background:rgba(63, 194, 168, .08);} + &:hover {background:rgba(29, 35, 44, .08);} } tbody td {padding:.9rem .8rem} } diff --git a/src/css/modules.css b/src/css/modules.css index 8d204ca..2de181c 100644 --- a/src/css/modules.css +++ b/src/css/modules.css @@ -1 +1 @@ -.do-mod-artist{position:relative;display:flex;width:100%;height:100%}.do-mod-artist .filter-box{flex:0 1 12rem;border-right:0.1rem solid #f3f5fb;text-align:right}.do-mod-artist .filter-box .item{width:100%;height:2.4rem;padding:0 1.2rem;line-height:2.4rem;color:#98acae}.do-mod-artist .filter-box .item.active{color:#3fc2a7;font-weight:bold}.do-mod-artist .filter-box .item:hover{padding-right:1.3rem;color:#3fc2a7}.do-mod-artist .filter-box .pipe{display:block;width:100%;height:.7rem}.do-mod-artist .list-box{overflow-y:auto;display:flex;flex-flow:row wrap;flex:1;padding:0 1rem}.do-mod-artist .list-box .item{display:flex;justify-content:center;align-items:center;flex:45%;height:7rem;margin:1rem 2.5%;padding:.5rem;background:#f3f5fb}.do-mod-artist .list-box .item img{flex:0 1 6rem;height:6rem}.do-mod-artist .list-box .item summary{flex:2;padding:0 1rem}.do-mod-artist .list-box .item strong{font-size:1.6rem}.do-mod-artist .list-box .item p{font-size:1.2rem;color:#98acae}.do-mod-artist .artist-box{position:absolute;left:0;top:0;z-index:9;width:100%;height:100%;background-size:cover;background-repeat:no-repeat;background-position:center center}.do-mod-artist .artist-box .content{display:flex;flex-flow:column wrap;width:100%;height:100%;padding:1.5rem 2.5rem;background:linear-gradient(to bottom, #fff 2%, rgba(255,255,255,0.75), #fff 98%);-webkit-backdrop-filter:blur(1rem);backdrop-filter:blur(1rem)}.do-mod-artist .artist-box .content .name{flex:0 1 3.6rem;font-size:1.4rem;font-style:italic;font-weight:normal}.do-mod-artist .artist-box .content .name a{text-decoration:underline;color:#3fc2a7}.do-mod-artist .artist-box .content .name i{color:#98acae}.do-mod-artist .artist-box .content .desc{flex:0 1 3rem;font-size:1.2rem;color:#98acae}.do-mod-artist .artist-box .content .desc span{padding:0 .5rem;text-decoration:underline;color:#3fc2a7}.do-mod-artist .artist-box .content .song-album{flex:1;display:flex;flex-flow:column wrap}.do-mod-artist .artist-box .content .tab{flex:0 1 3rem;display:flex;padding:0 .5rem;line-height:2.9rem;border-bottom:0.1rem solid #e8ebf4;text-align:center}.do-mod-artist .artist-box .content .tab .item{flex:0 0 7.5rem;height:3rem;margin:0 .3rem}.do-mod-artist .artist-box .content .tab .item.active{border-bottom:0.2rem solid #3fc2a7;color:#3fc2a7}.do-mod-artist .artist-box .content .tab .item.disabled{opacity:.25}.do-mod-local{flex:1;display:flex;flex-flow:column wrap}.do-mod-local .tabbar{flex:0 1 3rem;padding:0 1rem;line-height:2.9rem;border-bottom:0.1rem solid rgba(200,200,200,0.3)}.do-mod-local .tabbar .refresh{margin-left:1rem;color:#3fc2a7;text-decoration:underline}.do-mod-local .tabbar .refresh:hover{color:#ffb618}.do-mod-local .tabbar .refresh:active{color:#3fc2a7;-webkit-transform:scale(1.1);transform:scale(1.1)}.do-mod-local .table{overflow:auto;flex:1}.do-mod-local .table .stat{width:2.6rem;height:2.6rem;line-height:2.6rem}.do-mod-local .table .ac{text-align:center}.do-mod-local .table .active{color:#3fc2a7;background:rgba(255,255,255,0.6)}.do-mod-local .table .active i{-webkit-animation:play 2s infinite linear;animation:play 2s infinite linear}.do-mod-local .edit-form{position:absolute;left:0;top:0;z-index:90;display:flex;justify-content:center;align-items:center;width:100%;height:100%}.do-mod-local .edit-form .form{position:relative;display:flex;flex-flow:column wrap;flex:0 40rem;width:5rem;height:auto;padding:.5rem 4rem 2rem;background:#fff;box-shadow:0 0.5rem 2rem rgba(0,0,0,0.2)}.do-mod-local .edit-form .form .section{display:flex;flex:1;justify-content:center;align-items:center;margin:1rem 0}.do-mod-local .edit-form .form .section.title{line-height:2;font-size:1.6rem}.do-mod-local .edit-form .form .section.title i{position:absolute;right:1rem;top:1rem;color:#ff5061}.do-mod-local .edit-form .form .section.title i:hover{-webkit-transform:scale(1.2);transform:scale(1.2);font-weight:bold}.do-mod-local .edit-form .form .section .label{flex:0 5rem;padding-right:2rem;color:#98acae;text-align:right}.do-mod-local .edit-form .form .section .field{flex:1}.do-mod-search{flex:1;display:flex;flex-flow:column wrap}.do-mod-search .tabbar{flex:0 1 3rem;display:flex;padding:0 .5rem;line-height:2.9rem;border-bottom:0.1rem solid #e8ebf4;text-align:center}.do-mod-search .tabbar .item{flex:0 0 7.5rem;height:3rem;margin:0 .3rem;border:0.1rem solid rgba(200,200,200,0.3);background:rgba(255,255,255,0.3);color:#dae1e9}.do-mod-search .tabbar .item.active{border-bottom-color:transparent;color:#62778d}.do-mod-search .tabbar .item i{color:#ff5061}.do-mod-search .table{overflow:auto;flex:1}.do-mod-search .table .active{color:#3fc2a7}.do-mod-search .table .ac{text-align:center}.do-mod-profile{overflow-y:auto;padding:0 3rem}.do-mod-profile .title{position:relative;width:100%;height:6rem;line-height:6rem;border-bottom:0.1rem solid #dae1e9;font-size:1.8rem}.do-mod-profile .title .save{position:absolute;bottom:.3rem;right:0}.do-mod-profile .block{display:flex;justify-content:center;align-items:center;width:100%;padding:2rem 0;border-bottom:0.1rem solid #f3f5fb}.do-mod-profile .block .label{flex:0 1 20rem}.do-mod-profile .block .field{flex:1;display:flex;align-items:center}.do-mod-profile .block .path-holder{max-width:26rem;padding:0 1.5rem 0 .5rem;border-bottom:0.1rem solid #98acae;color:#98acae}.do-mod-profile .block .do-radio{margin-right:2rem}.do-mod-profile .block .desc{line-height:2}.do-mod-profile .block .desc p{margin-top:1.5rem}.artist-desc-layer{width:60rem;height:30rem}.artist-desc-layer .layer-content{overflow-y:auto;height:85% !important;padding:1rem;line-height:2;text-indent:2em} +.do-mod-artist{position:relative;display:flex;width:100%;height:100%}.do-mod-artist .filter-box{flex:0 1 12rem;border-right:0.1rem solid #f3f5fb;text-align:right}.do-mod-artist .filter-box .item{width:100%;height:2.4rem;padding:0 1.2rem;line-height:2.4rem;color:#98acae}.do-mod-artist .filter-box .item.active{color:#3fc2a7;font-weight:bold}.do-mod-artist .filter-box .item:hover{padding-right:1.3rem;color:#3fc2a7}.do-mod-artist .filter-box .pipe{display:block;width:100%;height:.7rem}.do-mod-artist .list-box{overflow-y:auto;display:flex;flex-flow:row wrap;flex:1;padding:0 1rem}.do-mod-artist .list-box .item{display:flex;justify-content:center;align-items:center;flex:45%;height:7rem;margin:1rem 2.5%;padding:.5rem;background:#f3f5fb}.do-mod-artist .list-box .item img{flex:0 1 6rem;height:6rem}.do-mod-artist .list-box .item summary{flex:2;padding:0 1rem}.do-mod-artist .list-box .item strong{font-size:1.6rem}.do-mod-artist .list-box .item p{font-size:1.2rem;color:#98acae}.do-mod-artist .artist-box{position:absolute;left:0;top:0;z-index:9;width:100%;height:100%;background-size:cover;background-repeat:no-repeat;background-position:center center}.do-mod-artist .artist-box .content{display:flex;flex-flow:column wrap;width:100%;height:100%;padding:1.5rem 2.5rem;background:linear-gradient(to bottom, #fff 2%, rgba(255,255,255,0.75), #fff 98%);-webkit-backdrop-filter:blur(1rem);backdrop-filter:blur(1rem)}.do-mod-artist .artist-box .content .name{flex:0 1 3.6rem;font-size:1.4rem;font-style:italic;font-weight:normal}.do-mod-artist .artist-box .content .name a{text-decoration:underline;color:#3fc2a7}.do-mod-artist .artist-box .content .name i{color:#98acae}.do-mod-artist .artist-box .content .desc{flex:0 1 3rem;font-size:1.2rem;color:#98acae}.do-mod-artist .artist-box .content .desc span{padding:0 .5rem;text-decoration:underline;color:#3fc2a7}.do-mod-artist .artist-box .content .song-album{flex:1;display:flex;flex-flow:column wrap}.do-mod-artist .artist-box .content .tab{flex:0 1 3rem;display:flex;padding:0 .5rem;line-height:2.9rem;border-bottom:0.1rem solid #e8ebf4;text-align:center}.do-mod-artist .artist-box .content .tab .item{flex:0 0 7.5rem;height:3rem;margin:0 .3rem}.do-mod-artist .artist-box .content .tab .item.active{border-bottom:0.2rem solid #3fc2a7;color:#3fc2a7}.do-mod-artist .artist-box .content .tab .item.disabled{opacity:.25}.do-mod-local{flex:1;display:flex;flex-flow:column wrap}.do-mod-local .tabbar{flex:0 1 3rem;padding:0 1rem;line-height:2.9rem;border-bottom:0.1rem solid rgba(200,200,200,0.3)}.do-mod-local .tabbar .refresh{margin-left:1rem;color:#3fc2a7;text-decoration:underline}.do-mod-local .tabbar .refresh:hover{color:#ffb618}.do-mod-local .tabbar .refresh:active{color:#3fc2a7;-webkit-transform:scale(1.1);transform:scale(1.1)}.do-mod-local .table{overflow:auto;flex:1}.do-mod-local .table .stat{width:2.6rem;height:2.6rem;line-height:2.6rem}.do-mod-local .table .ac{text-align:center}.do-mod-local .table .idx{color:#dae1e9;text-shadow:0 0.1rem 0 rgba(255,255,255,0.6)}.do-mod-local .table .active{color:#3fc2a7;background:rgba(255,255,255,0.6);font-weight:bold}.do-mod-local .edit-form{position:absolute;left:0;top:0;z-index:90;display:flex;justify-content:center;align-items:center;width:100%;height:100%}.do-mod-local .edit-form .form{position:relative;display:flex;flex-flow:column wrap;flex:0 40rem;width:5rem;height:auto;padding:.5rem 4rem 2rem;background:#fff;box-shadow:0 0.5rem 2rem rgba(0,0,0,0.2)}.do-mod-local .edit-form .form .section{display:flex;flex:1;justify-content:center;align-items:center;margin:1rem 0}.do-mod-local .edit-form .form .section.title{line-height:2;font-size:1.6rem}.do-mod-local .edit-form .form .section.title i{position:absolute;right:1rem;top:1rem;color:#ff5061}.do-mod-local .edit-form .form .section.title i:hover{-webkit-transform:scale(1.2);transform:scale(1.2);font-weight:bold}.do-mod-local .edit-form .form .section .label{flex:0 5rem;padding-right:2rem;color:#98acae;text-align:right}.do-mod-local .edit-form .form .section .field{flex:1}.do-mod-local .edit-form .form .section .field.path{border:0;font-size:1.3rem;color:#526273}.do-mod-search{flex:1;display:flex;flex-flow:column wrap}.do-mod-search .tabbar{flex:0 1 3rem;display:flex;padding:0 .5rem;line-height:2.9rem;border-bottom:0.1rem solid #e8ebf4;text-align:center}.do-mod-search .tabbar .item{flex:0 0 7.5rem;height:3rem;margin:0 .3rem;border:0.1rem solid rgba(200,200,200,0.3);background:rgba(255,255,255,0.3);color:#dae1e9}.do-mod-search .tabbar .item.active{border-bottom-color:transparent;color:#62778d}.do-mod-search .tabbar .item i{color:#ff5061}.do-mod-search .table{overflow:auto;flex:1}.do-mod-search .table .active{color:#3fc2a7}.do-mod-search .table .ac{text-align:center}.do-mod-profile{overflow-y:auto;padding:0 3rem}.do-mod-profile .title{position:relative;width:100%;height:6rem;line-height:6rem;border-bottom:0.1rem solid #dae1e9;font-size:1.8rem}.do-mod-profile .title .save{position:absolute;bottom:.3rem;right:0}.do-mod-profile .block{display:flex;justify-content:center;align-items:center;width:100%;padding:2rem 0;border-bottom:0.1rem solid #f3f5fb}.do-mod-profile .block .label{flex:0 1 20rem}.do-mod-profile .block .field{flex:1;display:flex;align-items:center}.do-mod-profile .block .path-holder{max-width:26rem;padding:0 1.5rem 0 .5rem;border-bottom:0.1rem solid #98acae;color:#98acae}.do-mod-profile .block .do-radio{margin-right:2rem}.do-mod-profile .block .desc{line-height:2}.do-mod-profile .block .desc p{margin-top:1.5rem}.artist-desc-layer{width:60rem;height:30rem}.artist-desc-layer .layer-content{overflow-y:auto;height:85% !important;padding:1rem;line-height:2;text-indent:2em} diff --git a/src/css/modules.scss b/src/css/modules.scss index f6c9364..df2275d 100644 --- a/src/css/modules.scss +++ b/src/css/modules.scss @@ -87,11 +87,8 @@ .stat {width:2.6rem;height:2.6rem;line-height:2.6rem;} .ac {text-align:center} - - .active {color:nth($ct, 1);background:rgba(255, 255, 255, 0.6);; - - i {animation: play 2s infinite linear;} - } + .idx {color:nth($cp, 3);text-shadow:0 .1rem 0 rgba(255, 255, 255, 0.6)} + .active {color:nth($ct, 1);background:rgba(255, 255, 255, 0.6);font-weight:bold} } @@ -108,7 +105,10 @@ } .label {flex:0 5rem;padding-right:2rem;color:nth($cgr, 1);text-align:right;} - .field {flex:1} + .field {flex:1; + + &.path {border:0;font-size:1.3rem;color:nth($cd, 2)} + } } } diff --git a/src/js/api.js b/src/js/api.js index c734edc..1dba151 100644 --- a/src/js/api.js +++ b/src/js/api.js @@ -106,13 +106,15 @@ export default { }) }, - search(keyword) { + search(keyword, page = 1, pagesize = 20) { return request .get('https://songsearch.kugou.com/song_search_v2') .send({ keyword, platform: 'WebFilter', - tag: '' + tag: '', + page, + pagesize }) .then(res => { if (res.status === 200) { diff --git a/src/js/app.js b/src/js/app.js index 9d4e15e..173009d 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -27,10 +27,8 @@ const path = require('path') const { remote, ipcRenderer } = require('electron') -const { createDesktopLrcWindow, createMiniWindow } = remote.app.windows - const WIN = remote.getCurrentWindow() -const MAIN_SCREEN = remote.screen.getPrimaryDisplay() +const { __LRC__, __MINI__ } = remote.app const PLAY_MODE = { 0: 'all', @@ -49,20 +47,13 @@ let appInit = ipcRenderer.sendSync('get-init') Anot.ss('app-init', appInit) -const LRC_WIN = createDesktopLrcWindow(MAIN_SCREEN) -const MINI_WIN = createMiniWindow(MAIN_SCREEN, WIN) - -// WIN.on('show', _ => { -// MINI_WIN.hide() -// }) - Anot({ $id: 'app', state: { theme: appInit.theme || 1, // 1:macos, 2: deepin winFocus: false, - mod: 'local', - searchTxt: '', + mod: 'search', + searchTxt: '安羽苏', playMode: Anot.ls('play-mode') >>> 0, // 0:all | 1:single | 2:random ktvMode: 0, isPlaying: false, @@ -167,7 +158,7 @@ Anot({ // ktv模式的歌词 LYRICS.on('ktv-lrc', lrc => { this.lrc = lrc - LRC_WIN.emit('ktv-lrc', lrc) + __LRC__.emit('ktv-lrc', lrc) }) // ktv模式的歌词 @@ -212,7 +203,7 @@ Anot({ // 迷你模式开启时, 不响应托盘和dock栏的点击事件 ipcRenderer.on('dock-click', () => { - if (!MINI_WIN.isVisible()) { + if (!__MINI__.isVisible()) { WIN.show() } }) @@ -235,12 +226,12 @@ Anot({ change2mini() { this.optBoxShow = false WIN.hide() - MINI_WIN.show() + __MINI__.show() let song = this.curr.$model if (!this.isPlaying) { delete song.id } - MINI_WIN.emit('mini-init', song) + __MINI__.emit('mini-init', song) }, activeModule(mod) { @@ -266,10 +257,10 @@ Anot({ this.optBoxShow = !this.optBoxShow }, toggleDesktopLrc() { - if (LRC_WIN.isVisible()) { - LRC_WIN.hide() + if (__LRC__.isVisible()) { + __LRC__.hide() } else { - LRC_WIN.showInactive() + __LRC__.showInactive() } }, toggleModule(mod) { @@ -277,14 +268,16 @@ Anot({ return } this.optBoxShow = false + this.__last__ = this.mod this.mod = mod }, // 设置保存 回调 onProfileSaved() { - this.toggleModule('local') + this.toggleModule(this.__last__) appInit = JSON.parse(Anot.ss('app-init')) }, + // 切换循环模式 togglePlayMode() { let mod = this.playMode mod++ @@ -312,13 +305,25 @@ Anot({ searchMusic(ev) { if (ev.keyCode === 13) { - if (this.searchTxt === ':debug:') { + let txt = this.searchTxt.trim() + + if (!txt) { + return + } + + if (txt === ':debug:') { log('----- 调试模式 -----') this.searchTxt = '' WIN.openDevTools() - } else { - layer.toast('搜索功能还未开放') + return } + if (this.mod !== 'search') { + this.toggleModule('search') + } + + Search.search(txt) + this.searchTxt = '' + // layer.toast('搜索功能还未开放') } }, @@ -364,7 +369,7 @@ Anot({ updateCurr(obj) { let old = this.curr.$model this.curr = Object.assign(old, obj) - MINI_WIN.emit('mini-init', this.curr.$model) + __MINI__.emit('mini-init', this.curr.$model) }, play(song) { diff --git a/src/js/modules/ktv.js b/src/js/modules/ktv.js index 706ca4d..06706b6 100644 --- a/src/js/modules/ktv.js +++ b/src/js/modules/ktv.js @@ -35,6 +35,10 @@ export default { toggleLrcView() { this.allLrcView = !this.allLrcView }, + + closeKtvMode() { + this.ktvMode = 0 + }, showLrcSearch() { this.lrcForm.input = `${this.curr.artist} ${this.curr.title}` this.lrcSearchBoxShow = true @@ -43,6 +47,7 @@ export default { closeLrcSearch() { this.lrcSearchBoxShow = false }, + searchLrc(e) { if (e.keyCode === 13) { let { input, __input__ } = this.lrcForm diff --git a/src/js/modules/local.js b/src/js/modules/local.js index 92bd17c..7261e9d 100644 --- a/src/js/modules/local.js +++ b/src/js/modules/local.js @@ -127,6 +127,8 @@ export default Anot({ el.textContent = '重新扫描' el = null + LS.clear(true) + LS.insert(this.__tmp__) LS.sort('artist', true) dbCache = LS.getAll() this.list.clear() @@ -142,7 +144,9 @@ export default Anot({ this.__APP__.loading = false this.__APP__.progress = 0 + delete this.__NEW_NUM__ + delete this.__tmp__ return } @@ -152,12 +156,14 @@ export default Anot({ if (item) { item.path = `file://${song}` delete item.lyrics - LS.update(hash, item) + // 不直接修改数数据库的数据,避免文件被删除时,数据库中的记录还在 + // 先存入临时数组, 最后再统一存入数据库 + this.__tmp__.push(item) return this.__checkSong__(el) } this.__NEW_NUM__++ ID3(song).then(tag => { - LS.insert({ + this.__tmp__.push({ id: hash, title: tag.title, album: tag.album, @@ -176,6 +182,7 @@ export default Anot({ if (appInit.musicPath) { this.__LIST__ = ipcRenderer.sendSync('scan-dir', appInit.musicPath) if (this.__LIST__) { + this.__tmp__ = [] //创建一个临时的数组, 用于存放扫描的音乐 this.__APP__.loading = true this.__WAIT_FOR_SCAN__ = this.__LIST__.length this.__NEW_NUM__ = 0 diff --git a/src/js/modules/search.js b/src/js/modules/search.js index b8f911e..7497cd4 100644 --- a/src/js/modules/search.js +++ b/src/js/modules/search.js @@ -10,14 +10,61 @@ import Api from '/js/api.js' const log = console.log +const dict = {} + export default Anot({ $id: 'search', state: { - filter: 'hot', - list: [] //歌手列表 + curr: '', + history: [], // 搜索历史 + list: [] // 搜索结果列表 }, methods: { __init__() {}, - play() {} + play(it, idx) { + // SONIST.clear() + log(it.hash, it.albumId) + Api.getSongInfoByHash(it.hash, it.albumId).then(json => { + log(json) + }) + }, + delThis(it, ev) { + this.history.remove(it) + delete dict[it.key] + }, + toggleHistory(it) { + this.curr = it.key + this.list.clear() + this.list.pushArray(dict[it.key]) + }, + search(txt) { + if (txt === this.last) { + return + } + + let load = layer.load(1) + this.list.clear() + + let key = Buffer.from(txt).toString('base64') + + this.history.push({ txt, key }) + + this.curr = key + + Api.search(txt, 1, 50).then(list => { + dict[key] = list.map(it => { + return { + title: it.SongName, + artist: it.SingerName, + album: it.AlbumName, + albumId: it.AlbumID, + duration: it.Duration, + hash: it.FileHash + } + }) + layer.close(load) + this.list.pushArray(dict[key]) + }) + } } }) diff --git a/src/main.js b/src/main.js index 5ea3272..2b74124 100644 --- a/src/main.js +++ b/src/main.js @@ -5,7 +5,9 @@ */ 'use strict' -const { app, BrowserWindow, session, protocol } = require('electron') + +const electron = require('electron') +const { app, BrowserWindow, session, protocol } = electron const path = require('path') const fs = require('iofs') const { exec } = require('child_process') @@ -32,7 +34,6 @@ const { createMiniWindow } = require('./tools/windows') -app.windows = { createDesktopLrcWindow, createMiniWindow } const ROOT = __dirname /* ----------------------------------------------------- */ @@ -60,10 +61,16 @@ app.once('ready', () => { // 判断依赖 exec('which ffprobe', (err, res) => { if (res) { + let sp = electron.screen.getPrimaryDisplay() let win = createMainWindow(path.resolve(ROOT, './images/app.png')) + createTray(win) createMenu(win) + app.__MAIN__ = win + app.__LRC__ = createDesktopLrcWindow(sp) + app.__MINI__ = createMiniWindow(sp) + // mac专属事件,点击dock栏图标,可激活窗口 app.on('activate', _ => { if (win) { diff --git a/src/tools/windows.js b/src/tools/windows.js index d940ff4..12929f1 100644 --- a/src/tools/windows.js +++ b/src/tools/windows.js @@ -33,7 +33,7 @@ exports.createMainWindow = function(icon) { win.on('ready-to-show', _ => { win.show() - // win.openDevTools() + win.openDevTools() }) return win @@ -109,7 +109,6 @@ exports.createMiniWindow = function(screen) { } }) - // win.loadURL('http://127.0.0.1:10240/mini-win.html') win.loadURL('app://local/mini-win.html') return win } diff --git a/src/views/ktv.htm b/src/views/ktv.htm index 9682707..9f8430b 100644 --- a/src/views/ktv.htm +++ b/src/views/ktv.htm @@ -37,6 +37,10 @@ + + + +