Skip to content

Commit

Permalink
chore: preview 黑暗模式 & 圆角微调
Browse files Browse the repository at this point in the history
  • Loading branch information
zkz098 committed Jan 15, 2025
1 parent f42c61c commit c9aea99
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ const colorsLight
--playlist-line: ${stylesPresent.styles.light.playListLine};
--hover-btn: ${stylesPresent.styles.light.hoverBtn};
--box-bg-shadow: ${stylesPresent.styles.light.boxBackgroundShadow};
--primary-color: 'rgb(${stylesPresent.styles.light.primaryColor})';
--primary-color-a: 'rgba(${stylesPresent.styles.light.primaryColor},0.3);
--primary-color: rgb(${stylesPresent.styles.light.primaryColor});
--primary-color-a: rgba(${stylesPresent.styles.light.primaryColor},0.3);
}`
const colorsDark
Expand All @@ -86,8 +86,8 @@ const colorsDark
--playlist-line: ${stylesPresent.styles.dark.playListLine};
--hover-btn: ${stylesPresent.styles.dark.hoverBtn};
--box-bg-shadow: ${stylesPresent.styles.dark.boxBackgroundShadow};
--primary-color: 'rgb(${stylesPresent.styles.dark.primaryColor})';
--primary-color-a: 'rgba(${stylesPresent.styles.dark.primaryColor},0.3);
--primary-color: rgb(${stylesPresent.styles.dark.primaryColor});
--primary-color-a: rgba(${stylesPresent.styles.dark.primaryColor},0.3);
}`
if (props.darkModeTarget) {
Expand Down
8 changes: 8 additions & 0 deletions src/Preview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,11 @@ function clickChangeTheme() {
切换主题
</button>
</template>

<style>
html[data-theme='dark'] {
color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;
}
</style>
2 changes: 1 addition & 1 deletion src/components/AudioPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const src = computed(() => {

<template>
<Transition name="slideRight">
<div v-show="playingStore.showPlayer" class="player-info fixed z-9 overflow-hidden border-r-0.5rem">
<div v-show="playingStore.showPlayer" class="player-info border-radius-0.8rem fixed z-9 overflow-hidden rounded-xl">
<AudioPreview />
<AudioController />
<audio id="audioPlayer" :src="src" :muted="!playingStore.enableVolume" @timeupdate="updateCurrentTime" @canplay="playingStore.currentId++" />
Expand Down

0 comments on commit c9aea99

Please sign in to comment.