chore: merge

This commit is contained in:
RockinChaos 2024-08-24 20:41:39 -07:00
parent be803481a9
commit a973dd04ec
4 changed files with 49 additions and 32 deletions

View file

@ -6,6 +6,7 @@
import { clientID } from "@/modules/myanimelist.js"
import { click } from '@/modules/click.js'
import { toast } from 'svelte-sonner'
import { LogOut, Plus } from 'lucide-svelte'
import IPC from "@/modules/ipc"
export const profileView = writable(false)
@ -118,8 +119,8 @@
<input type='checkbox' id='sync-{profile.viewer.data.Viewer.id}' bind:checked={profile.viewer.data.Viewer.sync} on:click={() => toggleSync(profile)} />
<label for='sync-{profile.viewer.data.Viewer.id}'><br/></label>
</button>
<button type='button' class='button logout pt-5 pb-5 pl-5 pr-5 material-symbols-outlined rounded bg-transparent border-0' title='Logout' on:click|stopPropagation={() => dropProfile(profile)}>
logout
<button type='button' class='button logout pt-5 pb-5 pl-5 pr-5 bg-transparent border-0 d-flex align-items-center justify-content-center' title='Logout' on:click|stopPropagation={() => dropProfile(profile)}>
<LogOut size='2.2rem' />
</button>
</div>
</button>
@ -140,9 +141,7 @@
</div>
{:else if $profiles.length < 5}
<button type='button' class='box pointer border-0 pt-10 pb-10 d-flex align-items-center justify-content-center text-center {$profiles.length > 0 && $currentProfile ? "" : !$currentProfile ? "rounded-bottom-10" : "rounded-top-10"}' on:click={() => { $profileAdd = true }}>
<div class='material-symbols-outlined rounded mr-10'>
add
</div>
<Plus class='mr-10' size='2.2rem' />
<div class='mt-2'>
Add Profile
</div>
@ -158,9 +157,7 @@
</div>
{/if}
<button type='button' class='box pointer border-0 rounded-bottom-10 pt-10 pb-10 d-flex align-items-center justify-content-center text-center' on:click={currentLogout}>
<div class='material-symbols-outlined bg-transparent mr-10'>
logout
</div>
<LogOut class='mr-10' size='2.2rem' />
<div class='mt-2'>
Sign Out
</div>

View file

