mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-02 14:30:29 +00:00
wip(desktop): progress
This commit is contained in:
parent
0a357be160
commit
20662e2101
7 changed files with 75 additions and 25 deletions
|
|
@ -1,7 +1,7 @@
|
|||
// @refresh reload
|
||||
import { render } from "solid-js/web"
|
||||
import { DesktopInterface } from "@/DesktopInterface"
|
||||
import { Platform, PlatformProvider } from "@/PlatformContext"
|
||||
import { App } from "@/app"
|
||||
import { Platform, PlatformProvider } from "@/context/platform"
|
||||
|
||||
const root = document.getElementById("root")
|
||||
if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
|
||||
|
|
@ -10,12 +10,17 @@ if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
|
|||
)
|
||||
}
|
||||
|
||||
const platform: Platform = {}
|
||||
const platform: Platform = {
|
||||
platform: "web",
|
||||
openLink(url: string) {
|
||||
window.open(url, "_blank")
|
||||
},
|
||||
}
|
||||
|
||||
render(
|
||||
() => (
|
||||
<PlatformProvider value={platform}>
|
||||
<DesktopInterface />
|
||||
<App />
|
||||
</PlatformProvider>
|
||||
),
|
||||
root!,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue