prettier
This commit is contained in:
parent
1d95da7a3a
commit
f3b83b41f5
5 changed files with 10 additions and 19 deletions
|
|
@ -4,7 +4,6 @@ import { UdelFrame } from './UdelFrame';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import UdelsHeader from './UdelsHeader';
|
import UdelsHeader from './UdelsHeader';
|
||||||
|
|
||||||
|
|
||||||
const defaultHash = 'c3RhY2soCiAgCik%3D';
|
const defaultHash = 'c3RhY2soCiAgCik%3D';
|
||||||
|
|
||||||
const getHashesFromUrl = () => {
|
const getHashesFromUrl = () => {
|
||||||
|
|
@ -31,7 +30,7 @@ export function Udels() {
|
||||||
const onEvaluate = (key, code) => {
|
const onEvaluate = (key, code) => {
|
||||||
const hashes = getHashesFromUrl();
|
const hashes = getHashesFromUrl();
|
||||||
hashes[key] = code2hash(code);
|
hashes[key] = code2hash(code);
|
||||||
|
|
||||||
updateURLHashes(hashes);
|
updateURLHashes(hashes);
|
||||||
};
|
};
|
||||||
// useEffect(() => {
|
// useEffect(() => {
|
||||||
|
|
|
||||||
|
|
@ -7,16 +7,11 @@ export default function UdelsHeader(Props) {
|
||||||
<header id="header" className="flex text-white z-[100] text-lg select-none bg-neutral-900">
|
<header id="header" className="flex text-white z-[100] text-lg select-none bg-neutral-900">
|
||||||
<div className="px-4 items-center gap-2 flex space-x-2 md:pt-0 select-none">
|
<div className="px-4 items-center gap-2 flex space-x-2 md:pt-0 select-none">
|
||||||
<h1 onClick={() => {}} className={'text-l cursor-pointer flex gap-4'}>
|
<h1 onClick={() => {}} className={'text-l cursor-pointer flex gap-4'}>
|
||||||
<div
|
<div className={'mt-[1px] cursor-pointer'}>🌀</div>
|
||||||
className={'mt-[1px] cursor-pointer'}
|
|
||||||
>
|
<div className={'animate-pulse'}>
|
||||||
🌀
|
<span className="">strudel</span> <span className="text-sm">-UDELS</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={'animate-pulse'}>
|
|
||||||
<span className="">strudel</span> <span className="text-sm">-UDELS</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</h1>
|
</h1>
|
||||||
<NumberInput value={numWindows} setValue={setNumWindows} />
|
<NumberInput value={numWindows} setValue={setNumWindows} />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,10 @@
|
||||||
|
|
||||||
|
|
||||||
// type Props = {
|
// type Props = {
|
||||||
// containerRef: React.MutableRefObject<HTMLElement | null>,
|
// containerRef: React.MutableRefObject<HTMLElement | null>,
|
||||||
// editorRef: React.MutableRefObject<HTMLElement | null>,
|
// editorRef: React.MutableRefObject<HTMLElement | null>,
|
||||||
// init: () => void
|
// init: () => void
|
||||||
// }
|
// }
|
||||||
export function Code(Props) {
|
export function Code(Props) {
|
||||||
const {editorRef, containerRef, init} = Props;
|
const { editorRef, containerRef, init } = Props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section
|
<section
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import BigPlayButton from '@src/repl/components/BigPlayButton';
|
||||||
import UserFacingErrorMessage from '@src/repl/components/UserFacingErrorMessage';
|
import UserFacingErrorMessage from '@src/repl/components/UserFacingErrorMessage';
|
||||||
import { Header } from './Header';
|
import { Header } from './Header';
|
||||||
|
|
||||||
|
|
||||||
// type Props = {
|
// type Props = {
|
||||||
// context: replcontext,
|
// context: replcontext,
|
||||||
// containerRef: React.MutableRefObject<HTMLElement | null>,
|
// containerRef: React.MutableRefObject<HTMLElement | null>,
|
||||||
|
|
@ -23,7 +22,7 @@ export default function ReplEditor(Props) {
|
||||||
const showPanel = !isEmbedded;
|
const showPanel = !isEmbedded;
|
||||||
return (
|
return (
|
||||||
<ReplContext.Provider value={context}>
|
<ReplContext.Provider value={context}>
|
||||||
<div className='h-full flex flex-col relative'>
|
<div className="h-full flex flex-col relative">
|
||||||
<Loader active={pending} />
|
<Loader active={pending} />
|
||||||
<Header context={context} />
|
<Header context={context} />
|
||||||
{isEmbedded && <BigPlayButton started={started} handleTogglePlay={handleTogglePlay} />}
|
{isEmbedded && <BigPlayButton started={started} handleTogglePlay={handleTogglePlay} />}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { persistentMap } from '@nanostores/persistent';
|
import { persistentMap } from '@nanostores/persistent';
|
||||||
import { useStore } from '@nanostores/react';
|
import { useStore } from '@nanostores/react';
|
||||||
import { register } from '@strudel/core';
|
import { register } from '@strudel/core';
|
||||||
import { isUdels, } from './repl/util.mjs';
|
import { isUdels } from './repl/util.mjs';
|
||||||
|
|
||||||
export const defaultAudioDeviceName = 'System Standard';
|
export const defaultAudioDeviceName = 'System Standard';
|
||||||
|
|
||||||
|
|
@ -25,14 +25,14 @@ export const defaultSettings = {
|
||||||
isZen: false,
|
isZen: false,
|
||||||
soundsFilter: 'all',
|
soundsFilter: 'all',
|
||||||
patternFilter: 'community',
|
patternFilter: 'community',
|
||||||
panelPosition: 'right',
|
panelPosition: 'right',
|
||||||
userPatterns: '{}',
|
userPatterns: '{}',
|
||||||
audioDeviceName: defaultAudioDeviceName,
|
audioDeviceName: defaultAudioDeviceName,
|
||||||
};
|
};
|
||||||
|
|
||||||
let search = null;
|
let search = null;
|
||||||
if (typeof window !== 'undefined') {
|
if (typeof window !== 'undefined') {
|
||||||
search = new URLSearchParams(window.location.search);
|
search = new URLSearchParams(window.location.search);
|
||||||
}
|
}
|
||||||
// if running multiple instance in one window, it will use the settings for that instance. else default to normal
|
// if running multiple instance in one window, it will use the settings for that instance. else default to normal
|
||||||
const instance = parseInt(search?.get('instance') ?? '0');
|
const instance = parseInt(search?.get('instance') ?? '0');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue