mirror of
https://github.com/NoCrypt/migu.git
synced 2026-08-18 21:26:22 +00:00
feat: quality of life changes
This commit is contained in:
parent
526b2fc5a2
commit
6849c8ba78
6 changed files with 36 additions and 18 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -14,4 +14,5 @@ node_modules
|
|||
**/node_modules
|
||||
**/git_modules/
|
||||
|
||||
package-lock.json
|
||||
package-lock.json
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
import Search from './views/Search.svelte'
|
||||
import AiringSchedule from './views/AiringSchedule.svelte'
|
||||
import { readable } from 'simple-store-svelte'
|
||||
import { files } from './views/Player/MediaHandler.svelte' // this is sooo hacky and possibly delaying viewer on startup
|
||||
|
||||
export let page = 'home'
|
||||
|
||||
|
|
@ -23,7 +24,7 @@
|
|||
$: maxwidth = $isMobile ? '200px' : '60rem'
|
||||
</script>
|
||||
|
||||
<div class='w-full h-full position-absolute overflow-hidden'>
|
||||
<div class='w-full h-full position-absolute overflow-hidden' class:sr-only={($files.length === 0)}>
|
||||
<Miniplayer active={page !== 'player'} class='bg-dark-light z-10 {page === 'player' ? 'h-full' : ''}' {minwidth} {maxwidth} width='300px' padding='2rem' resize={!$isMobile}>
|
||||
<MediaHandler miniplayer={page !== 'player'} bind:page />
|
||||
</Miniplayer>
|
||||
|
|
@ -32,9 +33,9 @@
|
|||
<Settings />
|
||||
{:else if page === 'home'}
|
||||
<Home />
|
||||
{:else if page === 'search'}
|
||||
<Search />
|
||||
{:else if page === 'schedule'}
|
||||
<!-- {:else if page === 'search'}
|
||||
<Search /> ye fuck search-->
|
||||
{:else if page === 'schedule' || page === 'search'}
|
||||
<AiringSchedule />
|
||||
{:else if page === 'watchtogether'}
|
||||
<WatchTogether />
|
||||
|
|
|
|||
|
|
@ -6,21 +6,22 @@
|
|||
const view = getContext('view')
|
||||
export let page
|
||||
const links = [
|
||||
{
|
||||
click: () => {
|
||||
page = 'search'
|
||||
},
|
||||
css: 'ml-auto',
|
||||
page: 'search',
|
||||
icon: 'search',
|
||||
text: 'Search'
|
||||
},
|
||||
// {
|
||||
// click: () => {
|
||||
// page = 'search'
|
||||
// },
|
||||
// css: 'ml-auto',
|
||||
// page: 'search',
|
||||
// icon: 'search',
|
||||
// text: 'Search'
|
||||
// },
|
||||
{
|
||||
click: () => {
|
||||
page = 'schedule'
|
||||
},
|
||||
css: 'ml-auto',
|
||||
page: 'schedule',
|
||||
icon: 'schedule',
|
||||
icon: 'search',
|
||||
text: 'Schedule'
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@ import { page } from '@/App.svelte'
|
|||
import { toast } from 'svelte-sonner'
|
||||
import clipboard from './clipboard.js'
|
||||
import IPC from '@/modules/ipc.js'
|
||||
import { settings } from '@/modules/settings.js'
|
||||
import { get } from 'svelte/store';
|
||||
|
||||
import 'browser-event-target-emitter'
|
||||
|
||||
const torrentRx = /(^magnet:){1}|(^[A-F\d]{8,40}$){1}|(.*\.torrent$){1}/i
|
||||
|
|
@ -49,7 +52,8 @@ class TorrentWorker extends EventTarget {
|
|||
|
||||
export const client = new TorrentWorker()
|
||||
|
||||
client.send('load', localStorage.getItem('torrent'))
|
||||
if (!get(settings).disableStartupVideo) //hacky but works :p
|
||||
client.send('load', localStorage.getItem('torrent'))
|
||||
|
||||
client.on('files', ({ detail }) => {
|
||||
files.set(detail)
|
||||
|
|
|
|||
|
|
@ -128,10 +128,12 @@ export const defaults = {
|
|||
playerDeband: false,
|
||||
rssQuality: '1080',
|
||||
rssFeedsNew: SUPPORTS.extensions ? [['New Releases', 'SubsPlease']] : [],
|
||||
rssAutoplay: false,
|
||||
torrentSpeed: 5, // legacy
|
||||
downloadSpeed: 5,
|
||||
uploadSpeed: 1,
|
||||
slowSeeding: true,
|
||||
disableStartupVideo: true,
|
||||
torrentPersist: false,
|
||||
torrentDHT: false,
|
||||
torrentPeX: false,
|
||||
|
|
@ -140,7 +142,7 @@ export const defaults = {
|
|||
dhtPort: 0,
|
||||
missingFont: true,
|
||||
maxConns: 50,
|
||||
subtitleRenderHeight: SUPPORTS.isAndroid ? '720' : '0',
|
||||
subtitleRenderHeight: SUPPORTS.isAndroid ? '1080' : '0',
|
||||
subtitleLanguage: 'eng',
|
||||
audioLanguage: 'jpn',
|
||||
enableDoH: false,
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@
|
|||
<label for='torrent-streamed-download'>{settings.torrentStreamedDownload ? 'On' : 'Off'}</label>
|
||||
</div>
|
||||
</SettingCard>
|
||||
<SettingCard title='Transfer Speed Limit' description='Download/Upload speed limit for torrents, higher values increase CPU usage, and values higher than your storage write speeds will quickly fill up RAM.'>
|
||||
<!-- <SettingCard title='Transfer Speed Limit' description='Download/Upload speed limit for torrents, higher values increase CPU usage, and values higher than your storage write speeds will quickly fill up RAM.'>
|
||||
<div class='input-group w-100 mw-full'>
|
||||
<input type='number' inputmode='numeric' pattern={'[0-9]*.?[0-9]*'} bind:value={settings.torrentSpeed} min='0' max='50' step='0.1' class='form-control text-right bg-dark' />
|
||||
<div class='input-group-append'>
|
||||
|
|
@ -225,3 +225,12 @@
|
|||
</div>
|
||||
</SettingCard>
|
||||
{/if}
|
||||
<SettingCard title='Disable Loading Last Video On Startup' description='Loading last video on startup can increase your bandwidth usage while looking for new videos.'>
|
||||
<div class='custom-switch'>
|
||||
<input type='checkbox' id='disable-startup-video' bind:checked={settings.disableStartupVideo} />
|
||||
<label for='disable-startup-video'>{settings.disableStartupVideo ? 'On' : 'Off'}</label>
|
||||
</div>
|
||||
</SettingCard>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue