-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Drop actions to slide - Fixed new items getting removed if not in selected template - Special textboxes are removed when changing template - Text editor will select the best textbox - List view textboxes in correct oreder - Text editor not removing extra items
- Loading branch information
Showing
22 changed files
with
293 additions
and
174 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
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
37 changes: 37 additions & 0 deletions
37
src/frontend/components/drawer/audio/MetronomeInputs.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,37 @@ | ||
<script lang="ts"> | ||
import { createEventDispatcher } from "svelte" | ||
import T from "../../helpers/T.svelte" | ||
import CombinedInput from "../../inputs/CombinedInput.svelte" | ||
import NumberInput from "../../inputs/NumberInput.svelte" | ||
import type { API_metronome } from "../../actions/api" | ||
export let values: API_metronome = {} | ||
export let volume: boolean = true | ||
let dispatch = createEventDispatcher() | ||
function updateValue(key, e) { | ||
let value = Number(e.detail) | ||
console.log(value, Math.floor(value), Math.floor(values.tempo || 0) === (values.tempo || 0)) | ||
if (Math.floor(value) === value) value = Math.floor(value) // remove .0 | ||
console.log(value) | ||
dispatch("change", { ...values, [key]: value }) | ||
} | ||
</script> | ||
|
||
<CombinedInput> | ||
<p><T id="audio.tempo" /> (<T id="audio.bpm" />)</p> | ||
<NumberInput value={values.tempo || 120} min={1} decimals={1} fixed={Math.floor(values.tempo || 0) === (values.tempo || 0) ? 0 : 1} max={320} on:change={(e) => updateValue("tempo", e)} /> | ||
</CombinedInput> | ||
<CombinedInput> | ||
<p><T id="audio.beats" /></p> | ||
<NumberInput value={values.beats || 4} min={1} max={16} on:change={(e) => updateValue("beats", e)} /> | ||
</CombinedInput> | ||
<!-- <NumberInput value={values.notesPerBeat} min={1} max={4} on:change={(e) => (values.notesPerBeat = e.detail)} /> --> | ||
{#if volume} | ||
<CombinedInput> | ||
<p><T id="media.volume" /></p> | ||
<NumberInput value={values.volume || 1} min={0.1} max={3} decimals={1} step={0.1} inputMultiplier={100} on:change={(e) => updateValue("volume", e)} /> | ||
</CombinedInput> | ||
{/if} |
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
Oops, something went wrong.