[F] Fix imports
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<script lang="ts">
|
||||
import { artistAndAlbum } from "../../shared/tools.ts";
|
||||
import type { NeteaseSong } from "$lib/types.ts";
|
||||
import ImageListItem from "./ImageListItem.svelte";
|
||||
import { artistAndAlbum } from "$lib/utils"
|
||||
import type { NeteaseSong } from "$lib/types"
|
||||
import ImageListItem from "./ImageListItem.svelte"
|
||||
|
||||
let { info }: { info: NeteaseSong } = $props();
|
||||
let { info }: { info: NeteaseSong } = $props()
|
||||
</script>
|
||||
|
||||
<ImageListItem photoUrl={info.al.picUrl} title={info.name} text={artistAndAlbum(info)} />
|
||||
@@ -1,9 +1,9 @@
|
||||
<script lang="ts">
|
||||
import AppBar from "../components/appbar/AppBar.svelte";
|
||||
import TitleHeader from "../components/TitleHeader.svelte";
|
||||
import SongInfo from "../components/listitem/SongInfo.svelte";
|
||||
import AppBar from "$lib/ui/appbar/AppBar.svelte";
|
||||
import TitleHeader from "$lib/ui/TitleHeader.svelte";
|
||||
import SongInfo from "$lib/ui/listitem/SongInfo.svelte";
|
||||
import type { PageProps } from "./$types";
|
||||
import Button from "../components/Button.svelte";
|
||||
import Button from "$lib/ui/Button.svelte";
|
||||
import { Layer } from "m3-svelte";
|
||||
import { goto } from "$app/navigation";
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<script lang="ts">
|
||||
import { TextFieldOutlined } from "m3-svelte"
|
||||
import AppBar from "$lib/ui/appbar/AppBar.svelte"
|
||||
import Button from "$lib/ui/button/Button.svelte"
|
||||
import Button from "$lib/ui/Button.svelte"
|
||||
import type { NeteaseSong } from "$lib/types"
|
||||
import { API } from "$lib/client"
|
||||
import ErrorDialog from "$lib/ui/status/ErrorDialog.svelte";
|
||||
import ProgressList from "./ProgressList.svelte";
|
||||
import ErrorDialog from "$lib/ui/status/ErrorDialog.svelte"
|
||||
import ProgressList from "./ProgressList.svelte"
|
||||
|
||||
let link = $state('')
|
||||
|
||||
@@ -34,14 +34,14 @@
|
||||
return ''
|
||||
}
|
||||
|
||||
let listTitle = $derived(status === 'idle' ? '' : (status === 'importing' ? '正在导入' : (status === 'success' ? '导入完成' : '导入出错')));
|
||||
let listSubtitle = $derived(`${progress.done} / ${progress.total} 首歌曲`);
|
||||
let listPercent = $derived(progress.total ? progress.done / progress.total * 100 : 0);
|
||||
let listTitle = $derived(status === 'idle' ? '' : (status === 'importing' ? '正在导入' : (status === 'success' ? '导入完成' : '导入出错')))
|
||||
let listSubtitle = $derived(`${progress.done} / ${progress.total} 首歌曲`)
|
||||
let listPercent = $derived(progress.total ? progress.done / progress.total * 100 : 0)
|
||||
let listItems = $derived(songs.map(song => ({
|
||||
title: song.song.name,
|
||||
subtitle: song.song.ar.map(a => a.name).join(', '),
|
||||
icon: statusToIcon(song.status)
|
||||
})));
|
||||
})))
|
||||
|
||||
async function startImport() {
|
||||
if (!link) return
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<script lang="ts">
|
||||
import type { PageProps } from "./$types"
|
||||
import { goto } from "$app/navigation";
|
||||
import AppBar from "$lib/ui/appbar/AppBar.svelte";
|
||||
import Button from "$lib/ui/button/Button.svelte";
|
||||
import SongInfo from "$lib/ui/listitem/SongInfo.svelte";
|
||||
import { API } from "$lib/client";
|
||||
import { goto } from "$app/navigation"
|
||||
import AppBar from "$lib/ui/appbar/AppBar.svelte"
|
||||
import Button from "$lib/ui/Button.svelte"
|
||||
import SongInfo from "$lib/ui/listitem/SongInfo.svelte"
|
||||
import { API } from "$lib/client"
|
||||
|
||||
let { data }: PageProps = $props()
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
}
|
||||
|
||||
async function startPractice() {
|
||||
if (songs.length === 0) return;
|
||||
if (songs.length === 0) return
|
||||
|
||||
const firstIndex = 0;
|
||||
const firstSong = songs[firstIndex];
|
||||
const firstIndex = 0
|
||||
const firstSong = songs[firstIndex]
|
||||
|
||||
data.user.data.loc = {
|
||||
currentPlaylistId: meta.id,
|
||||
@@ -35,10 +35,10 @@
|
||||
playMode: 'sequential',
|
||||
isFinished: false,
|
||||
lastResultId: null
|
||||
};
|
||||
}
|
||||
|
||||
await API.saveUserData({ loc: data.user.data.loc });
|
||||
goto(`/song/${firstSong.id}`);
|
||||
await API.saveUserData({ loc: data.user.data.loc })
|
||||
goto(`/song/${firstSong.id}`)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user