@ -1403,10 +1403,6 @@
align-items: center;
height: 100%;
}
.bind.material-symbols-outlined {
font-size: 2.2rem !important;
font-weight: unset !important;
}
.stats {
font-size: 2.3rem !important;
padding-top: 1.5rem;

View file

@ -4,6 +4,7 @@
import { malDubs } from '@/modules/animedubs.js'
import { writable } from 'svelte/store'
import { matchPhrase } from "@/modules/util.js"
import { Mic, MicOff, Captions, GraduationCap } from 'lucide-svelte'
/** @type {import('@/modules/al.d.ts').Media} */
export let media = null
@ -34,33 +35,51 @@
{#if !banner && !viewAnime && !example}
{#if settings.value.cardAudio}
<span class='material-symbols-outlined pl-10 pt-10 position-absolute top-0 left-0 filled font-weight-medium z-10 {$isDubbed ? "dubbed" : $isPartial ? "incomplete" : "subbed"}' title={$isDubbed ? "English Dubbed" : $isPartial ? "English Dub was not completed" : "Subtitles Only"}>
{$isDubbed ? 'mic' : $isPartial ? 'mic_off' : 'closed_caption'}
</span>
<div class='pl-10 pt-10 position-absolute top-0 left-0 filled font-weight-medium z-10 {$isDubbed ? "dubbed" : $isPartial ? "incomplete" : "subbed"}' title={$isDubbed ? "English Dubbed" : $isPartial ? "English Dub was not completed" : "Subtitles Only"}>
{#if $isDubbed}
<Mic size='3rem' />
{:else if $isPartial}
<MicOff size='3rem' />
{:else}
<Captions size='3rem' />
{/if}
</div>
{#if media.isAdult}
<span class='material-symbols-outlined pt-10 position-absolute top-0 left-0 filled font-weight-medium z-10 adult'>
18_up_rating
</span>
<div class='pt-10 position-absolute top-0 left-0 filled font-weight-medium z-10 adult'>
<GraduationCap size='3rem' />
</div>
{/if}
{/if}
{:else if !viewAnime && !example}
{$isDubbed ? 'Dub' : $isPartial ? 'Partial Dub' : 'Sub'}
{:else if viewAnime}
<span class='material-symbols-outlined mx-10 font-size-24'>
{$isDubbed ? 'mic' : $isPartial ? 'mic_off' : 'closed_caption'}
</span>
{#if $isDubbed}
<Mic class='mx-10' size='2.2rem' />
{:else if $isPartial}
<MicOff class='mx-10' size='2.2rem' />
{:else}
<Captions class='mx-10' size='2.2rem' />
{/if}
<span class='mr-20'>
{$isDubbed ? 'Dub' : $isPartial ? 'Partial Dub' : 'Sub'}
</span>
{:else}
<div>
<span class='material-symbols-outlined filled font-size-24 label ml-20 position-relative z-10 adult'>18_up_rating</span>
<span class='font-size-24 label ml-20 position-relative z-10 adult'>
<GraduationCap size='2.5rem' />
</span>
<span class='position-relative ml-2'>Rated 18+</span>
<span class='material-symbols-outlined filled font-size-24 label ml-20 position-relative z-10 subbed'>closed_caption</span>
<span class='font-size-24 label ml-20 position-relative z-10 subbed'>
<Captions size='2.5rem' />
</span>
<span class='position-relative ml-2'>Sub Only</span>
<span class='material-symbols-outlined filled font-size-24 label ml-20 position-relative z-10 incomplete'>mic_off</span>
<span class='font-size-24 label ml-20 position-relative z-10 incomplete'>
<MicOff size='2.5rem' />
</span>
<span class='position-relative ml-2'>Partial Dub</span>
<span class='material-symbols-outlined filled font-size-24 label ml-20 position-relative z-10 dubbed'>mic</span>
<span class='font-size-24 label ml-20 position-relative z-10 dubbed'>
<Mic size='2.5rem' />
</span>
<span class='position-relative ml-2'>Dub</span>
</div>
{/if}
@ -70,20 +89,20 @@
top: 0.625rem;
}
.adult {
color: rgba(215, 6, 10);
padding-left: 3.6rem;
color: rgba(215, 6, 10) !important;
padding-left: 4.6rem;
text-shadow: black 0 0 1rem;
}
.dubbed {
color: rgb(255, 214, 0);
color: rgb(255, 214, 0) !important;
text-shadow: black 0 0 .5rem;
}
.subbed {
color: rgb(137, 39, 255);
color: rgb(137, 39, 255) !important;
text-shadow: black 0 0 .5rem;
}
.incomplete {
color: rgb(255, 94, 0);
color: rgb(255, 94, 0) !important;
text-shadow: black 0 0 .5rem;
}
</style>

View file

@ -3,6 +3,7 @@
import { click } from '@/modules/click.js'
import { writable } from 'svelte/store'
import { toast } from 'svelte-sonner'
import { Bookmark, PencilLine } from 'lucide-svelte'
import Helper from '@/modules/helper.js'
import Debug from 'debug'
@ -185,8 +186,12 @@
</script>
<button type='button' id='list-btn' class='btn { viewAnime ? "bg-dark btn-lg font-size-20" : (previewAnime ? "btn-square" : "bg-dark-light") + " font-size-16" } btn-square ml-10 material-symbols-outlined shadow-none border-0' use:click={toggleModal} disabled={!Helper.isAuthorized()}>
{ media.mediaListEntry ? 'border_color' : 'bookmark' }
<button type='button' id='list-btn' class='btn { viewAnime ? "bg-dark btn-lg font-size-20" : (previewAnime ? "btn-square" : "bg-dark-light") + " font-size-16" } btn-square ml-10 shadow-none border-0 d-flex align-items-center justify-content-center' use:click={toggleModal} disabled={!Helper.isAuthorized()}>
{#if media.mediaListEntry}
<PencilLine size='1.7rem' />
{:else}
<Bookmark size='1.7rem' />
{/if}
</button>
{#if Helper.isAuthorized()}
<div bind:this={modal} class='modal scoring position-absolute bg-dark shadow-lg rounded-3 p-20 z-30 {$showModal ? "visible" : "invisible"} {!previewAnime && !viewAnime ? "banner w-auto h-auto" : (!previewAnime ? "viewAnime w-auto h-auto" : "previewAnime")}' use:click={() => {}}>