-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhanced the verse play button with programmable options (closes #177) (
#181)
- Loading branch information
Showing
7 changed files
with
91 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/components/ui/SettingsDrawer/VersePlayButtonSelector.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script> | ||
import Radio from '$ui/flowbite-svelte/forms/Radio.svelte'; | ||
import Check from '$svgs/Check.svelte'; | ||
import { __playButtonsFunctionality } from '$utils/stores'; | ||
import { selectableVersePlayButtonOptions } from '$data/options'; | ||
import { updateSettings } from '$utils/updateSettings'; | ||
import { selectedRadioClasses } from '$data/commonClasses'; | ||
</script> | ||
|
||
<div class="grid gap-3 w-full theme-grayscale"> | ||
{#each Object.entries(selectableVersePlayButtonOptions) as [id, options]} | ||
<Radio name="wordTooltip" bind:group={$__playButtonsFunctionality.verse} value={options.id} on:change={(event) => updateSettings({ type: 'versePlayButton', value: +event.target.value })} custom> | ||
<div class="inline-flex justify-between items-center p-5 w-full text-gray-500 bg-white rounded-lg border border-gray-200 cursor-pointer peer-checked:border-primary-600 peer-checked:text-primary-600 hover:text-gray-600 hover:bg-gray-100 {$__playButtonsFunctionality.verse === options.id && selectedRadioClasses}"> | ||
<div class="w-full">{options.name}</div> | ||
|
||
{#if $__playButtonsFunctionality.verse === options.id} | ||
<Check size={5} /> | ||
{/if} | ||
</div> | ||
</Radio> | ||
{/each} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters