fix: bugs

This commit is contained in:
qier222 2021-06-09 20:53:33 +08:00
parent e54c606c6d
commit f3076f21b2
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
13 changed files with 32 additions and 36 deletions

View file

@ -137,7 +137,6 @@ import locale from '@/locale';
import { splitSoundtrackAlbumTitle, splitAlbumTitle } from '@/utils/common';
import NProgress from 'nprogress';
import { isAccountLoggedIn } from '@/utils/auth';
import { disableScrolling, enableScrolling } from '@/utils/ui';
import ExplicitSymbol from '@/components/ExplicitSymbol.vue';
import ButtonTwoTone from '@/components/ButtonTwoTone.vue';
@ -279,9 +278,9 @@ export default {
toggleFullDescription() {
this.showFullDescription = !this.showFullDescription;
if (this.showFullDescription) {
disableScrolling();
this.$store.commit('enableScrolling', false);
} else {
enableScrolling();
this.$store.commit('enableScrolling', true);
}
},
openMenu(e) {

View file

@ -184,7 +184,6 @@ import {
} from '@/api/artist';
import locale from '@/locale';
import { isAccountLoggedIn } from '@/utils/auth';
import { disableScrolling, enableScrolling } from '@/utils/ui';
import NProgress from 'nprogress';
import ButtonTwoTone from '@/components/ButtonTwoTone.vue';
@ -330,9 +329,9 @@ export default {
toggleFullDescription() {
this.showFullDescription = !this.showFullDescription;
if (this.showFullDescription) {
disableScrolling();
this.$store.commit('enableScrolling', false);
} else {
enableScrolling();
this.$store.commit('enableScrolling', true);
}
},
openMenu(e) {

View file

@ -204,7 +204,6 @@ import VueSlider from 'vue-slider-component';
import { formatTrackTime } from '@/utils/common';
import { getLyric } from '@/api/track';
import { lyricParser } from '@/utils/lyrics';
import { disableScrolling, enableScrolling } from '@/utils/ui';
import ButtonIcon from '@/components/ButtonIcon.vue';
import * as Vibrant from 'node-vibrant';
import Color from 'color';
@ -295,10 +294,10 @@ export default {
showLyrics(show) {
if (show) {
this.setLyricsInterval();
disableScrolling();
this.$store.commit('enableScrolling', false);
} else {
clearInterval(this.lyricsInterval);
enableScrolling();
this.$store.commit('enableScrolling', true);
}
},
},

View file

@ -231,7 +231,6 @@ import { getTrackDetail } from '@/api/track';
import { isAccountLoggedIn } from '@/utils/auth';
import nativeAlert from '@/utils/nativeAlert';
import locale from '@/locale';
import { disableScrolling, enableScrolling } from '@/utils/ui';
import ButtonTwoTone from '@/components/ButtonTwoTone.vue';
import ContextMenu from '@/components/ContextMenu.vue';
@ -534,9 +533,9 @@ export default {
toggleFullDescription() {
this.showFullDescription = !this.showFullDescription;
if (this.showFullDescription) {
disableScrolling();
this.$store.commit('enableScrolling', false);
} else {
enableScrolling();
this.$store.commit('enableScrolling', true);
}
},
},

View file

@ -445,7 +445,8 @@
:class="{
active:
shortcutInput.id === shortcut.id &&
shortcutInput.type === 'globalShortcut',
shortcutInput.type === 'globalShortcut' &&
enableGlobalShortcut,
}"
@click.stop="
readyToRecordShortcut(shortcut.id, 'globalShortcut')
@ -927,6 +928,9 @@ export default {
return shortcut.replace('CommandOrControl', 'Ctrl');
},
readyToRecordShortcut(id, type) {
if (type === 'globalShortcut' && this.enableGlobalShortcut === false) {
return;
}
this.shortcutInput = { id, type, recording: true };
this.recordedShortcut = [];
ipcRenderer.send('switchGlobalShortcutStatusTemporary', 'disable');