Skip to content

Commit

Permalink
🐞 fix: 修复快捷键错误 #264
Browse files Browse the repository at this point in the history
  • Loading branch information
imsyy committed Sep 29, 2024
1 parent 0e0bde8 commit 528f9b0
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 24 deletions.
3 changes: 3 additions & 0 deletions src/components/Global/Provider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ const changeGlobalTheme = () => {
railColor: `rgba(${colorSchemes.primary}, 0.2)`,
railColorHover: `rgba(${colorSchemes.primary}, 0.3)`,
},
Popover: {
color: `rgb(${colorSchemes["surface-container"]})`,
},
};
} catch (error) {
themeOverrides.value = {};
Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal/UpdateApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const startDownload = async () => {
window.electron.ipcRenderer.send("start-download-update");
// 监听状态
window.electron.ipcRenderer.on("download-progress", (_, progress) => {
downloadProgress.value = Number(progress);
downloadProgress.value = Number(progress?.percent || 0);
});
// 更新错误
window.electron.ipcRenderer.on("update-error", (_, error) => {
Expand Down
32 changes: 16 additions & 16 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ const router: Router = createRouter({
history: createWebHashHistory(import.meta.env.BASE_URL),
routes,
// 保留滚动
scrollBehavior(to, _, savedPosition) {
if (savedPosition) {
return new Promise((resolve) => {
setTimeout(() => {
resolve(savedPosition);
}, 300);
});
} else if (to.hash) {
return {
el: to.hash,
behavior: "smooth",
};
} else {
return { top: 0, left: 0, behavior: "smooth" };
}
},
// scrollBehavior(to, _, savedPosition) {
// if (savedPosition) {
// return new Promise((resolve) => {
// setTimeout(() => {
// resolve(savedPosition);
// }, 300);
// });
// } else if (to.hash) {
// return {
// el: to.hash,
// behavior: "smooth",
// };
// } else {
// return { top: 0, left: 0, behavior: "smooth" };
// }
// },
});

// 前置守卫
Expand Down
4 changes: 2 additions & 2 deletions src/utils/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ const keyDownEvent = debounce((event: KeyboardEvent) => {
player.playOrPause();
break;
case "playPrev":
player.nextOrPrev("next");
player.nextOrPrev("prev");
break;
case "playNext":
player.nextOrPrev("prev");
player.nextOrPrev("next");
break;
case "volumeUp":
player.setVolume("up");
Expand Down
5 changes: 0 additions & 5 deletions src/views/Home/HomeOnline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@
<n-text>{{ item.name }}</n-text>
<SvgIcon v-if="item.path" :size="26" name="Right" />
</n-h3>
<!-- <n-button :focusable="false" quaternary circle>
<template #icon>
<SvgIcon name="Refresh" />
</template>
</n-button> -->
</n-flex>
<!-- 列表 -->
<ArtistList v-if="item.type === 'artist'" :data="item.list" :loading="true" />
Expand Down

0 comments on commit 528f9b0

Please sign in to comment.