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 { clientID } from "@/modules/myanimelist.js"
import { click } from '@/modules/click.js' import { click } from '@/modules/click.js'
import { toast } from 'svelte-sonner' import { toast } from 'svelte-sonner'
import { LogOut, Plus } from 'lucide-svelte'
import IPC from "@/modules/ipc" import IPC from "@/modules/ipc"
export const profileView = writable(false) 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)} /> <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> <label for='sync-{profile.viewer.data.Viewer.id}'><br/></label>
</button> </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)}> <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 <LogOut size='2.2rem' />
</button> </button>
</div> </div>
</button> </button>
@ -140,9 +141,7 @@
</div> </div>
{:else if $profiles.length < 5} {: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 }}> <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'> <Plus class='mr-10' size='2.2rem' />
add
</div>
<div class='mt-2'> <div class='mt-2'>
Add Profile Add Profile
</div> </div>
@ -158,9 +157,7 @@
</div> </div>
{/if} {/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}> <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 class='mr-10' size='2.2rem' />
logout
</div>
<div class='mt-2'> <div class='mt-2'>
Sign Out Sign Out
</div> </div>

View file

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

View file

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

View file

@ -3,6 +3,7 @@
import { click } from '@/modules/click.js' import { click } from '@/modules/click.js'
import { writable } from 'svelte/store' import { writable } from 'svelte/store'
import { toast } from 'svelte-sonner' import { toast } from 'svelte-sonner'
import { Bookmark, PencilLine } from 'lucide-svelte'
import Helper from '@/modules/helper.js' import Helper from '@/modules/helper.js'
import Debug from 'debug' import Debug from 'debug'
@ -185,8 +186,12 @@
</script> </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()}> <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()}>
{ media.mediaListEntry ? 'border_color' : 'bookmark' } {#if media.mediaListEntry}
<PencilLine size='1.7rem' />
{:else}
<Bookmark size='1.7rem' />
{/if}
</button> </button>
{#if Helper.isAuthorized()} {#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={() => {}}> <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={() => {}}>