Skip to content

Commit 8bc9320

Browse files
committed
chore: 移除多余代码
1 parent dd1d147 commit 8bc9320

11 files changed

Lines changed: 8 additions & 20 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "yee-music",
33
"private": true,
4-
"version": "0.1.8",
4+
"version": "0.1.9",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

src/components/home/section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
CaretRight24Filled,
55
ChevronRight24Regular,
66
} from "@fluentui/react-icons";
7-
import React, { ReactNode, useEffect, useRef, useState } from "react";
7+
import { ReactNode, useEffect, useRef, useState } from "react";
88
import { YeeButton } from "../yee-button";
99

1010
interface SectionProps {

src/components/home/song-preview.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Skeleton } from "@/components/ui/skeleton";
21
import { getSongDetail } from "@/lib/services/song";
32
import { likeSong } from "@/lib/services/user";
43
import { usePlayerStore } from "@/lib/store/playerStore";
@@ -19,7 +18,7 @@ import { useContextMenuStore } from "@/lib/store/contextMenuStore";
1918

2019
export function SongPreview({ resources }: { resources: Resource[] }) {
2120
return (
22-
<div className="flex flex-col gap-6 basis-[calc((100%_-_1rem)/2)]">
21+
<div className="flex flex-col gap-6 basis-[calc((100%-1rem)/2)]">
2322
{resources.map((res) => (
2423
<SongPreviewItem resource={res} key={res.resourceId} />
2524
))}

src/components/home/voice-preview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88

99
export function VoicePreview({ creatives }: { creatives: creative[] }) {
1010
return (
11-
<div className="flex flex-col gap-6 basis-[calc((100%_-_1rem)/2)]">
11+
<div className="flex flex-col gap-6 basis-[calc((100%-1rem)/2)]">
1212
{creatives.map((creative) => (
1313
<VoicePreviewItem creative={creative} key={creative.creativeId} />
1414
))}

src/components/modal/logout-form.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
YeeDialogCloseButton,
77
YeeDialogPrimaryButton,
88
} from "../yee-dialog";
9-
import { useTheme } from "../providers/theme-provider";
109

1110
export function LogoutForm({
1211
open,
@@ -15,8 +14,6 @@ export function LogoutForm({
1514
open: boolean;
1615
onOpenChange?: (open: boolean) => void;
1716
}) {
18-
const { theme } = useTheme();
19-
2017
const storeLogout = useUserStore((state) => state.logout);
2118

2219
async function handleLogout() {
@@ -38,19 +35,15 @@ export function LogoutForm({
3835
showTitle={true}
3936
footer={
4037
<div className="w-full flex gap-2">
41-
<YeeDialogCloseButton variant={theme === "dark" ? "dark" : "light"}>
42-
取消
43-
</YeeDialogCloseButton>
38+
<YeeDialogCloseButton>取消</YeeDialogCloseButton>
4439
<YeeDialogPrimaryButton
4540
onClick={handleLogout}
46-
variant={theme === "dark" ? "dark" : "light"}
4741
className="bg-destructive hover:bg-destructive/80"
4842
>
4943
确定
5044
</YeeDialogPrimaryButton>
5145
</div>
5246
}
53-
variant={theme === "dark" ? "dark" : "light"}
5447
>
5548
<span>确定要退出登录吗?</span>
5649
</YeeDialog>

src/components/modal/playlist-add-form.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ export function PlaylistAddForm({
5353

5454
return (
5555
<YeeDialog
56-
variant="light"
5756
title="新建歌单"
5857
asForm
5958
showTitle={false}

src/components/playlist/playlist-delete-button.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export function PlaylistDeleteButton({ playlist }: { playlist: Playlist }) {
5151

5252
return (
5353
<YeeDialog
54-
variant={theme === "dark" ? "dark" : "light"}
5554
title="删除歌单"
5655
asForm={false}
5756
showTitle

src/components/playlist/playlist-edit-button.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ export function PlaylistEditButton({
7979

8080
return (
8181
<YeeDialog
82-
variant={theme === "dark" ? "dark" : "light"}
8382
title="编辑歌单"
8483
open={open}
8584
onOpenChange={(val) => {

src/components/titlebar/titlebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export function Titlebar() {
100100
</div>
101101
</div>
102102

103-
<div className="flex flex-1 justify-center shrink-0 min-w-[200px]">
103+
<div className="flex flex-1 justify-center shrink-0 min-w-50">
104104
<div onMouseDown={(e) => e.stopPropagation()}>
105105
<SearchInput />
106106
</div>

src/components/yee-image-uploader.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ function YeeCropperDialog({
102102

103103
return (
104104
<YeeDialog
105-
variant={theme === "dark" ? "dark" : "light"}
106105
title="裁剪图片"
107106
asForm={false}
108107
open={!!image}
@@ -128,7 +127,7 @@ function YeeCropperDialog({
128127
}
129128
>
130129
<div className="flex flex-col gap-8 p-4">
131-
<div className="relative w-full h-[400px] bg-card/5 rounded-xl overflow-hidden">
130+
<div className="relative w-full h-100 bg-card/5 rounded-xl overflow-hidden">
132131
{image && (
133132
<Cropper
134133
image={image}

0 commit comments

Comments
 (0)