Skip to content

Commit

Permalink
froigs
Browse files Browse the repository at this point in the history
  • Loading branch information
codelastnight committed Aug 3, 2023
1 parent d9a0f71 commit 8af1d48
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
Binary file added src/renderer/public/frog.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/renderer/public/frog_hop_divider_md_wht.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/renderer/public/frogdivw.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 12 additions & 8 deletions src/renderer/src/Playlist.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@ export function onPlaylistAdd(type, playlist, data) {
</script>

<script lang="ts">
import Fa from 'svelte-fa';
import { faFrog } from '@fortawesome/free-solid-svg-icons';
import { handleConfirm } from './components/ModalConcert.svelte';
import FileLoadButton from './components/FileLoadButton.svelte';
import type { ClientSong } from './Player.svelte';
import { activePlaylist, song, settings } from './store';
import { activePlaylist, song, settings, isPlaying } from './store';
export let playlist: ClientSong[];
export let title = 'Track List';
export let path = '';
Expand Down Expand Up @@ -74,7 +72,7 @@ eAPI.onPlaylistChanged(async (_, data) => {
<div>
<h1 class="font-bold text-xl flex gap-x-2 items-center">
{#if $settings.frogMode}
<Fa icon={faFrog} />
{$settings.frogMode ? '🐸' : '🤮'}
{/if}
{title}
<span
Expand Down Expand Up @@ -107,13 +105,19 @@ eAPI.onPlaylistChanged(async (_, data) => {
{#each list as track (track?.index)}
<!-- svelte-ignore a11y-invalid-attribute -->
<button
class="w-full cursor-pointer flex gap-x-2 items-center py-3 px-3 text-start hover:bg-amber-900/10 truncate"
class="w-full relative cursor-pointer flex gap-x-2 items-center py-3 px-3 text-start hover:bg-amber-900/10 truncate"
on:click={() => changeSong(track?.index)}
>
{#if $song && $song?.filePath === track?.filePath}
<div class="w-[25px]">
{$settings.frogMode ? '🐸' : '🤮'}
</div>
{#if $settings.frogMode}
<img src="frog.gif" alt="keropi" width="50px" />
<img
src="frogdivw.gif"
class="-scale-x-100 absolute bottom-0 right-0"
alt="frog hopping"
class:invisible={!$isPlaying}
/>
{/if}
{:else}
<div class="w-[25px]" />
{/if}
Expand Down

0 comments on commit 8af1d48

Please sign in to comment.