nandi/oripublic Fork 0
34e69b510306161654f26903a269247aefa9c94d
Commits
Clone
git clone https://git.rickub.com/nandi/ori.git
git clone ssh://git@rickub.com/nandi/ori.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

forked from bots-garden/ori

main.go · 46 lines · 1.2 KBGo Blame HistoryRaw
✨ Workspace panel, selectors, previews, desktop app, sandbox template, resizable file tree, light/dark theme 76d62ac k33g yesterday1// Command ori-desktop is a Wails v2 desktop shell around the ori web client.
2//
3// It does not reimplement ori: the ori server keeps serving the React SPA and
4// the WebSocket/file/terminal endpoints. The desktop app only remembers the
5// server URL, checks GET /healthz through a Go-bound method, then shows the
6// ori webapp inside the native window (an <iframe> in the embedded frontend —
7// Wails v2 exposes no runtime call to navigate the main webview to an
8// external URL, see README.md).
9package main
10
11import (
12 "embed"
13 "log"
14
15 "github.com/wailsapp/wails/v2"
16 "github.com/wailsapp/wails/v2/pkg/options"
17 "github.com/wailsapp/wails/v2/pkg/options/assetserver"
18)
19
20// assets is the plain HTML/CSS/JS frontend, embedded as-is (no bundler).
21//
22//go:embed all:frontend/src
23var assets embed.FS
24
25func main() {
26 app := NewApp()
27
28 err := wails.Run(&options.App{
29 Title: "ori",
30 Width: 1280,
31 Height: 860,
32 MinWidth: 640,
33 MinHeight: 400,
34 AssetServer: &assetserver.Options{
35 Assets: assets,
36 },
37 BackgroundColour: &options.RGBA{R: 24, G: 24, B: 27, A: 1},
38 OnStartup: app.startup,
39 Bind: []interface{}{
40 app,
41 },
42 })
43 if err != nil {
44 log.Fatalf("ori-desktop: %v", err)
45 }
46}