mirror of
https://github.com/qier222/YesPlayMusic.git
synced 2024-11-22 14:20:50 +08:00
fix: 当部署到服务器上时,不显示桌面歌词切换图标 (#689)
* Add OSD Lyrics * tidy files * fix OSDLyrics: last line of lyrics not showing, performance * tidy files * make user can resize the lyrics window * Fix bug of initial window size * Fix: 1. auto resize osdlyrics window after packaging; 2. lyric parser problem with %; * tidy files * hide osdlyrics button if not in electron * tidy files
This commit is contained in:
parent
2d712eefe1
commit
427806b0d7
|
@ -14,6 +14,7 @@
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
-webkit-app-region: drag;
|
-webkit-app-region: drag;
|
||||||
|
background: rgba(0, 0, 0, 0.000);
|
||||||
}
|
}
|
||||||
|
|
||||||
div {
|
div {
|
||||||
|
@ -25,7 +26,7 @@
|
||||||
</style>
|
</style>
|
||||||
<title>OSD Lyrics</title>
|
<title>OSD Lyrics</title>
|
||||||
<script>
|
<script>
|
||||||
const electron = process && process.versions && process.versions.hasOwnProperty('electron') ? window.require('electron') : null;
|
const electron = (typeof navigator === 'object' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Electron') >= 0) ? window.require('electron') : null;
|
||||||
const ipcRenderer = electron ? electron.ipcRenderer : null;
|
const ipcRenderer = electron ? electron.ipcRenderer : null;
|
||||||
const player_api = window.location.origin + "/player";
|
const player_api = window.location.origin + "/player";
|
||||||
const lyrics_api = window.location.origin + "/api/lyric?id=";
|
const lyrics_api = window.location.origin + "/api/lyric?id=";
|
||||||
|
|
|
@ -96,11 +96,8 @@
|
||||||
<div class="blank"></div>
|
<div class="blank"></div>
|
||||||
<div class="container" @click.stop>
|
<div class="container" @click.stop>
|
||||||
<button-icon
|
<button-icon
|
||||||
|
v-if="osdState"
|
||||||
:title="$t('player.osdlyrics')"
|
:title="$t('player.osdlyrics')"
|
||||||
:class="{
|
|
||||||
active: osdState,
|
|
||||||
disabled: !osdState,
|
|
||||||
}"
|
|
||||||
@click.native="toggleOSDLyrics"
|
@click.native="toggleOSDLyrics"
|
||||||
><svg-icon icon-class="osd-lyrics"
|
><svg-icon icon-class="osd-lyrics"
|
||||||
/></button-icon>
|
/></button-icon>
|
||||||
|
@ -215,7 +212,7 @@ export default {
|
||||||
: '';
|
: '';
|
||||||
},
|
},
|
||||||
osdState() {
|
osdState() {
|
||||||
return true; //this.$store.osdlyrics.show || false;
|
return Boolean(ipcRenderer);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user