mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-20 20:52:04 +00:00
fix: disabling discord details
This commit is contained in:
parent
a9db439a26
commit
342327b14a
4 changed files with 9 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ui",
|
||||
"version": "6.3.62",
|
||||
"version": "6.3.63",
|
||||
"license": "BUSL-1.1",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@9.14.4",
|
||||
|
|
|
|||
1
src/app.d.ts
vendored
1
src/app.d.ts
vendored
|
|
@ -91,6 +91,7 @@ export interface Native {
|
|||
attachments: (hash: string, id: number) => Promise<Attachment[]>
|
||||
tracks: (hash: string, id: number) => Promise<Array<{ number: string, language?: string, type: string, header?: string, name?: string }>>
|
||||
subtitles: (hash: string, id: number, cb: (subtitle: { text: string, time: number, duration: number }, trackNumber: number) => void) => Promise<void>
|
||||
errors: (cb: (error: Error) => void) => Promise<void>
|
||||
chapters: (hash: string, id: number) => Promise<Array<{ start: number, end: number, text: string }>>
|
||||
torrentStats: (hash: string) => Promise<TorrentInfo>
|
||||
torrents: () => Promise<TorrentInfo[]>
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ export default Object.assign<Native, Partial<Native>>({
|
|||
updateProgress: async () => undefined,
|
||||
torrentStats: async (): Promise<TorrentInfo> => ({ peers: rnd(), seeders: rnd(), leechers: rnd(), progress: Math.random(), down: rnd(100000000), up: rnd(100000000), name: 'Amebku.webm', downloaded: rnd(100000), hash: '1234567890abcdef', size: 1234567890, eta: rnd() }),
|
||||
torrents: async (): Promise<TorrentInfo[]> => [{ peers: rnd(), seeders: rnd(), leechers: rnd(), progress: Math.random(), down: rnd(100000000), up: rnd(100000000), name: 'Amebku.webm', downloaded: rnd(100000), hash: '1234567890abcdef', size: 1234567890, eta: rnd() }],
|
||||
defaultTransparency: () => false
|
||||
defaultTransparency: () => false,
|
||||
errors: async () => undefined
|
||||
// @ts-expect-error idk
|
||||
}, globalThis.native as Partial<Native>)
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
import '@fontsource-variable/nunito'
|
||||
import '$lib/modules/navigate'
|
||||
import { ProgressBar } from '@prgm/sveltekit-progress-bar'
|
||||
import { toast } from 'svelte-sonner'
|
||||
|
||||
import Backplate from '$lib/components/Backplate.svelte'
|
||||
import Online from '$lib/components/Online.svelte'
|
||||
|
|
@ -18,6 +19,10 @@
|
|||
native.updateProgress(progress => {
|
||||
updateProgress = progress
|
||||
})
|
||||
native.errors(error => {
|
||||
toast.error('Torrent Process Error!', { description: error?.stack ?? error?.message })
|
||||
console.error(error)
|
||||
})
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
|
|
|||
Loading…
Reference in a new issue