Skip to content

Commit 636d9f3

Browse files
committed
[frontend] update wisp config
1 parent b548605 commit 636d9f3

File tree

3 files changed

+6
-18
lines changed

3 files changed

+6
-18
lines changed

frontend/src/components/Omnibox.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import iconShield from "@ktibow/iconset-ion/shield-outline";
88
import iconStar from "@ktibow/iconset-ion/star-outline";
99
import iconSearch from "@ktibow/iconset-ion/search";
1010
import { createMenu, setContextMenu } from "./Menu";
11-
import { browser, client } from "../main";
11+
import { browser, scramjet } from "../main";
1212
import { IconButton } from "./IconButton";
1313
import { createDelegate, type Delegate } from "dreamland/core";
1414
import type { Tab } from "../Tab";
@@ -41,8 +41,10 @@ export const UrlInput: Component<
4141
this.overflowItems = [];
4242
this.value = "";
4343
const fetchSuggestions = async () => {
44-
let resp = await client.fetch(
45-
`http://suggestqueries.google.com/complete/search?client=chrome&q=${encodeURIComponent(this.input.value)}`
44+
let resp = await fetch(
45+
scramjet.encodeUrl(
46+
`http://suggestqueries.google.com/complete/search?client=chrome&q=${encodeURIComponent(this.input.value)}`
47+
)
4648
);
4749
let json = await resp.json();
4850
console.log(json);

frontend/src/main.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,12 @@ import.meta.hot?.accept(() => location.reload());
66
import { Browser } from "./Browser";
77
import { createMenu } from "./components/Menu";
88
let app = document.getElementById("app")!;
9-
import { BareMuxConnection, BareClient } from "@mercuryworkshop/bare-mux";
109
import { Shell } from "./components/Shell";
1110
import { App } from "./App";
1211

13-
let connection = new BareMuxConnection("/baremux/worker.js");
14-
connection.setTransport("/epoxy/index.mjs", [{ wisp: "wss://anura.pro" }]);
15-
export let client = new BareClient();
16-
1712
const { ScramjetController } = $scramjetLoadController();
1813
export const scramjet = new ScramjetController({
14+
wisp: "ws://localhost:1337/",
1915
files: {
2016
wasm: "/scram/scramjet.wasm.wasm",
2117
all: "/scram/scramjet.all.js",

frontend/vite.config.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { defineConfig } from "vite";
2-
import { epoxyPath } from "@mercuryworkshop/epoxy-transport";
32
import { scramjetPath } from "@mercuryworkshop/scramjet";
4-
import { baremuxPath } from "@mercuryworkshop/bare-mux/node";
53

64
import { viteStaticCopy } from "vite-plugin-static-copy";
75

@@ -10,14 +8,6 @@ export default defineConfig({
108
viteStaticCopy({
119
structured: false,
1210
targets: [
13-
{
14-
src: epoxyPath + "/*",
15-
dest: "epoxy/",
16-
},
17-
{
18-
src: baremuxPath + "/*",
19-
dest: "baremux/",
20-
},
2111
{
2212
src: scramjetPath + "/*",
2313
dest: "scram/",

0 commit comments

Comments
 (0)