diff options
Diffstat (limited to 'src/desktop/apps')
| -rw-r--r-- | src/desktop/apps/buttons.tsx | 0 | ||||
| -rw-r--r-- | src/desktop/apps/edit.tsx | 13 | ||||
| -rw-r--r-- | src/desktop/apps/index.tsx | 5 | ||||
| -rw-r--r-- | src/desktop/apps/music.tsx | 43 |
4 files changed, 61 insertions, 0 deletions
diff --git a/src/desktop/apps/buttons.tsx b/src/desktop/apps/buttons.tsx new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/desktop/apps/buttons.tsx diff --git a/src/desktop/apps/edit.tsx b/src/desktop/apps/edit.tsx new file mode 100644 index 0000000..00aba45 --- /dev/null +++ b/src/desktop/apps/edit.tsx @@ -0,0 +1,13 @@ +import { ComponentChildren } from "preact" + +export function Edit(props: Edit.Props) { + return <textarea autocomplete="off" spellcheck={false}> + {props.children} + </textarea> +} + +namespace Edit { + export type Props = { + children?: ComponentChildren + } +} diff --git a/src/desktop/apps/index.tsx b/src/desktop/apps/index.tsx new file mode 100644 index 0000000..a2954b6 --- /dev/null +++ b/src/desktop/apps/index.tsx @@ -0,0 +1,5 @@ +import { FunctionalComponent } from "preact"; +import { Edit } from "./edit"; +import { Music } from "./music"; + +export const APP_REGISTRY: Map<string, FunctionalComponent> = new Map(); diff --git a/src/desktop/apps/music.tsx b/src/desktop/apps/music.tsx new file mode 100644 index 0000000..b5646bd --- /dev/null +++ b/src/desktop/apps/music.tsx @@ -0,0 +1,43 @@ +// type Song = { +// name: string, +// url: string, +// length: number, +// +// bc_exclusive: boolean +// } +// +// const SONGS: = [ +// [], +// [], +// [], +// [], +// [], +// [], +// [], +// [], +// [], +// [], +// [] +// ] +// +// function Song() { +// +// } + +import { useState } from "preact/hooks" + +export function Music() { + const [userApproves, setUserApproves] = useState(false); + + if (userApproves) { + return <iframe style="border: 0; width: 350px; height: 500px;" src="https://bandcamp.com/EmbeddedPlayer/album=3374731395/size=large/bgcol=000000/linkcol=ff0047/transparent=true/" seamless><a href="https://sunnexo.bandcamp.com/album/netpunk">Netpunk by Sunnexo</a></iframe> + } else { + return <div class="external_warning"> + <div>Click here to load player from <a href="https://bandcamp.com">https://bandcamp.com</a></div> + <button onClick={() => setUserApproves(true)}> + Load player + </button> + </div> + } +} + |
