This commit is contained in:
Jade (Rose) Rowland 2024-06-14 15:40:37 -04:00
parent 1d95da7a3a
commit f3b83b41f5
5 changed files with 10 additions and 19 deletions

View File

@ -4,7 +4,6 @@ import { UdelFrame } from './UdelFrame';
import { useState } from 'react';
import UdelsHeader from './UdelsHeader';
const defaultHash = 'c3RhY2soCiAgCik%3D';
const getHashesFromUrl = () => {
@ -31,7 +30,7 @@ export function Udels() {
const onEvaluate = (key, code) => {
const hashes = getHashesFromUrl();
hashes[key] = code2hash(code);
updateURLHashes(hashes);
};
// useEffect(() => {

View File

@ -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">
<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'}>
<div
className={'mt-[1px] cursor-pointer'}
>
🌀
<div className={'mt-[1px] cursor-pointer'}>🌀</div>
<div className={'animate-pulse'}>
<span className="">strudel</span> <span className="text-sm">-UDELS</span>
</div>
<div className={'animate-pulse'}>
<span className="">strudel</span> <span className="text-sm">-UDELS</span>
</div>
</h1>
<NumberInput value={numWindows} setValue={setNumWindows} />
</div>

View File

@ -1,12 +1,10 @@
// type Props = {
// containerRef: React.MutableRefObject<HTMLElement | null>,
// editorRef: React.MutableRefObject<HTMLElement | null>,
// init: () => void
// }
export function Code(Props) {
const {editorRef, containerRef, init} = Props;
const { editorRef, containerRef, init } = Props;
return (
<section

View File

@ -7,7 +7,6 @@ import BigPlayButton from '@src/repl/components/BigPlayButton';
import UserFacingErrorMessage from '@src/repl/components/UserFacingErrorMessage';
import { Header } from './Header';
// type Props = {
// context: replcontext,
// containerRef: React.MutableRefObject<HTMLElement | null>,
@ -23,7 +22,7 @@ export default function ReplEditor(Props) {
const showPanel = !isEmbedded;
return (
<ReplContext.Provider value={context}>
<div className='h-full flex flex-col relative'>
<div className="h-full flex flex-col relative">
<Loader active={pending} />
<Header context={context} />
{isEmbedded && <BigPlayButton started={started} handleTogglePlay={handleTogglePlay} />}

View File

@ -1,7 +1,7 @@
import { persistentMap } from '@nanostores/persistent';
import { useStore } from '@nanostores/react';
import { register } from '@strudel/core';
import { isUdels, } from './repl/util.mjs';
import { isUdels } from './repl/util.mjs';
export const defaultAudioDeviceName = 'System Standard';
@ -25,14 +25,14 @@ export const defaultSettings = {
isZen: false,
soundsFilter: 'all',
patternFilter: 'community',
panelPosition: 'right',
panelPosition: 'right',
userPatterns: '{}',
audioDeviceName: defaultAudioDeviceName,
};
let search = null;
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
const instance = parseInt(search?.get('instance') ?? '0');