Skip to content

Commit

Permalink
🌈 style: 修改部分播放样式 #290
Browse files Browse the repository at this point in the history
  • Loading branch information
imsyy committed Dec 2, 2024
1 parent 6f93d65 commit 432fa18
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion electron/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class MainProcess {
app.on("ready", async () => {
log.info("🚀 Application Process Startup");
// 设置应用程序名称
electronApp.setAppUserModelId(app.getName());
electronApp.setAppUserModelId("com.imsyy.splayer");
// 初始化 store
this.store = initStore();
// 启动主服务进程
Expand Down
31 changes: 17 additions & 14 deletions src/components/Player/FullPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,31 +66,22 @@
<!-- 封面 -->
<PlayerCover />
<!-- 数据 -->
<PlayerData
v-if="settingStore.playerType === 'cover' || !musicStore.isHasLrc || isShowComment"
:center="
statusStore.pureLyricMode ||
musicStore.playSong.type === 'radio' ||
!musicStore.isHasLrc ||
isShowComment
"
:theme="mainColor"
/>
<PlayerData :center="playerDataCenter" :theme="mainColor" />
</div>
<Transition name="fade" mode="out-in">
<!-- 评论 -->
<PlayerComment v-if="isShowComment && !statusStore.pureLyricMode" />
<!-- 歌词 -->
<div v-else-if="musicStore.isHasLrc" class="content-right">
<!-- 数据 -->
<PlayerData
<!-- <PlayerData
v-if="
(statusStore.pureLyricMode && musicStore.isHasLrc) ||
(settingStore.playerType === 'record' && musicStore.isHasLrc)
"
:center="statusStore.pureLyricMode"
:theme="mainColor"
/>
/> -->
<!-- 歌词 -->
<MainAMLyric v-if="settingStore.useAMLyrics" />
<MainLyric v-else />
Expand Down Expand Up @@ -120,6 +111,11 @@ const musicStore = useMusicStore();
const statusStore = useStatusStore();
const settingStore = useSettingStore();
// 是否显示评论
const isShowComment = computed<boolean>(
() => !musicStore.playSong.path && statusStore.showPlayerComment,
);
// 主内容 key
const playerContentKey = computed(() => {
return `
Expand All @@ -129,8 +125,15 @@ const playerContentKey = computed(() => {
${isShowComment.value}`;
});
// 是否显示评论
const isShowComment = computed(() => !musicStore.playSong.path && statusStore.showPlayerComment);
// 数据是否居中
const playerDataCenter = computed<boolean>(
() =>
!musicStore.isHasLrc ||
statusStore.pureLyricMode ||
settingStore.playerType === "record" ||
musicStore.playSong.type === "radio" ||
isShowComment.value,
);
// 当前实时歌词
const instantLyrics = computed(() => {
Expand Down
9 changes: 3 additions & 6 deletions src/components/Player/MainLyric.vue
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,10 @@ onBeforeUnmount(() => {
}
}
}
&.record,
&.pure {
:deep(.n-scrollbar-content) {
padding: 0 80px;
}
.lyric-content {
.placeholder {
&:first-child {
Expand All @@ -588,11 +590,6 @@ onBeforeUnmount(() => {
}
}
}
&.pure {
:deep(.n-scrollbar-content) {
padding: 0 80px;
}
}
&:hover {
.lrc-line {
filter: blur(0) !important;
Expand Down
4 changes: 2 additions & 2 deletions src/components/UI/s-image.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ watchOnce(isCanLook, (show) => {
}
.loading {
position: absolute;
top: 0;
left: 0;
// top: 0;
// left: 0;
width: 100%;
height: 100%;
z-index: 0;
Expand Down

0 comments on commit 432fa18

Please sign in to comment.