mirror of
https://github.com/qier222/YesPlayMusic.git
synced 2024-11-22 08:26:34 +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;
|
||||
-webkit-user-select: none;
|
||||
-webkit-app-region: drag;
|
||||
background: rgba(0, 0, 0, 0.000);
|
||||
}
|
||||
|
||||
div {
|
||||
|
@ -25,7 +26,7 @@
|
|||
</style>
|
||||
<title>OSD Lyrics</title>
|
||||
<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 player_api = window.location.origin + "/player";
|
||||
const lyrics_api = window.location.origin + "/api/lyric?id=";
|
||||
|
|
|
@ -96,11 +96,8 @@
|
|||
<div class="blank"></div>
|
||||
<div class="container" @click.stop>
|
||||
<button-icon
|
||||
v-if="osdState"
|
||||
:title="$t('player.osdlyrics')"
|
||||
:class="{
|
||||
active: osdState,
|
||||
disabled: !osdState,
|
||||
}"
|
||||
@click.native="toggleOSDLyrics"
|
||||
><svg-icon icon-class="osd-lyrics"
|
||||
/></button-icon>
|
||||
|
@ -215,7 +212,7 @@ export default {
|
|||
: '';
|
||||
},
|
||||
osdState() {
|
||||
return true; //this.$store.osdlyrics.show || false;
|
||||
return Boolean(ipcRenderer);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
|
Loading…
Reference in New Issue
Block a user