新增快捷键设置
This commit is contained in:
@@ -18,18 +18,18 @@ div(:class="$style.aside")
|
||||
dd
|
||||
router-link(:active-class="$style.active" to="search" :title="$t('core.aside.search')")
|
||||
div(:class="$style.icon")
|
||||
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' viewBox='0 0 801.99 811.98' space='preserve')
|
||||
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' viewBox='0 0 425.2 425.2' space='preserve')
|
||||
use(xlink:href='#icon-search-2')
|
||||
dd
|
||||
router-link(:active-class="$style.active" to="songList" :title="$t('core.aside.song_list')")
|
||||
div(:class="$style.icon")
|
||||
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' viewBox='0 0 739.96 763.59' space='preserve')
|
||||
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' viewBox='0 0 425.2 425.2' space='preserve')
|
||||
use(xlink:href='#icon-album')
|
||||
//- span {{$t('core.aside.song_list')}}
|
||||
dd
|
||||
router-link(:active-class="$style.active" to="leaderboard" :title="$t('core.aside.leaderboard')")
|
||||
div(:class="$style.icon")
|
||||
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' viewBox='0 0 819.1 819.38' space='preserve')
|
||||
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' viewBox='0 0 425.22 425.2' space='preserve')
|
||||
use(xlink:href='#icon-leaderboard')
|
||||
//- span {{$t('core.aside.leaderboard')}}
|
||||
dl
|
||||
@@ -37,20 +37,20 @@ div(:class="$style.aside")
|
||||
dd
|
||||
router-link(:active-class="$style.active" :title="$t('core.aside.my_list')" :to="`list?id=${setting.list.prevSelectListId || defaultList.id}`")
|
||||
div(:class="$style.icon")
|
||||
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' viewBox='0 0 830.33 740.22' space='preserve')
|
||||
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' viewBox='0 0 459.39 388.44' space='preserve')
|
||||
use(xlink:href='#icon-love')
|
||||
dl
|
||||
//- dt {{$t('core.aside.other')}}
|
||||
dd
|
||||
router-link(:active-class="$style.active" to="download" :title="$t('core.aside.download')")
|
||||
div(:class="$style.icon")
|
||||
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' viewBox='0 0 798.85 718.96' space='preserve')
|
||||
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' viewBox='0 0 425.2 425.2' space='preserve')
|
||||
use(xlink:href='#icon-download-2')
|
||||
//- span {{$t('core.aside.download')}}
|
||||
dd
|
||||
router-link(:active-class="$style.active" to="setting" :title="$t('core.aside.setting')")
|
||||
div(:class="$style.icon")
|
||||
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' viewBox='0 0 854.85 775.41' space='preserve')
|
||||
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' viewBox='0 0 493.23 436.47' space='preserve')
|
||||
use(xlink:href='#icon-setting')
|
||||
//- span {{$t('core.aside.setting')}}
|
||||
</template>
|
||||
@@ -222,6 +222,7 @@ export default {
|
||||
cursor: pointer;
|
||||
font-size: 11.5px;
|
||||
text-align: center;
|
||||
outline: none;
|
||||
|
||||
transition: background-color 0.3s ease;
|
||||
// border-radius: @radius-border;
|
||||
@@ -257,6 +258,8 @@ each(@themes, {
|
||||
}
|
||||
.controlBtn {
|
||||
button {
|
||||
color: ~'@{color-@{value}-theme_2}';
|
||||
|
||||
&.min {
|
||||
background-color: ~'@{color-@{value}-minBtn}';
|
||||
}
|
||||
|
||||
@@ -83,27 +83,48 @@ svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/19
|
||||
|
||||
g#icon-search-2(fill='currentColor')
|
||||
// 0 0 801.99 811.98
|
||||
path(d='M785.86,731.78,676.95,622.87c-20.06-20.06-51-21.64-68.61-3.31-17.16,17.91-14.55,48.28,5.15,68L721.79,795.85c19.86,19.86,50.31,21.62,68,3.93h0C807.48,782.09,805.72,751.65,785.86,731.78Z')
|
||||
path(d='M702.07,351c0-193.87-157.16-351-351-351S0,157.16,0,351s157.16,351,351,351S702.07,544.91,702.07,351ZM351,611.46C207.21,611.46,90.61,494.86,90.61,351S207.21,90.61,351,90.61,611.46,207.21,611.46,351,494.86,611.46,351,611.46Z')
|
||||
//- path(d='M785.86,731.78,676.95,622.87c-20.06-20.06-51-21.64-68.61-3.31-17.16,17.91-14.55,48.28,5.15,68L721.79,795.85c19.86,19.86,50.31,21.62,68,3.93h0C807.48,782.09,805.72,751.65,785.86,731.78Z')
|
||||
//- path(d='M702.07,351c0-193.87-157.16-351-351-351S0,157.16,0,351s157.16,351,351,351S702.07,544.91,702.07,351ZM351,611.46C207.21,611.46,90.61,494.86,90.61,351S207.21,90.61,351,90.61,611.46,207.21,611.46,351,494.86,611.46,351,611.46Z')
|
||||
|
||||
//- 0 0 425.2 425.2
|
||||
path(d='M308.92,54.32a180,180,0,1,0-3.16,254.6A179.48,179.48,0,0,0,308.92,54.32Zm-31.09,226A140,140,0,1,1,180,40h0a140,140,0,0,1,97.79,240.29Z')
|
||||
path(d='M418.23,385.7,352,317.7a23,23,0,1,0-32.93,32.12l66.66,68.44A22.9,22.9,0,0,0,404.89,425a22.65,22.65,0,0,0,11.37-4.64,22.92,22.92,0,0,0,8.94-18.47A23.81,23.81,0,0,0,418.23,385.7Z')
|
||||
|
||||
g#icon-album(fill='currentColor')
|
||||
// 0 0 739.96 763.59
|
||||
path(d='M392.64,445.47a86.07,86.07,0,1,1-86.07,86.07,86.07,86.07,0,0,1,86.07-86.07Zm0,57.38a28.69,28.69,0,1,0,28.69,28.69,28.69,28.69,0,0,0-28.69-28.69Zm0,0')
|
||||
path(d='M478.71,371.28l37.1,37.1a28.69,28.69,0,0,0,40.57-40.57l-86.07-86.07c-18.08-18.08-49-5.28-49,20.28V531.54a28.69,28.69,0,0,0,57.38,0Zm0,0')
|
||||
path(d='M679.17,39.27A39.32,39.32,0,0,0,639.9,0H39.27A39.32,39.32,0,0,0,0,39.27V657.59a39.27,39.27,0,1,0,78.54,0v-579H639.9A39.32,39.32,0,0,0,679.17,39.27Z')
|
||||
path(d='M700.69,136.32,398,136.25a39.27,39.27,0,0,0-39.3,39.27v0a39.27,39.27,0,0,0,39.24,39.27l263.47.05V685l-440.35-.35V440.26A39.27,39.27,0,0,0,181.79,401h0a39.27,39.27,0,0,0-39.27,39.27V724a39.32,39.32,0,0,0,39.27,39.27l518.89.35A39.32,39.32,0,0,0,740,724.32V175.59A39.32,39.32,0,0,0,700.69,136.32Z')
|
||||
//- path(d='M392.64,445.47a86.07,86.07,0,1,1-86.07,86.07,86.07,86.07,0,0,1,86.07-86.07Zm0,57.38a28.69,28.69,0,1,0,28.69,28.69,28.69,28.69,0,0,0-28.69-28.69Zm0,0')
|
||||
//- path(d='M478.71,371.28l37.1,37.1a28.69,28.69,0,0,0,40.57-40.57l-86.07-86.07c-18.08-18.08-49-5.28-49,20.28V531.54a28.69,28.69,0,0,0,57.38,0Zm0,0')
|
||||
//- path(d='M679.17,39.27A39.32,39.32,0,0,0,639.9,0H39.27A39.32,39.32,0,0,0,0,39.27V657.59a39.27,39.27,0,1,0,78.54,0v-579H639.9A39.32,39.32,0,0,0,679.17,39.27Z')
|
||||
//- path(d='M700.69,136.32,398,136.25a39.27,39.27,0,0,0-39.3,39.27v0a39.27,39.27,0,0,0,39.24,39.27l263.47.05V685l-440.35-.35V440.26A39.27,39.27,0,0,0,181.79,401h0a39.27,39.27,0,0,0-39.27,39.27V724a39.32,39.32,0,0,0,39.27,39.27l518.89.35A39.32,39.32,0,0,0,740,724.32V175.59A39.32,39.32,0,0,0,700.69,136.32Z')
|
||||
|
||||
// 0 0 425.2 425.2
|
||||
path(d='M20,371.91a20,20,0,0,1-20-20V20A20,20,0,0,1,20,0H333.91a20,20,0,0,1,0,40H40V351.91A20,20,0,0,1,20,371.91Z')
|
||||
path(d='M405.2,425.2h-306a20,20,0,0,1-20-20V258a20,20,0,0,1,40,0V385.2h266V122h-214a20,20,0,1,1,0-40h234a20,20,0,0,1,20,20V405.2A20,20,0,0,1,405.2,425.2Z')
|
||||
path(d='M259,326.69a18,18,0,0,1-18-18V165A18,18,0,0,1,277,165v143.6A18,18,0,0,1,259,326.69Z')
|
||||
path(d='M317.24,241.35a18,18,0,0,1-12.76-5.29l-58.26-58.26a18,18,0,0,1,25.52-25.52L330,210.55a18,18,0,0,1-12.76,30.81Z')
|
||||
path(d='M223.08,360.18A53.95,53.95,0,1,1,277,306.23,54,54,0,0,1,223.08,360.18Zm0-71.8a17.85,17.85,0,1,0,17.85,17.85A17.87,17.87,0,0,0,223.08,288.38Z')
|
||||
|
||||
g#icon-leaderboard(fill='currentColor')
|
||||
// 0 0 805.65 805.58
|
||||
path(d='M757.71,709.68h-709C22.35,709.68.5,730.77,0,756.7a48,48,0,0,0,47.94,48.87H757.71a47.95,47.95,0,0,0,0-95.9Z')
|
||||
path(d='M106.33,628.24a48,48,0,0,0,47.95-47.95V304.72c0-26.37-21.09-48.22-47-48.71a48,48,0,0,0-48.87,47.94V580.3A48,48,0,0,0,106.33,628.24Z')
|
||||
path(d='M402.83,628.24a48,48,0,0,0,47.95-47.95V180.72c0-26.37-21.09-48.22-47-48.71a48,48,0,0,0-48.87,47.94V580.3A48,48,0,0,0,402.83,628.24Z')
|
||||
path(d='M699.33,628.24a48,48,0,0,0,47.95-47.95V48.72c0-26.37-21.09-48.22-47-48.71a48,48,0,0,0-48.87,47.94V580.3A48,48,0,0,0,699.33,628.24Z')
|
||||
//- path(d='M757.71,709.68h-709C22.35,709.68.5,730.77,0,756.7a48,48,0,0,0,47.94,48.87H757.71a47.95,47.95,0,0,0,0-95.9Z')
|
||||
//- path(d='M106.33,628.24a48,48,0,0,0,47.95-47.95V304.72c0-26.37-21.09-48.22-47-48.71a48,48,0,0,0-48.87,47.94V580.3A48,48,0,0,0,106.33,628.24Z')
|
||||
//- path(d='M402.83,628.24a48,48,0,0,0,47.95-47.95V180.72c0-26.37-21.09-48.22-47-48.71a48,48,0,0,0-48.87,47.94V580.3A48,48,0,0,0,402.83,628.24Z')
|
||||
//- path(d='M699.33,628.24a48,48,0,0,0,47.95-47.95V48.72c0-26.37-21.09-48.22-47-48.71a48,48,0,0,0-48.87,47.94V580.3A48,48,0,0,0,699.33,628.24Z')
|
||||
|
||||
//- 0 0 425.22 425.2
|
||||
path(d='M402.08,379.18H23a23,23,0,0,0,0,46H402.08a23,23,0,0,0,0-46Z')
|
||||
path(d='M386.61,352.51a23,23,0,0,0,23-23V23a23,23,0,1,0-46,0V329.5A23,23,0,0,0,386.61,352.51Z')
|
||||
path(d='M212.49,352.51a23,23,0,0,0,23-23V119.86a23,23,0,1,0-46,0V329.5A23,23,0,0,0,212.49,352.51Z')
|
||||
path(d='M38.37,352.51a23,23,0,0,0,23-23V191.81a23,23,0,1,0-46,0V329.5A23,23,0,0,0,38.37,352.51Z')
|
||||
|
||||
|
||||
g#icon-love(fill='currentColor')
|
||||
// 0 0 830.33 740.22
|
||||
path(d='M757.65,76.15A246,246,0,0,0,583.23,3h-1.16A245.74,245.74,0,0,0,416.81,66.39,247.78,247.78,0,0,0,184.66,8.28C98.6,31.19,31,99.18,8.22,185.72a251.29,251.29,0,0,0,47.27,221.2h-1.9L362.54,717.68a75.82,75.82,0,0,0,54.12,22.54h0a75.84,75.84,0,0,0,54.13-22.54l288.37-290.1.08-.08a250.61,250.61,0,0,0-1.59-351.36Zm-58,290-283,284.67L133.78,366.29c-63.11-64.54-62.68-169.12,1-233.14a164.18,164.18,0,0,1,231.5-1l50.41,50.66,50.41-50.66.08-.08a164.08,164.08,0,0,1,276.16,73.66A166.52,166.52,0,0,1,699.65,366.15Z')
|
||||
//- path(d='M757.65,76.15A246,246,0,0,0,583.23,3h-1.16A245.74,245.74,0,0,0,416.81,66.39,247.78,247.78,0,0,0,184.66,8.28C98.6,31.19,31,99.18,8.22,185.72a251.29,251.29,0,0,0,47.27,221.2h-1.9L362.54,717.68a75.82,75.82,0,0,0,54.12,22.54h0a75.84,75.84,0,0,0,54.13-22.54l288.37-290.1.08-.08a250.61,250.61,0,0,0-1.59-351.36Zm-58,290-283,284.67L133.78,366.29c-63.11-64.54-62.68-169.12,1-233.14a164.18,164.18,0,0,1,231.5-1l50.41,50.66,50.41-50.66.08-.08a164.08,164.08,0,0,1,276.16,73.66A166.52,166.52,0,0,1,699.65,366.15Z')
|
||||
|
||||
//- 0 0 459.39 388.44
|
||||
path(d='M229.63,388.44a20,20,0,0,1-10.54-3l-.15-.09c-14.6-7.76-127.16-69.14-187-146.92A153.82,153.82,0,0,1,1.5,123.56,145.67,145.67,0,0,1,60,25.67C96.54-1,139.56-7,184.43,8.27A194.15,194.15,0,0,1,229.7,31,194.15,194.15,0,0,1,275,8.27C319.84-7,362.85-1,399.37,25.67a145.66,145.66,0,0,1,58.53,97.89,153.81,153.81,0,0,1-30.4,114.87c-60.23,78.22-173.73,139.85-187.29,147a19.94,19.94,0,0,1-8.11,2.81A20.22,20.22,0,0,1,229.63,388.44ZM137.12,40.08c-17.13,0-35.5,4.73-53.49,17.88A106,106,0,0,0,41.1,129.21,113.59,113.59,0,0,0,63.59,214c48.69,63.23,137.31,115.61,166.11,131.64,28.8-16,117.42-68.41,166.11-131.64a113.59,113.59,0,0,0,22.49-84.82A106,106,0,0,0,375.76,58C313,12.08,245.54,68.69,242.7,71.12a20,20,0,0,1-26,0C214.66,69.39,179.75,40.08,137.12,40.08Z')
|
||||
|
||||
|
||||
//- g#icon-download-2(fill='currentColor')
|
||||
//- // 0 0 512 512
|
||||
@@ -112,14 +133,22 @@ svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/19
|
||||
|
||||
g#icon-download-2(fill='currentColor')
|
||||
// 0 0 798.85 718.96
|
||||
path(d='M755.47,343.91h0a43.37,43.37,0,0,0-43.37,43.37V632.21l-625.35-.38V387.28a43.37,43.37,0,0,0-43.37-43.37h0A43.37,43.37,0,0,0,0,387.28V675.2a43.42,43.42,0,0,0,43.37,43.37l712.1.39a43.42,43.42,0,0,0,43.37-43.37V387.28A43.37,43.37,0,0,0,755.47,343.91Z')
|
||||
path(d='M367.06,478.66a45.48,45.48,0,0,0,64.24,0L594.72,315.47a45.43,45.43,0,0,0,0-64.27h0a45.43,45.43,0,0,0-64.23,0l-85,84.87V45.95a45.95,45.95,0,0,0-91.9,0V336.68l-85.24-85.24a45.43,45.43,0,0,0-64.25,64.25Z')
|
||||
//- path(d='M755.47,343.91h0a43.37,43.37,0,0,0-43.37,43.37V632.21l-625.35-.38V387.28a43.37,43.37,0,0,0-43.37-43.37h0A43.37,43.37,0,0,0,0,387.28V675.2a43.42,43.42,0,0,0,43.37,43.37l712.1.39a43.42,43.42,0,0,0,43.37-43.37V387.28A43.37,43.37,0,0,0,755.47,343.91Z')
|
||||
//- path(d='M367.06,478.66a45.48,45.48,0,0,0,64.24,0L594.72,315.47a45.43,45.43,0,0,0,0-64.27h0a45.43,45.43,0,0,0-64.23,0l-85,84.87V45.95a45.95,45.95,0,0,0-91.9,0V336.68l-85.24-85.24a45.43,45.43,0,0,0-64.25,64.25Z')
|
||||
|
||||
//- 0 0 425.2 425.2
|
||||
path(d='M404.75,425.2H20.44A20.58,20.58,0,0,1,0,404.48V232.37a20.58,20.58,0,0,1,20.44-20.72,20.58,20.58,0,0,1,20.44,20.72V383.77H384.31V232a20.44,20.44,0,1,1,40.89,0V404.48a20.86,20.86,0,0,1-6,14.65A20.3,20.3,0,0,1,404.75,425.2Z')
|
||||
path(d='M212.6,242a19.63,19.63,0,0,1-19.49-19.75V19.75a19.5,19.5,0,1,1,39,0V222.21A19.63,19.63,0,0,1,212.6,242Z')
|
||||
path(d='M212.6,273.61a21.39,21.39,0,0,1-14.94-6.05l-80.29-77.44a19.94,19.94,0,0,1-.68-27.93,19.32,19.32,0,0,1,27.56-.69l68.34,65.92,68.34-65.92a19.32,19.32,0,0,1,27.56.69,19.94,19.94,0,0,1-.68,27.93l-80.3,77.45A21.4,21.4,0,0,1,212.6,273.61Zm11.94-34.68,0,0Z')
|
||||
|
||||
g#icon-setting(fill='currentColor')
|
||||
//- 0 0 821.28 734.37
|
||||
path.cls-1(d='M410.4,513.59a145.48,145.48,0,0,1-73.28-19.87c-69.77-40.54-93.55-130.29-53-200.06a146.35,146.35,0,1,1,253.07,147h0a145.39,145.39,0,0,1-89.05,67.94A147.22,147.22,0,0,1,410.4,513.59Zm.38-230.7a84.75,84.75,0,0,0-21.72,2.85,84.26,84.26,0,1,0,94.43,123.78h0a84.31,84.31,0,0,0-72.71-126.62Z')
|
||||
path.cls-1(d='M573,734.37H248.32a86.27,86.27,0,0,1-74.5-43L11.49,410.2a86.27,86.27,0,0,1,0-86L173.81,43a86.27,86.27,0,0,1,74.5-43H573a86.27,86.27,0,0,1,74.5,43L809.79,324.17a86.27,86.27,0,0,1,0,86L647.47,691.35A86.27,86.27,0,0,1,573,734.37ZM248.32,74.51a11.55,11.55,0,0,0-10,5.76L76,361.42a11.56,11.56,0,0,0,0,11.52L238.34,654.1a11.56,11.56,0,0,0,10,5.76H573a11.55,11.55,0,0,0,10-5.76L745.27,372.94a11.55,11.55,0,0,0,0-11.52L582.94,80.27a11.56,11.56,0,0,0-10-5.76Z')
|
||||
//- path(d='M410.4,513.59a145.48,145.48,0,0,1-73.28-19.87c-69.77-40.54-93.55-130.29-53-200.06a146.35,146.35,0,1,1,253.07,147h0a145.39,145.39,0,0,1-89.05,67.94A147.22,147.22,0,0,1,410.4,513.59Zm.38-230.7a84.75,84.75,0,0,0-21.72,2.85,84.26,84.26,0,1,0,94.43,123.78h0a84.31,84.31,0,0,0-72.71-126.62Z')
|
||||
//- path(d='M573,734.37H248.32a86.27,86.27,0,0,1-74.5-43L11.49,410.2a86.27,86.27,0,0,1,0-86L173.81,43a86.27,86.27,0,0,1,74.5-43H573a86.27,86.27,0,0,1,74.5,43L809.79,324.17a86.27,86.27,0,0,1,0,86L647.47,691.35A86.27,86.27,0,0,1,573,734.37ZM248.32,74.51a11.55,11.55,0,0,0-10,5.76L76,361.42a11.56,11.56,0,0,0,0,11.52L238.34,654.1a11.56,11.56,0,0,0,10,5.76H573a11.55,11.55,0,0,0,10-5.76L745.27,372.94a11.55,11.55,0,0,0,0-11.52L582.94,80.27a11.56,11.56,0,0,0-10-5.76Z')
|
||||
|
||||
//- 0 0 497.23 440.47
|
||||
path(d='M246.61,312.89a94.65,94.65,0,1,1,94.65-94.65A94.76,94.76,0,0,1,246.61,312.89Zm0-149.53a54.88,54.88,0,1,0,54.88,54.88A54.94,54.94,0,0,0,246.61,163.36Z')
|
||||
path(d='M352.58,436.47H140.65a34.8,34.8,0,0,1-30.05-17.35L4.63,235.59a34.8,34.8,0,0,1,0-34.7l106-183.54A34.8,34.8,0,0,1,140.65,0H352.58a34.8,34.8,0,0,1,30.05,17.35l106,183.54a34.8,34.8,0,0,1,0,34.7l-106,183.54A34.8,34.8,0,0,1,352.58,436.47Zm-209-39.77H349.65l103-178.46-103-178.46H143.58l-103,178.46Zm209-356.93h0Z')
|
||||
|
||||
g#icon-list-add(fill='currentColor')
|
||||
//- 0 0 24 24
|
||||
|
||||
@@ -60,6 +60,7 @@ import { formatPlayTime2, getRandom, checkPath, setTitle, clipboardWriteText, de
|
||||
import { mapGetters, mapActions, mapMutations } from 'vuex'
|
||||
import { requestMsg } from '../../utils/message'
|
||||
import { isMac } from '../../../common/utils'
|
||||
import { player as eventPlayerNames } from '../../../common/hotKey'
|
||||
import path from 'path'
|
||||
|
||||
let audio
|
||||
@@ -172,6 +173,7 @@ export default {
|
||||
document.removeEventListener('mousemove', this.handleVolumeMsMove)
|
||||
document.removeEventListener('mouseup', this.handleVolumeMsUp)
|
||||
window.removeEventListener('resize', this.handleResize)
|
||||
this.handleRegisterEvent('off')
|
||||
},
|
||||
watch: {
|
||||
changePlay(n) {
|
||||
@@ -186,6 +188,9 @@ export default {
|
||||
'setting.player.togglePlayMethod'(n) {
|
||||
audio.loop = n === 'singleLoop'
|
||||
},
|
||||
'setting.player.isMute'(n) {
|
||||
audio.muted = n
|
||||
},
|
||||
'setting.player.mediaDeviceId'(n) {
|
||||
this.setMediaDevice()
|
||||
},
|
||||
@@ -230,6 +235,16 @@ export default {
|
||||
...mapMutations(['setVolume']),
|
||||
...mapMutations('list', ['updateMusicInfo']),
|
||||
...mapMutations(['setMediaDeviceId']),
|
||||
handleRegisterEvent(action) {
|
||||
let eventHub = window.eventHub
|
||||
let name = action == 'on' ? '$on' : '$off'
|
||||
eventHub[name](eventPlayerNames.toggle_play.action, this.togglePlay)
|
||||
eventHub[name](eventPlayerNames.next.action, this.handleNext)
|
||||
eventHub[name](eventPlayerNames.prev.action, this.handlePrev)
|
||||
eventHub[name](eventPlayerNames.volume_up.action, this.handleSetVolumeUp)
|
||||
eventHub[name](eventPlayerNames.volume_down.action, this.handleSetVolumeDown)
|
||||
eventHub[name](eventPlayerNames.volume_mute.action, this.handleSetVolumeMute)
|
||||
},
|
||||
init() {
|
||||
audio = new window.Audio()
|
||||
this.setMediaDevice()
|
||||
@@ -238,6 +253,7 @@ export default {
|
||||
audio.autoplay = true
|
||||
audio.preload = 'auto'
|
||||
audio.loop = this.setting.player.togglePlayMethod === 'singleLoop'
|
||||
audio.muted = this.setting.player.isMute
|
||||
|
||||
audio.addEventListener('playing', () => {
|
||||
console.log('开始播放')
|
||||
@@ -258,7 +274,7 @@ export default {
|
||||
this.handleNext()
|
||||
})
|
||||
audio.addEventListener('error', () => {
|
||||
// console.log('code', audio.error.code)
|
||||
// console.log('code', audio.error)
|
||||
if (!this.musicInfo.songmid) return
|
||||
console.log('出错')
|
||||
this.stopPlay()
|
||||
@@ -339,6 +355,8 @@ export default {
|
||||
},
|
||||
offset: 100,
|
||||
})
|
||||
|
||||
this.handleRegisterEvent('on')
|
||||
},
|
||||
async play() {
|
||||
console.log('play', this.playIndex)
|
||||
@@ -606,10 +624,17 @@ export default {
|
||||
},
|
||||
handleVolumeMsMove(e) {
|
||||
if (!this.volumeEvent.isMsDown) return
|
||||
let val = this.volumeEvent.msDownVolume + (e.clientX - this.volumeEvent.msDownX) / 70
|
||||
this.volume = val < 0 ? 0 : val > 1 ? 1 : val
|
||||
this.handleSetVolume(this.volumeEvent.msDownVolume + (e.clientX - this.volumeEvent.msDownX) / 70)
|
||||
},
|
||||
handleSetVolumeUp(step = 0.02) {
|
||||
this.handleSetVolume(this.volume + step)
|
||||
},
|
||||
handleSetVolumeDown(step = 0.02) {
|
||||
this.handleSetVolume(this.volume - step)
|
||||
},
|
||||
handleSetVolume(num) {
|
||||
this.volume = num < 0 ? 0 : num > 1 ? 1 : num
|
||||
if (audio) audio.volume = this.volume
|
||||
// console.log(val)
|
||||
},
|
||||
handleCopy(text) {
|
||||
clipboardWriteText(text)
|
||||
|
||||
@@ -333,7 +333,7 @@ export default {
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: #fff;
|
||||
background-color: @color-theme_2-background_1;
|
||||
z-index: 10;
|
||||
// -webkit-app-region: drag;
|
||||
overflow: hidden;
|
||||
@@ -489,7 +489,7 @@ export default {
|
||||
content: ' ';
|
||||
height: 100px;
|
||||
width: 100%;
|
||||
background-image: linear-gradient(0deg,rgba(255,255,255,0) 0%,#fff 95%);
|
||||
background-image: linear-gradient(0deg,rgba(255,255,255,0) 0%,@color-theme_2-background_1 95%);
|
||||
pointer-events: none;
|
||||
}
|
||||
&:after {
|
||||
@@ -499,7 +499,7 @@ export default {
|
||||
content: ' ';
|
||||
height: 100px;
|
||||
width: 100%;
|
||||
background-image: linear-gradient(-180deg,rgba(255,255,255,0) 0%,#fff 95%);
|
||||
background-image: linear-gradient(-180deg,rgba(255,255,255,0) 0%,@color-theme_2-background_1 95%);
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
@@ -645,6 +645,15 @@ each(@themes, {
|
||||
:global(#container.@{value}) {
|
||||
.container {
|
||||
border-left-color: ~'@{color-@{value}-theme}';
|
||||
background-color: ~'@{color-@{value}-theme_2-background_1}';
|
||||
}
|
||||
.right {
|
||||
&:before {
|
||||
background-image: linear-gradient(0deg,rgba(255,255,255,0) 0%,~'@{color-@{value}-theme_2-background_1}' 95%);
|
||||
}
|
||||
&:after {
|
||||
background-image: linear-gradient(-180deg,rgba(255,255,255,0) 0%,~'@{color-@{value}-theme_2-background_1}' 95%);
|
||||
}
|
||||
}
|
||||
.control {
|
||||
button {
|
||||
|
||||
@@ -220,6 +220,8 @@ each(@themes, {
|
||||
:global(#container.@{value}) {
|
||||
.control {
|
||||
button {
|
||||
color: ~'@{color-@{value}-theme_2}';
|
||||
|
||||
&.min {
|
||||
background-color: ~'@{color-@{value}-minBtn}';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user