[O] Generalize
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
<script lang="ts">
|
||||
import type { NeteaseSongBrief } from "../shared/types";
|
||||
|
||||
let { info }: { info: NeteaseSongBrief } = $props();
|
||||
</script>
|
||||
|
||||
<div class="hbox gap-16px">
|
||||
<img class="rounded-16px size-68px" src={info.albumPic} alt="Album Art" />
|
||||
<div class="vbox flex-1 min-w-0">
|
||||
<div class="m3-font-title-large truncate">{info.name}</div>
|
||||
<div class="hbox w-full">
|
||||
<div class="m3-font-body-medium m3-color-on-surface-variant truncate">{info.artists.map(a => a.name).join(", ")} - {info.album}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,13 @@
|
||||
<script lang="ts">
|
||||
let { photoUrl, title, text }: { photoUrl: string; title: string; text: string } = $props();
|
||||
</script>
|
||||
|
||||
<div class="hbox gap-16px">
|
||||
<img class="rounded-16px size-68px" src={photoUrl} alt={title} />
|
||||
<div class="vbox flex-1 min-w-0">
|
||||
<div class="m3-font-title-large truncate">{title}</div>
|
||||
<div class="hbox w-full">
|
||||
<div class="m3-font-body-medium m3-color-on-surface-variant truncate">{text}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,8 @@
|
||||
<script lang="ts">
|
||||
import type { NeteaseSongBrief } from "../../shared/types.ts";
|
||||
import ImageListItem from "./ImageListItem.svelte";
|
||||
|
||||
let { info }: { info: NeteaseSongBrief } = $props();
|
||||
</script>
|
||||
|
||||
<ImageListItem photoUrl={info.albumPic} title={info.name} text={`${info.artists.map(a => a.name).join(", ")} - ${info.album}`} />
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import AppBar from "../components/appbar/AppBar.svelte";
|
||||
import TitleHeader from "../components/TitleHeader.svelte";
|
||||
import SongInfo from "../components/SongInfo.svelte";
|
||||
import SongInfo from "../components/listitem/SongInfo.svelte";
|
||||
import type { PageProps } from "./$types";
|
||||
import Button from "../components/Button.svelte";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import type { PageProps } from "./$types"
|
||||
import AppBar from "../../../components/appbar/AppBar.svelte";
|
||||
import Button from "../../../components/Button.svelte";
|
||||
import SongInfo from "../../../components/SongInfo.svelte";
|
||||
import SongInfo from "../../../components/listitem/SongInfo.svelte";
|
||||
|
||||
let { data }: PageProps = $props()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user