mirror of
https://codeberg.org/uzu/strudel
synced 2026-08-02 13:46:06 -04:00
fixed prettier
This commit is contained in:
@@ -8,7 +8,7 @@ export function AudioEngineTargetSelector({ target, onChange, isDisabled }) {
|
||||
onChange(target);
|
||||
};
|
||||
const options = new Map([
|
||||
[audioEngineTargets.webaudio, audioEngineTargets.webaudio ],
|
||||
[audioEngineTargets.webaudio, audioEngineTargets.webaudio],
|
||||
[audioEngineTargets.superdirt, 'superdirt (osc)'],
|
||||
]);
|
||||
return <SelectInput isDisabled={isDisabled} options={options} value={target} onChange={onTargetChange} />;
|
||||
|
||||
@@ -122,7 +122,7 @@ export function SettingsTab({ started }) {
|
||||
/>
|
||||
</FormItem>
|
||||
)}
|
||||
{(
|
||||
{
|
||||
<FormItem label="Audio Engine Target">
|
||||
<AudioEngineTargetSelector
|
||||
target={audioEngineTarget}
|
||||
@@ -136,7 +136,7 @@ export function SettingsTab({ started }) {
|
||||
}}
|
||||
/>
|
||||
</FormItem>
|
||||
)}
|
||||
}
|
||||
<FormItem label="Theme">
|
||||
<SelectInput options={themeOptions} value={theme} onChange={(theme) => settingsMap.setKey('theme', theme)} />
|
||||
</FormItem>
|
||||
@@ -242,7 +242,7 @@ export function SettingsTab({ started }) {
|
||||
if (r) {
|
||||
settingsMap.set(defaultSettings);
|
||||
}
|
||||
})
|
||||
});
|
||||
}}
|
||||
>
|
||||
restore default settings
|
||||
|
||||
@@ -102,10 +102,10 @@ export function confirmDialog(msg) {
|
||||
const confirmed = confirm(msg);
|
||||
if (confirmed instanceof Promise) {
|
||||
return confirmed;
|
||||
}
|
||||
}
|
||||
return new Promise((resolve) => {
|
||||
resolve(confirmed)
|
||||
})
|
||||
resolve(confirmed);
|
||||
});
|
||||
}
|
||||
|
||||
let lastShared;
|
||||
@@ -116,7 +116,9 @@ export async function shareCode(codeToShare) {
|
||||
return;
|
||||
}
|
||||
|
||||
confirmDialog('Do you want your pattern to be public? If no, press cancel and you will get just a private link.').then(async (isPublic) => {
|
||||
confirmDialog(
|
||||
'Do you want your pattern to be public? If no, press cancel and you will get just a private link.',
|
||||
).then(async (isPublic) => {
|
||||
const hash = nanoid(12);
|
||||
const shareUrl = window.location.origin + window.location.pathname + '?' + hash;
|
||||
const { error } = await supabase.from('code_v1').insert([{ code: codeToShare, hash, ['public']: isPublic }]);
|
||||
@@ -138,9 +140,7 @@ export async function shareCode(codeToShare) {
|
||||
// alert(message);
|
||||
logger(message);
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
export const ReplContext = createContext(null);
|
||||
|
||||
@@ -33,7 +33,7 @@ export const defaultSettings = {
|
||||
panelPosition: 'right',
|
||||
userPatterns: '{}',
|
||||
audioDeviceName: defaultAudioDeviceName,
|
||||
audioEngineTarget: audioEngineTargets.webaudio //webaudio | superdirt
|
||||
audioEngineTarget: audioEngineTargets.webaudio, //webaudio | superdirt
|
||||
};
|
||||
|
||||
let search = null;
|
||||
|
||||
Reference in New Issue
Block a user