feat(desktop): redesign the browser bar (#53488)

This commit is contained in:
Luke Parker
2026-10-06 19:00:29 +10:00
committed by GitHub
Unverified
parent 8eb2ebd96c
commit b1629294ec
84 changed files with 2026 additions and 368 deletions
+124 -17
View File
@@ -227,17 +227,17 @@ story("keeps the comment editor and its actions inside the page", async ({ page
story("shows the empty state over a blank native page and restores navigation", async ({ page }) => {
const root = page.getByTestId("browser-pane-fixture")
await root.getByRole("button", { name: "Blank page", exact: true }).click()
await expect(root.getByText("Enter URL", { exact: true })).toBeVisible()
await expect(root.getByText('Or prompt "Open in the app browser"', { exact: true })).toBeVisible()
await expect(root.getByText("Open a page", { exact: true })).toBeVisible()
await expect(root.getByText("Preview your app, read docs, or browse the web.", { exact: true })).toBeVisible()
await expect(root.getByTestId("native-Alpha")).toHaveAttribute("data-visible", "false")
await expect(root.getByRole("button", { name: "Reload", exact: true })).toBeDisabled()
const address = root.getByRole("textbox", { name: "Browser address", exact: true })
const address = root.getByRole("combobox", { name: "Browser address", exact: true })
await address.fill("https://example.com/")
await expect(root.getByText("Enter URL", { exact: true })).toBeVisible()
await expect(root.getByText("Open a page", { exact: true })).toBeVisible()
await address.press("Enter")
await expect(address).not.toBeFocused()
await expect(root.getByText("Enter URL", { exact: true })).toBeHidden()
await expect(root.getByText("Open a page", { exact: true })).toBeHidden()
await expect(root.getByTestId("native-Alpha")).toHaveAttribute("data-visible", "true")
await expect(root.getByRole("button", { name: "Reload", exact: true })).toBeEnabled()
})
@@ -245,9 +245,9 @@ story("shows the empty state over a blank native page and restores navigation",
story("keeps Stop available and hides the empty state while a blank page loads", async ({ page }) => {
const root = page.getByTestId("browser-pane-fixture")
await root.getByRole("button", { name: "Loading page", exact: true }).click()
await expect(root.getByText("Enter URL", { exact: true })).toBeHidden()
await expect(root.getByText("Open a page", { exact: true })).toBeHidden()
await root.getByRole("button", { name: "Stop", exact: true }).click()
await expect(root.getByText("Enter URL", { exact: true })).toBeVisible()
await expect(root.getByText("Open a page", { exact: true })).toBeVisible()
await expect(root.getByTestId("native-Alpha")).toHaveAttribute("data-visible", "false")
})
@@ -255,12 +255,12 @@ story("keeps the submitted URL visible until the browser reports navigation", as
const root = page.getByTestId("browser-pane-fixture")
await root.getByRole("button", { name: "Blank page", exact: true }).click()
await root.getByRole("button", { name: "Delay navigation", exact: true }).click()
const address = root.getByRole("textbox", { name: "Browser address", exact: true })
const address = root.getByRole("combobox", { name: "Browser address", exact: true })
await address.fill("https://example.com/")
await address.press("Enter")
await expect(address).not.toBeFocused()
await expect(address).toHaveValue("https://example.com/")
await expect(root.getByText("Enter URL", { exact: true })).toBeHidden()
await expect(root.getByText("Open a page", { exact: true })).toBeHidden()
await root.getByRole("button", { name: "Complete navigation", exact: true }).click()
await expect(root.getByTestId("native-Alpha")).toHaveAttribute("data-visible", "true")
@@ -274,7 +274,7 @@ story("keeps the submitted URL visible until the browser reports navigation", as
story("restores the current URL each time the same submitted navigation is blocked", async ({ page }) => {
const root = page.getByTestId("browser-pane-fixture")
await root.getByRole("button", { name: "Delay navigation", exact: true }).click()
const address = root.getByRole("textbox", { name: "Browser address", exact: true })
const address = root.getByRole("combobox", { name: "Browser address", exact: true })
for (const submission of [1, 2]) {
await story.step(`blocked submission ${submission}`, async () => {
@@ -296,7 +296,7 @@ story("shows a themed failure state for only the failed tab and allows retry", a
await expect(root.getByText("Check the URL and your connection, then try again.", { exact: true })).toBeVisible()
await expect(root.getByText("Request failed", { exact: true })).toBeHidden()
await expect(root.getByTestId("native-Alpha")).toHaveAttribute("data-visible", "false")
await expect(root.getByRole("textbox", { name: "Browser address", exact: true })).toHaveValue(
await expect(root.getByRole("combobox", { name: "Browser address", exact: true })).toHaveValue(
"https://alpha.example/",
)
@@ -317,7 +317,7 @@ story("returns a failed tab to the empty state when an empty URL is submitted",
await expect(root.getByText("URL can't be reached", { exact: true })).toBeVisible()
await root.getByRole("button", { name: "Delay navigation", exact: true }).click()
const address = root.getByRole("textbox", { name: "Browser address", exact: true })
const address = root.getByRole("combobox", { name: "Browser address", exact: true })
await address.fill("")
await address.press("Enter")
await expect(address).not.toBeFocused()
@@ -326,14 +326,14 @@ story("returns a failed tab to the empty state when an empty URL is submitted",
await expect(root.getByRole("button", { name: "Stop", exact: true })).toBeEnabled()
await root.getByRole("button", { name: "Complete navigation", exact: true }).click()
await expect(root.getByText("URL can't be reached", { exact: true })).toBeHidden()
await expect(root.getByText("Enter URL", { exact: true })).toBeVisible()
await expect(root.getByText("Open a page", { exact: true })).toBeVisible()
await expect(root.getByRole("button", { name: "Reload", exact: true })).toBeDisabled()
await expect(root.getByTestId("native-Alpha")).toHaveAttribute("data-visible", "false")
})
story("selects the full URL when the address field gains focus", async ({ page }) => {
const root = page.getByTestId("browser-pane-fixture")
const address = root.getByRole("textbox", { name: "Browser address", exact: true })
const address = root.getByRole("combobox", { name: "Browser address", exact: true })
await address.click()
await expect(address).toHaveJSProperty("selectionStart", 0)
await expect(address).toHaveJSProperty("selectionEnd", "https://alpha.example/".length)
@@ -352,10 +352,55 @@ story("selects the full URL when the address field gains focus", async ({ page }
.toBe(true)
})
story("draws only the address at rest when focus leaves the window with the field selected", async ({ page }) => {
const root = page.getByTestId("browser-pane-fixture")
const address = root.getByRole("combobox", { name: "Browser address", exact: true })
await address.click()
// Chromium blurs the field when the window or the native page takes focus, and the field keeps its full selection.
await address.evaluate((input: HTMLInputElement) => {
input.dispatchEvent(new FocusEvent("blur"))
input.select()
})
await expect(address).toHaveJSProperty("selectionStart", 0)
await expect(address).toHaveJSProperty("selectionEnd", "https://alpha.example/".length)
await page.mouse.move(0, 0)
// Computed ::selection styles do not report the default highlight, so compare the input's own paint with the
// selection collapsed. The drawn address is hidden: a selection layer can change how its text is antialiased.
await page.addStyleTag({ content: '[data-slot="browser-address-display"] { visibility: hidden }' })
const field = root.locator('[data-component="browser-address"]')
const selected = (await field.screenshot()).toString("base64")
await address.evaluate((input: HTMLInputElement) => input.setSelectionRange(0, 0))
const collapsed = (await field.screenshot()).toString("base64")
const changed = await page.evaluate(
async (shots) => {
const pixels = await Promise.all(
shots.map(async (data) => {
const image = new Image()
image.src = `data:image/png;base64,${data}`
await image.decode()
const canvas = new OffscreenCanvas(image.width, image.height)
canvas.getContext("2d")?.drawImage(image, 0, 0)
return canvas.getContext("2d")?.getImageData(0, 0, image.width, image.height).data ?? new Uint8ClampedArray()
}),
)
return Array.from({ length: (pixels[0]?.length ?? 0) / 4 }, (_, index) => index * 4).filter((offset) =>
[0, 1, 2].some((channel) => pixels[0]?.[offset + channel] !== pixels[1]?.[offset + channel]),
).length
},
[selected, collapsed],
)
expect(changed).toBe(0)
})
story("keeps the current page visible while a submitted URL loads", async ({ page }) => {
const root = page.getByTestId("browser-pane-fixture")
await root.getByRole("button", { name: "Delay navigation", exact: true }).click()
const address = root.getByRole("textbox", { name: "Browser address", exact: true })
const address = root.getByRole("combobox", { name: "Browser address", exact: true })
await address.fill("https://example.com/")
await address.press("Enter")
await expect(root.getByTestId("native-Alpha")).toHaveAttribute("data-visible", "true")
@@ -371,12 +416,74 @@ story("keeps the current page visible while a submitted URL loads", async ({ pag
story("keeps the current page and restores its URL when an empty address is submitted", async ({ page }) => {
const root = page.getByTestId("browser-pane-fixture")
const address = root.getByRole("textbox", { name: "Browser address", exact: true })
const address = root.getByRole("combobox", { name: "Browser address", exact: true })
await address.fill("")
await address.press("Enter")
await expect(address).not.toBeFocused()
await expect(address).toHaveValue("https://alpha.example/")
await expect(root.getByTestId("native-Alpha")).toHaveAttribute("data-visible", "true")
await expect(root.getByText("Enter URL", { exact: true })).toBeHidden()
await expect(root.getByText("Open a page", { exact: true })).toBeHidden()
await expect(root.getByRole("button", { name: "Reload", exact: true })).toBeEnabled()
})
story("suggests visited pages and opens the first one that completes the typed address", async ({ page }) => {
const root = page.getByTestId("browser-pane-fixture")
await root.getByRole("button", { name: "Seed history", exact: true }).click()
const address = root.getByRole("combobox", { name: "Browser address", exact: true })
await address.click()
await address.pressSequentially("localhost")
const options = page.getByRole("option")
await expect(options).toHaveCount(1)
await expect(options.first()).toHaveAttribute("aria-selected", "true")
await address.press("Enter")
await expect(address).toHaveValue("http://localhost:5173/settings")
// A search query also opens the first match; stepping past the list leaves the typed text, which searches.
await address.click()
await address.pressSequentially("color format")
await expect(options).toHaveCount(1)
await expect(options.first()).toHaveAttribute("aria-selected", "true")
await address.press("ArrowDown")
await expect(options.first()).toHaveAttribute("aria-selected", "false")
await address.press("Enter")
await expect(address).toHaveValue("https://www.google.com/search?q=color%20format")
})
story("lists recent pages on a blank tab and opens one", async ({ page }) => {
const root = page.getByTestId("browser-pane-fixture")
await root.getByRole("button", { name: "Seed history", exact: true }).click()
await root.getByRole("button", { name: "Blank page", exact: true }).click()
await expect(root.getByText("Recent", { exact: true })).toBeVisible()
await root.getByRole("button", { name: /^Settings - Preview/ }).click()
await expect(root.getByRole("combobox", { name: "Browser address", exact: true })).toHaveValue(
"http://localhost:5173/settings",
)
await expect(root.getByTestId("native-Alpha")).toHaveAttribute("data-visible", "true")
})
story("focuses the address field when the page uses the address shortcut", async ({ page }) => {
const root = page.getByTestId("browser-pane-fixture")
await root.getByRole("button", { name: "Address shortcut", exact: true }).click()
const address = root.getByRole("combobox", { name: "Browser address", exact: true })
await expect(address).toBeFocused()
await expect(address).toHaveJSProperty("selectionEnd", "https://alpha.example/".length)
})
story("shows the page's cookies in the site information and clears them", async ({ page }) => {
const root = page.getByTestId("browser-pane-fixture")
await root.getByRole("button", { name: "Site information", exact: true }).click()
const site = page.getByRole("dialog")
await expect(site).toContainText("3 cookies in use")
await site.getByRole("button", { name: "Clear", exact: true }).click()
await expect(site).toContainText("0 cookies in use")
})
story("zooms the page from the browser options and shows its zoom", async ({ page }) => {
const root = page.getByTestId("browser-pane-fixture")
await root.getByRole("button", { name: "Browser options", exact: true }).click()
await page.getByRole("menuitem", { name: /^Zoom in/ }).click()
await expect(root.getByText("Zoom: 110", { exact: true })).toBeVisible()
await expect(page.getByRole("menuitem", { name: /^Reset zoom/ })).toContainText("110%")
await page.getByRole("menuitem", { name: /^Reset zoom/ }).click()
await expect(root.getByText("Zoom: 100", { exact: true })).toBeVisible()
})
@@ -0,0 +1,82 @@
import { expect, test } from "bun:test"
import { addressParts, resolveAddress } from "./address"
import { remember, suggest } from "./history"
test("the address field navigates to what reads as an address and searches for anything else", () => {
const search = (query: string) => `https://www.google.com/search?q=${encodeURIComponent(query)}`
expect(
[
"",
"https://example.com/a b",
"about:blank",
"localhost:3000",
"localhost",
"[::1]:5173/app",
"127.0.0.1:8080",
"dev-box:4096/health",
"developer.mozilla.org/en-US/docs",
"mdn",
"css grid gap",
"localhost 3000",
].map(resolveAddress),
).toEqual([
"about:blank",
"https://example.com/a b",
"about:blank",
"localhost:3000",
"localhost",
"[::1]:5173/app",
"127.0.0.1:8080",
"dev-box:4096/health",
"developer.mozilla.org/en-US/docs",
search("mdn"),
search("css grid gap"),
search("localhost 3000"),
])
})
test("the field draws the whole URL, split around its host, in exactly the input's characters", () => {
const urls = [
"https://developer.mozilla.org/en-US/docs/Web?q=1#top",
"http://localhost:5173/",
"https://alpha.example",
"file:///C:/repo/out/index.html",
"HTTPS://Example.COM/%7Euser",
]
expect(urls.map(addressParts)).toEqual([
{ scheme: "https://", host: "developer.mozilla.org", rest: "/en-US/docs/Web?q=1#top" },
{ scheme: "http://", host: "localhost:5173", rest: "/" },
{ scheme: "https://", host: "alpha.example", rest: "" },
{ scheme: "file://", host: "", rest: "/C:/repo/out/index.html" },
{ scheme: "HTTPS://", host: "Example.COM", rest: "/%7Euser" },
])
expect(urls.map((url) => Object.values(addressParts(url)).join(""))).toEqual(urls)
})
test("history keeps one newest-first visit per URL and suggests addresses that complete the query first", () => {
const visits = ["https://docs.example/mdn-guide", "https://developer.mozilla.org/", "https://www.mdn.dev/"].reduce(
(list, url) => remember(list, { url, title: url.includes("mozilla") ? "MDN Web Docs" : "Other" }),
remember([], { url: "https://developer.mozilla.org/", title: "Old title" }),
)
expect(visits.map((visit) => [visit.url, visit.title])).toEqual([
["https://www.mdn.dev/", "Other"],
["https://developer.mozilla.org/", "MDN Web Docs"],
["https://docs.example/mdn-guide", "Other"],
])
// A leading www. and the scheme are not typed, so mdn completes www.mdn.dev; the others only contain it.
expect(suggest(visits, "MDN", 5).map((visit) => visit.url)).toEqual([
"https://www.mdn.dev/",
"https://developer.mozilla.org/",
"https://docs.example/mdn-guide",
])
expect(suggest(visits, " ", 5)).toEqual([])
expect(
Array.from({ length: 40 }, (_, index) => `https://example.com/${index}`).reduce(
(list, url) => remember(list, { url, title: "" }),
visits,
),
).toHaveLength(30)
})
@@ -0,0 +1,65 @@
/** Where text that is not an address goes. Shared with the system browser's default so results look familiar. */
const SEARCH = "https://www.google.com/search?q="
/**
* What the address field navigates to for the text the user entered: the text itself when it reads as an address
* (a scheme, `localhost`, a port, or a dotted host), else a web search for it. Main adds the missing scheme.
*/
export function resolveAddress(input: string) {
const value = input.trim()
if (!value) return "about:blank"
return searches(value) ? `${SEARCH}${encodeURIComponent(value)}` : value
}
/** Whether the address field would search for the text rather than open it. */
export function searches(input: string) {
const value = input.trim()
if (/^[a-z][a-z\d+.-]*:\/\//i.test(value) || /^about:/i.test(value)) return false
if (!value || /\s/.test(value)) return !!value
const host = value.split(/[/?#]/, 1)[0] ?? ""
return !(
/^(?:localhost|\[[\da-f:.]+\])(?::\d+)?$/i.test(host) ||
/:\d+$/.test(host) ||
/^[^.]+(?:\.[^.]+)+$/.test(host)
)
}
/**
* The address as the field draws it at rest: always the whole URL, with its host emphasized. The parts join back to
* exactly the text given, so the drawing lines up with the input's own text.
*/
export function addressParts(url: string) {
const match = /^([a-z][a-z\d+.-]*:\/\/)?([^/?#]*)(.*)$/is.exec(url)
return { scheme: match?.[1] ?? "", host: match?.[2] ?? url, rest: match?.[3] ?? "" }
}
/**
* How a page reached its content, for the site information.
* - `secure`: HTTPS.
* - `local`: HTTP on a loopback host, which resolves on the machine running the server.
* - `insecure`: HTTP elsewhere.
* - `file`: a workspace file.
*/
export function connection(url: string) {
if (!URL.canParse(url)) return
const parsed = new URL(url)
if (parsed.protocol === "https:") return "secure"
if (parsed.protocol === "file:") return "file"
if (parsed.protocol !== "http:") return
return loopback(parsed.hostname) ? "local" : "insecure"
}
/** Whether a host names this machine; for a remote server that is the server's machine, not the user's. */
export function loopback(hostname: string) {
return /^(?:localhost|127(?:\.\d{1,3}){3}|\[::1\]|::1)$/i.test(hostname) || hostname.endsWith(".localhost")
}
+240
View File
@@ -0,0 +1,240 @@
/* The browser bar's address field: the whole URL at rest, and an editable address with a focus border while the
field has focus. */
[data-component="browser-address"] {
position: relative;
display: flex;
align-items: center;
gap: 6px;
flex: 1 1 0;
min-width: 0;
height: 28px;
padding-inline: 8px;
border-radius: 6px;
background-color: var(--v2-background-bg-layer-01);
box-shadow: inset 0 0 0 0.5px transparent;
color: var(--v2-text-text-base);
font-size: 13px;
font-weight: 440;
line-height: var(--line-height-compact);
letter-spacing: -0.04px;
cursor: text;
&[data-site] {
padding-inline-start: 6px;
}
&:hover:not([data-editing]) {
background-image: linear-gradient(var(--v2-overlay-simple-overlay-hover), var(--v2-overlay-simple-overlay-hover));
}
&[data-editing] {
padding-inline-start: 8px;
box-shadow: inset 0 0 0 0.5px var(--v2-border-border-focus);
}
/* A focused page address sits where it sat at rest, 32px in; typed text and the placeholder sit at 30px. */
&[data-editing][data-address] {
gap: 8px;
}
[data-slot="browser-address-text"] {
position: relative;
flex: 1 1 0;
min-width: 0;
height: 100%;
}
[data-slot="browser-address-input"] {
position: absolute;
inset: 0;
width: 100%;
padding: 0;
border: none;
outline: none;
background: transparent;
font: inherit;
letter-spacing: inherit;
color: transparent;
&::placeholder {
color: var(--v2-text-text-faint);
}
}
&[data-editing] [data-slot="browser-address-input"] {
color: var(--v2-text-text-base);
}
/* Focus leaving the window (or into the page) ends editing but keeps the input's selection, which Chromium paints
over transparent text. At rest only the drawn address shows. */
&:not([data-editing]) [data-slot="browser-address-input"]::selection {
color: transparent;
background-color: transparent;
}
[data-slot="browser-address-display"],
[data-slot="browser-address-hint"] {
position: absolute;
inset: 0;
display: flex;
align-items: center;
overflow: hidden;
white-space: pre;
pointer-events: none;
}
[data-slot="browser-address-hint"] {
color: var(--v2-text-text-muted);
}
/* One line of the whole URL, ending in an ellipsis where the field ends. The scheme and the path are muted around
the host, and so is the ellipsis, which takes the line's color and almost always cuts the path. An address
without a host, such as a workspace file, keeps its path at full strength. */
[data-slot="browser-address-url"] {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
&[data-host] {
color: var(--v2-text-text-faint);
}
}
[data-slot="browser-address-muted"] {
color: var(--v2-text-text-faint);
}
[data-slot="browser-address-host"] {
color: var(--v2-text-text-base);
}
/* Page actions show on hover and while the field has focus. */
[data-slot="browser-address-actions"] {
display: none;
flex: none;
align-items: center;
gap: 8px;
}
&:is(:hover, :focus-within) [data-slot="browser-address-actions"] {
display: flex;
}
}
/* Suggestions from the browsing history, under the address field. */
[data-component="browser-suggestions"] {
z-index: 60;
width: calc(var(--kb-popper-anchor-width) + 16px);
padding: 8px;
border-radius: 12px;
background: var(--v2-background-bg-base);
box-shadow: var(--v2-elevation-floating);
outline: none;
transform-origin: var(--kb-popover-content-transform-origin);
}
[data-component="browser-page-row"] {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
height: 28px;
padding-inline: 8px;
border-radius: 6px;
color: var(--v2-text-text-base);
font-size: 13px;
font-weight: 440;
line-height: var(--line-height-compact);
letter-spacing: -0.04px;
text-align: start;
cursor: default;
&:hover {
background: var(--v2-overlay-simple-overlay-hover);
}
&[aria-selected="true"] {
background: var(--v2-overlay-simple-overlay-pressed);
}
[data-slot="browser-page-row-text"] {
display: flex;
flex: 1 1 0;
gap: 4px;
min-width: 0;
white-space: pre;
}
[data-slot="browser-page-row-title"] {
flex: none;
max-width: 60%;
overflow: hidden;
text-overflow: ellipsis;
}
[data-slot="browser-page-row-url"] {
flex: 1 1 0;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
color: var(--v2-text-text-muted);
}
mark {
background: none;
color: inherit;
font-weight: 530;
}
}
/* Suggestions read the address at full strength; the new tab page mutes it. */
[data-component="browser-suggestions"] [data-slot="browser-page-row-url"] {
color: var(--v2-text-text-base);
}
/* Site information under the site button. */
[data-component="browser-site"] {
z-index: 60;
display: flex;
flex-direction: column;
gap: 12px;
width: 320px;
padding: 12px;
border-radius: 12px;
background: var(--v2-background-bg-base);
box-shadow: var(--v2-elevation-floating);
outline: none;
color: var(--v2-text-text-base);
font-size: 13px;
font-weight: 440;
line-height: var(--line-height-compact);
letter-spacing: -0.04px;
transform-origin: var(--kb-popover-content-transform-origin);
[data-slot="browser-site-host"] {
min-width: 0;
margin: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: inherit;
font-weight: 530;
}
[data-slot="browser-site-row"] {
display: flex;
gap: 8px;
align-items: flex-start;
color: var(--v2-icon-icon-muted);
}
/* An action beside a row's text, centered on it. */
[data-slot="browser-site-row"] > [data-component="button-v2"] {
flex: none;
align-self: center;
}
[data-slot="browser-site-detail"] {
color: var(--v2-text-text-muted);
}
}
+128 -11
View File
@@ -6,6 +6,7 @@ import type { Embeds } from "../sdk/main"
import { createCdp, abortError, waitFor } from "./cdp"
import { createBrowserFiles } from "./files"
import { createDiagnostics } from "./diagnostics"
import { loadIcon } from "./icon"
import { createProfiling, type Recording } from "./profiling"
import type { BrowserNetwork } from "./network"
import { allowedDestination, destinationOrigin, fileURLWithin, localFileURL, normalizeURL, type Policy } from "./policy"
@@ -75,6 +76,35 @@ const pickedHighlight = { ...inspectHighlight, showInfo: false, showStyles: fals
// next hideHighlight would put its hover tool back.
const inspectOff = { mode: "none", highlightConfig: inspectHighlight }
// Chromium's zoom presets, so a step lands where it would in the system browser.
const zoomSteps = [0.25, 0.33, 0.5, 0.67, 0.75, 0.8, 0.9, 1, 1.1, 1.25, 1.5, 1.75, 2, 2.5, 3, 4, 5]
/** A page's icon as a data URL, and its zoom factor, 1 at 100%. */
export type PageDetail = { icon?: string; zoom: number }
/** The zoom a key press asks for: the system browser's zoom keys, with the platform's modifier already checked. */
function zoomKey(input: Electron.Input) {
if (input.key === "=" || input.key === "+" || input.code === "NumpadAdd") return "in"
if (input.key === "-" || input.code === "NumpadSubtract") return "out"
if (input.key === "0") return "reset"
}
/** The address a cookie is removed by: its domain without the leading dot, its path, and its scheme. */
function cookieURL(cookie: Electron.Cookie) {
return `${cookie.secure ? "https" : "http"}://${(cookie.domain ?? "").replace(/^\./, "")}${cookie.path ?? "/"}`
}
/** The next preset in the direction, or 100%; the current factor at either end. */
function zoomStep(current: number, direction: "in" | "out" | "reset") {
if (direction === "reset") return 1
if (direction === "in") return zoomSteps.find((step) => step > current + 0.001) ?? current
return zoomSteps.findLast((step) => step < current - 0.001) ?? current
}
export type BrowserPage = ReturnType<typeof createBrowserPage>
export function createBrowserPage(
@@ -86,8 +116,15 @@ export function createBrowserPage(
publish: (error?: string) => void
/** Reports the element picker starting, stopping, or picking an element. */
inspect?: (event: { active: boolean; element?: PaneElement }) => void
/** Reports the page's icon or zoom changing. */
detail?: (detail: PageDetail) => void
/** The page's zoom changed, which Chromium applies to every page of the same origin in the partition. */
zoomed?: () => void
/** The user pressed the address shortcut while the page had focus. */
address?: () => void
fail: () => void
popup: (options: Electron.BrowserWindowConstructorOptions) => WebContents
/** Adopts a page the document opened; a background one leaves the current tab selected. */
popup: (options: Electron.BrowserWindowConstructorOptions, background: boolean) => WebContents
initialize?: boolean
restore?: Browser.Tab
popupOptions?: Electron.BrowserWindowConstructorOptions
@@ -148,16 +185,56 @@ export function createBrowserPage(
return
}
const step =
input.key === "=" || input.key === "+" || input.code === "NumpadAdd"
? 0.5
: input.key === "-" || input.code === "NumpadSubtract"
? -0.5
: 0
// The system browser's address shortcut. The app's own focus moves to the address field.
if (!input.shift && input.code === "KeyL") {
event.preventDefault()
options.address?.()
if (!step && input.key !== "0") return
return
}
const direction = zoomKey(input)
if (!direction) return
event.preventDefault()
contents.setZoomLevel(input.key === "0" ? 0 : contents.getZoomLevel() + step)
zoom(direction)
})
// Ctrl or Cmd with the mouse wheel; Electron leaves applying it to the app.
contents.on("zoom-changed", (_event, direction) => zoom(direction))
const zoom = (direction: "in" | "out" | "reset") => {
const current = contents.getZoomFactor()
const next = zoomStep(current, direction)
if (next === current) return
contents.setZoomFactor(next)
options.zoomed?.()
}
let icon: string | undefined
// Bumped by every icon change, so a slow fetch for an earlier icon cannot replace a later one.
let iconRequest = 0
let reported = ""
const detail = () => {
if (closed) return
const next: PageDetail = { zoom: contents.getZoomFactor() }
if (icon) next.icon = icon
const key = `${next.zoom}:${next.icon ?? ""}`
if (key === reported) return
reported = key
options.detail?.(next)
}
contents.on("page-favicon-updated", (_event, favicons) => {
const request = ++iconRequest
void loadIcon(favicons, options.network).then((value) => {
if (closed || request !== iconRequest) return
icon = value
detail()
})
})
const cdp = createCdp(contents)
const documents = new Map<string, string>()
@@ -192,6 +269,8 @@ export function createBrowserPage(
revision++
})
let closed = false
// The committed document's origin; its icon stays while navigations remain on it.
let origin = ""
// Whether the native surface holds a real document worth showing. Chromium keeps the
// previous document painted until the next one renders, so a shown page stays shown
// through later navigations; blank and failed documents hide until a real one is ready.
@@ -243,6 +322,16 @@ export function createBrowserPage(
// error statuses are real documents from the user's server and stay visible.
if (status === 502) failure = { url, message: `${status} ${statusText}`.trim().slice(0, 2_048) }
// Another site's icon arrives with its document; the same site keeps its icon meanwhile, as tabs do.
if (!URL.canParse(url) || new URL(url).origin !== origin) {
icon = undefined
iconRequest++
}
origin = URL.canParse(url) ? new URL(url).origin : ""
// Chromium keeps a zoom per origin, so a new site may have its own.
detail()
// A blank or failed document paints at commit; a real one waits for dom-ready.
if (url === "about:blank" || failure) settle()
publish()
@@ -287,7 +376,8 @@ export function createBrowserPage(
contents.on("will-frame-navigate", guard)
contents.on("will-redirect", guard)
contents.setWindowOpenHandler(({ url }) =>
// Links opened with Cmd or Ctrl arrive as background tabs, and stay behind the current one as in the system browser.
contents.setWindowOpenHandler(({ url, disposition }) =>
url === "about:blank" || destinationOrigin(url)
? {
action: "allow",
@@ -305,7 +395,7 @@ export function createBrowserPage(
partition: options.partition,
},
},
createWindow: (popupOptions) => options.popup(popupOptions),
createWindow: (popupOptions) => options.popup(popupOptions, disposition === "background-tab"),
}
: { action: "deny" },
)
@@ -453,6 +543,33 @@ export function createBrowserPage(
if (closed) return
await highlightPicked(ref).catch(() => undefined)
},
zoom(direction: "in" | "out" | "reset") {
if (!closed) zoom(direction)
},
async site() {
const url = contents.getURL()
if (closed || !destinationOrigin(url)) return { cookies: 0 }
return { cookies: (await contents.session.cookies.get({ url })).length }
},
/** Deletes what the page's site stored: the cookies its address can read, and its origin's storage. */
async clearSite() {
const url = contents.getURL()
const origin = destinationOrigin(url)
if (closed || !origin) return
const cookies = await contents.session.cookies.get({ url })
await Promise.all(cookies.map((cookie) => contents.session.cookies.remove(cookieURL(cookie), cookie.name)))
await contents.session.clearStorageData({
origin,
storages: ["localstorage", "indexdb", "serviceworkers", "cachestorage", "filesystem", "shadercache"],
})
if (!closed) contents.reload()
},
/** Reports the page's icon and zoom when either changed since the last report. */
detail,
async execute(command: Browser.Command, signal: AbortSignal): Promise<Browser.Result> {
await ready
abortError(signal)
@@ -40,6 +40,30 @@ export function commentNote(input: ElementComment): ComposerNote {
return ref ? { ...note, live: { subject: subject(input, ref), href: `${input.tabID}#${ref}` } } : note
}
/** The composer note for a comment on a whole page; its chip shows the page's tab again. */
export function pageNote(input: {
origin: string
tabID: Browser.TabID
url: string
title: string
label: string
comment: string
}): ComposerNote {
// Page-provided strings are quoted so they read as data, not as part of the user's request.
const title = input.title ? ` titled ${JSON.stringify(input.title)}` : ""
return {
type: "note",
origin: input.origin,
commentID: crypto.randomUUID(),
label: input.label,
icon: "outline-globe",
subject: `the page in browser tab ${input.tabID} at ${input.url}${title}`,
comment: input.comment,
href: input.tabID,
}
}
/** The tab a note's href names, and its element ref while the note is live. */
export function readHref(href: string): NoteHref | undefined {
const [tabID, ref] = href.split("#")
@@ -73,6 +73,9 @@ function fixture(strip: string[] = []) {
highlight: async (input) => {
highlights.push(input)
},
zoom: async () => undefined,
site: async () => ({ cookies: 0 }),
clearSite: async () => undefined,
close: async (input) => {
closed.push(input.binding)
},
@@ -106,6 +109,8 @@ function fixture(strip: string[] = []) {
focus: (tabID) => routed.focus.push(tabID),
preview: (path) => routed.preview.push(path),
inspect: (event) => routed.inspect.push(event),
page: () => undefined,
address: () => undefined,
})
const emit = (index: number, event: PaneEvent) => listeners.get(calls[index].input.binding)?.(event)
@@ -6,6 +6,10 @@ type Client = IpcClient<(typeof BrowserPane)["spec"]>
export type InspectEvent = Extract<PaneEvent, { type: "inspect" }>
export type PageEvent = Extract<PaneEvent, { type: "page" }>
export type Zoom = "in" | "out" | "reset"
export type Connection = ReturnType<typeof createConnection>
export type Registration = {
@@ -14,6 +18,9 @@ export type Registration = {
command(command: Browser.Action): Promise<void>
inspect(tabID: Browser.TabID, enabled: boolean): void
highlight(tabID: Browser.TabID, ref?: Browser.Ref): void
zoom(tabID: Browser.TabID, zoom: Zoom): void
site(tabID: Browser.TabID): Promise<{ cookies: number }>
clearSite(tabID: Browser.TabID): Promise<void>
close(): void
}
@@ -46,6 +53,10 @@ export function createConnection(input: {
focus: (tabID: Browser.TabID) => void
preview: (path: string) => void
inspect: (event: InspectEvent) => void
/** A page's icon or zoom changed. */
page: (event: PageEvent) => void
/** The user pressed the address shortcut while the page had focus. */
address: (tabID: Browser.TabID) => void
}) {
const state: ConnectionState = { browser: null, embeds: {}, suspended: false }
let disposed = false
@@ -142,6 +153,10 @@ export function createConnection(input: {
if (event.type === "inspect") return input.inspect(event)
if (event.type === "page") return input.page(event)
if (event.type === "address") return input.address(event.tabID)
if (event.type === "embed") {
state.embeds = { ...state.embeds, [event.tabID]: event.embed }
@@ -230,6 +245,12 @@ export function createConnection(input: {
highlight(tabID: Browser.TabID, ref?: Browser.Ref) {
state.registration?.highlight(tabID, ref)
},
zoom(tabID: Browser.TabID, zoom: Zoom) {
state.registration?.zoom(tabID, zoom)
},
/** The page's site data; undefined while no registration can answer. */
site: (tabID: Browser.TabID) => state.registration?.site(tabID),
clearSite: (tabID: Browser.TabID) => state.registration?.clearSite(tabID),
dispose() {
disposed = true
clearTimeout(retry)
@@ -273,6 +294,12 @@ function open(
.then(() => client.highlight(ref === undefined ? { binding, tabID } : { binding, tabID, ref }))
.catch(() => undefined)
},
zoom(tabID, zoom) {
if (status.closed) return
void ready.then(() => client.zoom({ binding, tabID, zoom })).catch(() => undefined)
},
site: (tabID) => ready.then(() => client.site({ binding, tabID })),
clearSite: (tabID) => ready.then(() => client.clearSite({ binding, tabID })),
close() {
if (status.closed) return
status.closed = true
@@ -0,0 +1,106 @@
import { Schema } from "effect"
/** A page the browser showed, newest first in the history. */
export const Visit = Schema.Struct({
url: Schema.String,
title: Schema.String,
/** The page's icon as a data URL, when it was small enough to keep. */
icon: Schema.optionalKey(Schema.String),
})
export type Visit = typeof Visit.Type
export const History = Schema.Struct({ visits: Schema.Array(Visit) })
export type History = typeof History.Type
/** Visits the history keeps; the new tab page shows the first few. */
const MAX_VISITS = 30
/** Icons larger than this stay out of the stored history; a 32px PNG is a few kilobytes. */
const MAX_STORED_ICON = 6_000
/** The pages the history records: web pages and workspace files, not blank or internal ones. */
export function recordable(url: string) {
return /^(?:https?|file):\/\//i.test(url)
}
/**
* Puts a visit first, replacing an earlier visit of the same URL, and drops the oldest past the limit. A visit without
* a title or icon yet keeps the earlier visit's.
*/
export function remember(visits: readonly Visit[], visit: Pick<Visit, "url" | "title">, icon?: string): Visit[] {
const earlier = visits.find((item) => item.url === visit.url)
const kept = storable(icon) ?? earlier?.icon
const title = visit.title || earlier?.title || ""
const next: Visit = kept ? { url: visit.url, title, icon: kept } : { url: visit.url, title }
// Copies, so a store that reconciles the new list in place never sees its own records at moved positions.
return [next, ...visits.flatMap((item) => (item.url === visit.url ? [] : [{ ...item }]))].slice(0, MAX_VISITS)
}
/** The visits with a newly loaded icon on the visit of `url`, or undefined when nothing would change. */
export function withIcon(visits: readonly Visit[], url: string, icon: string) {
const stored = storable(icon)
if (!stored || !visits.some((visit) => visit.url === url && visit.icon !== stored)) return
return visits.map((visit) => (visit.url === url ? { ...visit, icon: stored } : { ...visit }))
}
function storable(icon: string | undefined) {
return icon && icon.length <= MAX_STORED_ICON ? icon : undefined
}
/**
* Visits whose address or title contains the query, case-insensitively. Addresses that begin with the query come
* first, as the address field completes them; within each group the newest visit leads.
*/
export function suggest(visits: readonly Visit[], query: string, limit: number) {
const needle = query.trim().toLowerCase()
if (!needle) return []
const matches = visits.filter(
(visit) => bare(visit.url).toLowerCase().includes(needle) || visit.title.toLowerCase().includes(needle),
)
return [
...matches.filter((visit) => completes(visit, needle)),
...matches.filter((visit) => !completes(visit, needle)),
].slice(0, limit)
}
/** Whether the visit's address begins with what the user typed, so Enter may open it in place of the typed text. */
export function completes(visit: Visit, query: string) {
const needle = query.trim().toLowerCase()
return !!needle && bare(visit.url).toLowerCase().startsWith(needle)
}
/** Splits text around case-insensitive matches of the query, for drawing the matched parts. */
export function highlight(text: string, query: string) {
const needle = query.trim().toLowerCase()
if (!needle) return [{ text, match: false }]
const lower = text.toLowerCase()
const starts = Array.from(lower.matchAll(new RegExp(escape(needle), "g")), (found) => found.index)
const bounds = starts.flatMap((start) => [start, start + needle.length])
return [0, ...bounds, text.length].flatMap((start, index, all) => {
const end = all[index + 1]
return end === undefined || end === start ? [] : [{ text: text.slice(start, end), match: index % 2 === 1 }]
})
}
/** The address without its web scheme or a leading `www.`, as people type it. */
export function bare(url: string) {
return url.replace(/^https?:\/\//i, "").replace(/^www\./i, "")
}
function escape(text: string) {
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
}
@@ -3,13 +3,10 @@ export default {
"command.reload": "የአሳሽ ገጽን እንደገና ጫን",
"tab.title": "አሳሽ",
"address.label": "የአሳሽ አድራሻ",
"address.placeholder": "URL ያስገቡ",
"action.stop": "አቁም",
replaced: "የአሳሽ መቆጣጠሪያ ወደ ሌላ የዴስክቶፕ መስኮት ተንቀሳቅሷል።",
unsupported: "ይህ የዴስክቶፕ መተግበሪያ የአሳሽ ፓነሉን አይደግፍም።",
suspended: "አሳሽ ታግዷል። እንደገና ለመገናኘት ከዚህ ክፍለ ጊዜ ጋር ይገናኙ።",
"empty.title": "URL ያስገቡ",
"empty.description": "ወይም «በመተግበሪያው አሳሽ ክፈት» ብለው ይጠይቁ",
"failed.title": "URL ላይ መድረስ አልተቻለም",
"failed.description": "URL-ውን እና ግንኙነትዎን ይፈትሹ፣ ከዚያ እንደገና ይሞክሩ።",
"action.reload": "ዳግም ጫን",
@@ -3,13 +3,10 @@ export default {
"command.reload": "إعادة تحميل صفحة المتصفح",
"tab.title": "المتصفح",
"address.label": "عنوان المتصفح",
"address.placeholder": "أدخل URL",
"action.stop": "إيقاف",
replaced: "انتقل التحكم بالمتصفح إلى نافذة سطح مكتب أخرى.",
unsupported: "لا يدعم تطبيق سطح المكتب هذا لوحة المتصفح.",
suspended: "عُلّق المتصفح. تفاعل مع هذه الجلسة لإعادة الاتصال.",
"empty.title": "أدخل عنوان URL",
"empty.description": "أو اكتب الطلب «افتح في متصفح التطبيق»",
"failed.title": "يتعذر الوصول إلى عنوان URL",
"failed.description": "تحقق من عنوان URL واتصالك، ثم حاول مرة أخرى.",
"action.reload": "إعادة التحميل",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Brauzer səhifəsini yeniləyin",
"tab.title": "Brauzer",
"address.label": "Brauzer ünvanı",
"address.placeholder": "URL daxil edin",
"action.stop": "Dayandır",
replaced: "Brauzer idarəsi başqa masaüstü pəncərəsinə köçürüldü.",
unsupported: "Bu masaüstü tətbiq brauzer panelini dəstəkləmir.",
suspended: "Brauzer dayandırıldı. Təkrar qoşulmaq üçün bu sessiya ilə qarşılıqlı əlaqə qurun.",
"empty.title": "URL daxil edin",
"empty.description": "Və ya “Tətbiq brauzerində aç” sorğusunu göndərin",
"failed.title": "URL əlçatan deyil",
"failed.description": "URL-i və bağlantınızı yoxlayın, sonra yenidən cəhd edin.",
"action.reload": "Yenidən yüklə",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Презареждане на страницата в браузъра",
"tab.title": "Браузър",
"address.label": "Адрес на браузъра",
"address.placeholder": "Въведете URL адрес",
"action.stop": "Спрете",
replaced: "Управлението на браузъра е преместено в друг прозорец на настолното приложение.",
unsupported: "Това настолно приложение не поддържа панела на браузъра.",
suspended: "Браузърът е спрян временно. Взаимодействайте с тази сесия, за да се свържете отново.",
"empty.title": "Въведете URL адрес",
"empty.description": "Или подайте подкана „Отвори в браузъра на приложението“",
"failed.title": "URL адресът не е достъпен",
"failed.description": "Проверете URL адреса и връзката си, след което опитайте отново.",
"action.reload": "Презареждане",
@@ -3,13 +3,10 @@ export default {
"command.reload": "ব্রাউজার পৃষ্ঠা পুনরায় লোড করুন",
"tab.title": "ব্রাউজার",
"address.label": "ব্রাউজার ঠিকানা",
"address.placeholder": "URL লিখুন",
"action.stop": "থামো",
replaced: "ব্রাউজার নিয়ন্ত্রণ অন্য ডেস্কটপ উইন্ডোতে সরানো হয়েছে।",
unsupported: "এই ডেস্কটপ অ্যাপ্লিকেশন ব্রাউজার ফলক সমর্থন করে না.",
suspended: "ব্রাউজার সাসপেন্ড করা হয়েছে। পুনরায় সংযোগ করতে এই সেশনের সাথে ইন্টারঅ্যাক্ট করুন।",
"empty.title": "URL লিখুন",
"empty.description": "অথবা প্রম্পট করুন “অ্যাপ ব্রাউজারে খুলুন”",
"failed.title": "URL-এ পৌঁছানো যাচ্ছে না",
"failed.description": "URL এবং আপনার সংযোগ পরীক্ষা করে আবার চেষ্টা করুন।",
"action.reload": "পুনরায় লোড করুন",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Recarregar página do navegador",
"tab.title": "Navegador",
"address.label": "Endereço do navegador",
"address.placeholder": "Digite URL",
"action.stop": "Parar",
replaced: "O controle do navegador foi movido para outra janela da área de trabalho.",
unsupported: "Este aplicativo para desktop não oferece suporte ao painel do navegador.",
suspended: "Navegador suspenso. Interaja com esta sessão para se reconectar.",
"empty.title": "Insira a URL",
"empty.description": "Ou peça “Abrir no navegador do aplicativo”",
"failed.title": "Não foi possível acessar a URL",
"failed.description": "Verifique a URL e sua conexão e tente novamente.",
"action.reload": "Recarregar",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Ponovo učitaj stranicu preglednika",
"tab.title": "Preglednik",
"address.label": "Adresa preglednika",
"address.placeholder": "Unesite URL",
"action.stop": "Zaustavi",
replaced: "Upravljanje preglednikom premješteno je u drugi prozor Desktopa.",
unsupported: "Ova aplikacija za računar ne podržava okno preglednika.",
suspended: "Preglednik je obustavljen. Stupite u interakciju s ovom sesijom da biste se ponovo povezali.",
"empty.title": "Unesite URL",
"empty.description": "Ili zadajte upit „Otvori u pregledniku aplikacije“",
"failed.title": "URL nije dostupan",
"failed.description": "Provjerite URL i vezu, a zatim pokušajte ponovo.",
"action.reload": "Ponovo učitaj",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Torna a carregar la pàgina del navegador",
"tab.title": "Navegador",
"address.label": "Adreça del navegador",
"address.placeholder": "Introduïu l'URL",
"action.stop": "Atureu-vos",
replaced: "El control del navegador s'ha mogut a una altra finestra d'escriptori.",
unsupported: "Aquesta aplicació d'escriptori no admet el panell del navegador.",
suspended: "Navegador suspès. Interacciona amb aquesta sessió per tornar a connectar.",
"empty.title": "Introduïu l’URL",
"empty.description": "O demaneu «Obre al navegador de l’aplicació»",
"failed.title": "No es pot accedir a l’URL",
"failed.description": "Comproveu l’URL i la connexió i torneu-ho a provar.",
"action.reload": "Torna a carregar",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Znovu načíst stránku prohlížeče",
"tab.title": "Prohlížeč",
"address.label": "Adresa prohlížeče",
"address.placeholder": "Zadejte URL",
"action.stop": "Přestaň",
replaced: "Ovládání prohlížeče bylo přesunuto do jiného okna aplikace Desktop.",
unsupported: "Tato desktopová aplikace nepodporuje panel prohlížeče.",
suspended: "Prohlížeč je pozastaven. Interakcí s touto relací se znovu připojíte.",
"empty.title": "Zadejte URL",
"empty.description": "Nebo zadejte pokyn „Otevřít v prohlížeči aplikace“",
"failed.title": "URL není dostupná",
"failed.description": "Zkontrolujte URL a připojení a zkuste to znovu.",
"action.reload": "Načíst znovu",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Genindlæs browsersiden",
"tab.title": "Browser",
"address.label": "Browser adresse",
"address.placeholder": "Indtast URL",
"action.stop": "Stop",
replaced: "Browserkontrol flyttet til et andet skrivebordsvindue.",
unsupported: "Denne desktopapp understøtter ikke browserpanelet.",
suspended: "Browser suspenderet. Interager med denne session for at genoprette forbindelsen.",
"empty.title": "Indtast URL",
"empty.description": "Eller bed om ”Åbn i appbrowseren”",
"failed.title": "URL-adressen kan ikke nås",
"failed.description": "Kontrollér URL-adressen og din forbindelse, og prøv igen.",
"action.reload": "Genindlæs",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Browserseite neu laden",
"tab.title": "Browser",
"address.label": "Browseradresse",
"address.placeholder": "Geben Sie URL ein",
"action.stop": "Stoppen",
replaced: "Die Browsersteuerung wurde in ein anderes Desktop-Fenster verschoben.",
unsupported: "Diese Desktop-App unterstützt den Browserbereich nicht.",
suspended: "Browser angehalten. Interagieren Sie mit dieser Sitzung, um die Verbindung wiederherzustellen.",
"empty.title": "URL eingeben",
"empty.description": "Oder „Im App-Browser öffnen“ eingeben",
"failed.title": "URL ist nicht erreichbar",
"failed.description": "Überprüfen Sie die URL und Ihre Verbindung und versuchen Sie es erneut.",
"action.reload": "Neu laden",
@@ -3,13 +3,10 @@ export default {
"command.reload": "ބްރައުޒާ ޕޭޖް އަލުން ލޯޑް ކުރާށެވެ",
"tab.title": "ބްރައުޒާ އެވެ",
"address.label": "ބްރައުޒާ އެޑްރެސް އެވެ",
"address.placeholder": "URL އަށް ވަދެވޭނެއެވެ.",
"action.stop": "ހުއްޓުން",
replaced: "ބްރައުޒާ ކޮންޓްރޯލް އެހެން ޑެސްކްޓޮޕް ވިންޑޯއަކަށް ބަދަލުވިއެވެ.",
unsupported: "މި ޑެސްކްޓޮޕް އެޕް އިން ބްރައުޒާ ޕޭން އަށް ސަޕޯޓް ނުކުރެއެވެ.",
suspended: "ބްރައުޒާ ސަސްޕެންޑް ކޮށްފިއެވެ. އަލުން ގުޅެން މި ސެޝަނާ މުއާމަލާތް ކުރުން.",
"empty.title": "URL ލިޔުއްވާ",
"empty.description": "ނުވަތަ ”އެޕް ބްރައުޒަރުގައި ހުޅުވާ“ އޭ ޕްރޮމްޕްޓް ކުރަން",
"failed.title": "URL އަށް ނުފޯރާ",
"failed.description": "URL އާއި ތިޔަ ކަނެކްޝަން ޗެކްކޮށް، އަލުން މަސައްކަތް ކުރައްވާ۔",
"action.reload": "އަލުން ލޯޑްކުރުން",
@@ -3,13 +3,10 @@ export default {
"command.reload": "བརའུ་ཟར་ཤོག་ལེབ་ལོག་བཙུགས་",
"tab.title": "བརའུ་ཟར་",
"address.label": "བརྡ་འཚོལ་ཁ་བྱང་",
"address.placeholder": "ཡུ་ཨར་ཨེལ་བཙུགས།",
"action.stop": "བཀག་པ",
replaced: "བརའུ་ཟར་ཚད་འཛིན་འདི་ ཌེཀསི་ཊོཔ་སྒོ་སྒྲིག་གཞན་མི་ཅིག་ནང་ སྤོ་བཤུད་འབད་ཡི།",
unsupported: "ཌེཀསི་ཊོཔ་གློག་རིམ་འདི་གིས་ བརའུ་ཟར་པེན་ལུ་རྒྱབ་སྐྱོར་མི་འབད།",
suspended: "བརའུ་ཟར་བཀག་བཞག་ཡོདཔ། ལོག་སྟེ་མཐུད་ནིའི་དོན་ལུ་ ལཱ་ཡུན་འདི་དང་གཅིག་ཁར་ འབྲེལ་བ་འཐབ།",
"empty.title": "URL བཙུགས།",
"empty.description": "ཡང་ན་ “གློག་རིམ་བརའུ་ཟར་ནང་ཁ་ཕྱེ” ཟེར་བའི་ནུས་སྤེལ་བྱིན།",
"failed.title": "URL ལུ་ལྷོད་མི་ཚུགས།",
"failed.description": "URL དང་ཁྱོད་ཀྱི་མཐུད་ལམ་ཞིབ་དཔྱད་འབད་དེ་ལོག་སྟེ་འབད།",
"action.reload": "ཡང་བསྐྱར་མངོན་གསལ།",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Επαναφόρτωση σελίδας προγράμματος περιήγησης",
"tab.title": "Πρόγραμμα περιήγησης",
"address.label": "Διεύθυνση προγράμματος περιήγησης",
"address.placeholder": "Εισαγάγετε τη διεύθυνση URL",
"action.stop": "Διακοπή",
replaced: "Ο έλεγχος του προγράμματος περιήγησης μετακινήθηκε σε άλλο παράθυρο επιφάνειας εργασίας.",
unsupported: "Αυτή η εφαρμογή επιφάνειας εργασίας δεν υποστηρίζει το παράθυρο του προγράμματος περιήγησης.",
suspended: "Το πρόγραμμα περιήγησης σε αναστολή. Αλληλεπιδράστε με αυτήν την περίοδο σύνδεσης για επανασύνδεση.",
"empty.title": "Εισαγάγετε URL",
"empty.description": "Ή ζητήστε «Άνοιγμα στο πρόγραμμα περιήγησης της εφαρμογής»",
"failed.title": "Δεν είναι δυνατή η πρόσβαση στο URL",
"failed.description": "Ελέγξτε το URL και τη σύνδεσή σας και δοκιμάστε ξανά.",
"action.reload": "Επαναφόρτωση",
+35 -3
View File
@@ -2,9 +2,12 @@ export default {
"command.open": "Open browser",
"command.reload": "Reload browser page",
"command.inspect": "Select an element in the browser page",
"command.address": "Focus browser address",
"tab.title": "Browser",
"tab.new": "New tab",
"address.label": "Browser address",
"address.placeholder": "Enter URL",
"address.search": "Search or enter a URL",
"address.suggestions": "Suggestions",
inspect: "Select an element to comment on",
"inspect.active": "Click an element in the page to comment on it. Press Escape to cancel.",
"inspect.pageShortcut": "While the page has focus",
@@ -12,9 +15,38 @@ export default {
replaced: "Browser control moved to another desktop window.",
unsupported: "This desktop app does not support the browser pane.",
suspended: "Browser suspended. Interact with this session to reconnect.",
"empty.title": "Enter URL",
"empty.description": 'Or prompt "Open in the app browser"',
"home.title": "Open a page",
"home.description": "Preview your app, read docs, or browse the web.",
"home.recent": "Recent",
"failed.title": "URL can't be reached",
"failed.description": "Check the URL and your connection, then try again.",
"action.reload": "Reload",
"site.info": "Site information",
"site.secure": "Connection is secure",
"site.insecure": "Connection is not secure",
"site.insecure.description": "Don't enter passwords or other private information on this page.",
"site.local": "Local server",
"site.local.description": "Local addresses open on the machine that runs the OpenCode server.",
"site.file": "Workspace file",
"site.file.description": "Only files inside this session's workspace can open here.",
"site.network": "Pages load through the network of {{server}}.",
"site.cookies": "Cookies and site data",
"site.cookies.count.one": "{{count}} cookie in use",
"site.cookies.count.other": "{{count}} cookies in use",
"site.cookies.clear": "Clear",
"site.permissions": "Permissions are blocked",
"site.permissions.description": "Camera, microphone, location, and notifications don't work in this browser.",
"site.agent": "The agent can use this page",
"site.agent.description": "It can read the page, run scripts, and fill in forms.",
"page.add": "Add page to session",
"page.placeholder": "Add context about this page",
"external.open": "Open in system browser",
"external.unavailable": "This address only works on the server's machine.",
options: "Browser options",
"zoom.in": "Zoom in",
"zoom.out": "Zoom out",
"zoom.reset": "Reset zoom",
"zoom.percent": "{{percent}}%",
"link.copy": "Copy link",
"history.clear": "Clear browsing history",
}
@@ -3,13 +3,10 @@ export default {
"command.reload": "Recargar la página del navegador",
"tab.title": "Navegador",
"address.label": "dirección del navegador",
"address.placeholder": "Introduzca URL",
"action.stop": "Detener",
replaced: "El control del navegador se movió a otra ventana del escritorio.",
unsupported: "Esta aplicación de escritorio no admite el panel del navegador.",
suspended: "Navegador suspendido. Interactúa con esta sesión para volver a conectarte.",
"empty.title": "Introduce la URL",
"empty.description": "O pide «Abrir en el navegador de la aplicación»",
"failed.title": "No se puede acceder a la URL",
"failed.description": "Comprueba la URL y la conexión e inténtalo de nuevo.",
"action.reload": "Volver a cargar",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Laadi brauseri leht uuesti",
"tab.title": "Brauser",
"address.label": "Brauseri aadress",
"address.placeholder": "Sisesta URL",
"action.stop": "Peatus",
replaced: "Brauseri juhtimine teisaldati teise töölauaaknasse.",
unsupported: "See töölauarakendus ei toeta brauseri paani.",
suspended: "Brauser peatatud. Ühendage uuesti ühenduse loomiseks selle seansiga.",
"empty.title": "Sisesta URL",
"empty.description": "Või palu „Ava rakenduse brauseris”",
"failed.title": "URL-ile ei pääse juurde",
"failed.description": "Kontrolli URL-i ja ühendust ning proovi uuesti.",
"action.reload": "Laadi uuesti",
@@ -3,13 +3,10 @@ export default {
"command.reload": "بارگیری دوبارهٔ صفحهٔ مرورگر",
"tab.title": "مرورگر",
"address.label": "نشانی مرورگر",
"address.placeholder": "نشانی وب را وارد کنید",
"action.stop": "توقف کنید",
replaced: "کنترل مرورگر به پنجرهٔ دسکتاپ دیگری منتقل شد.",
unsupported: "این برنامهٔ دسکتاپ از پنل مرورگر پشتیبانی نمی‌کند.",
suspended: "مرورگر تعلیق شد. برای اتصال دوباره با این نشست تعامل کنید.",
"empty.title": "نشانی URL را وارد کنید",
"empty.description": "یا درخواست «در مرورگر برنامه باز کن» را وارد کنید",
"failed.title": "دسترسی به URL ممکن نیست",
"failed.description": "URL و اتصال خود را بررسی کنید و دوباره تلاش کنید.",
"action.reload": "بارگیری مجدد",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Lataa selainsivu uudelleen",
"tab.title": "Selain",
"address.label": "Selaimen osoite",
"address.placeholder": "Syötä URL",
"action.stop": "Pysäytä",
replaced: "Selaimen ohjaus siirrettiin toiseen työpöytäikkunaan.",
unsupported: "Tämä työpöytäsovellus ei tue selainpaneelia.",
suspended: "Selain jäädytetty. Ole vuorovaikutuksessa tämän istunnon kanssa yhdistääksesi uudelleen.",
"empty.title": "Anna URL-osoite",
"empty.description": "Tai kehota ”Avaa sovelluksen selaimessa”",
"failed.title": "URL-osoitetta ei tavoiteta",
"failed.description": "Tarkista URL-osoite ja yhteys ja yritä uudelleen.",
"action.reload": "Lataa uudelleen",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Endurlesa kagasíðuna",
"tab.title": "Kaga",
"address.label": "Kagaadressa",
"address.placeholder": "Skriva URL",
"action.stop": "Steðga",
replaced: "Kagastýring flutt til eitt annað skriviborðsvindeyga.",
unsupported: "Hendan skriviborðsappin stuðlar ikki kagarútinum.",
suspended: "Kagari steðgaður. Samskifta við hesa setuna fyri at fáa samband aftur.",
"empty.title": "Skriva URL",
"empty.description": "Ella bið um „Lat upp í kaganum í appini“",
"failed.title": "URL-adressan kann ikki røkkast",
"failed.description": "Kanna URL-adressuna og sambandið og royn aftur.",
"action.reload": "Les inn aftur",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Recharger la page du navigateur",
"tab.title": "Navigateur",
"address.label": "Adresse du navigateur",
"address.placeholder": "Entrez URL",
"action.stop": "Arrêter",
replaced: "Le contrôle du navigateur a été déplacé vers une autre fenêtre du bureau.",
unsupported: "Cette application de bureau ne prend pas en charge le volet du navigateur.",
suspended: "Navigateur suspendu. Interagissez avec cette session pour vous reconnecter.",
"empty.title": "Saisissez l’URL",
"empty.description": "Ou demandez « Ouvrir dans le navigateur de l’application »",
"failed.title": "L’URL est inaccessible",
"failed.description": "Vérifiez l’URL et votre connexion, puis réessayez.",
"action.reload": "Recharger",
@@ -3,13 +3,10 @@ export default {
"command.reload": "טעינה מחדש של דף הדפדפן",
"tab.title": "דפדפן",
"address.label": "כתובת הדפדפן",
"address.placeholder": "הזנת URL",
"action.stop": "עצור",
replaced: "השליטה בדפדפן הועברה לחלון שולחן עבודה אחר.",
unsupported: "יישום שולחן העבודה הזה אינו תומך בחלונית הדפדפן.",
suspended: "הדפדפן הושהה. יש לקיים אינטראקציה עם הפעלה זו כדי להתחבר מחדש.",
"empty.title": "הזנת כתובת URL",
"empty.description": "או לבקש „פתיחה בדפדפן היישום”",
"failed.title": "לא ניתן להגיע לכתובת ה-URL",
"failed.description": "יש לבדוק את כתובת ה-URL ואת החיבור ולנסות שוב.",
"action.reload": "טען מחדש",
@@ -3,13 +3,10 @@ export default {
"command.reload": "ब्राउज़र पृष्ठ पुनः लोड करें",
"tab.title": "ब्राउज़र",
"address.label": "ब्राउज़र पता",
"address.placeholder": "URL दर्ज करें",
"action.stop": "रोकें",
replaced: "ब्राउज़र नियंत्रण किसी अन्य डेस्कटॉप विंडो पर ले जाया गया।",
unsupported: "यह डेस्कटॉप ऐप ब्राउज़र फलक का समर्थन नहीं करता है.",
suspended: "ब्राउज़र निलंबित. पुन: कनेक्ट करने के लिए इस सत्र से इंटरैक्ट करें.",
"empty.title": "URL दर्ज करें",
"empty.description": "या प्रॉम्प्ट दें “ऐप ब्राउज़र में खोलें”",
"failed.title": "URL तक नहीं पहुँचा जा सका",
"failed.description": "URL और अपना कनेक्शन जाँचें, फिर दोबारा कोशिश करें।",
"action.reload": "पुनः लोड करें",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Ponovno učitaj stranicu preglednika",
"tab.title": "Preglednik",
"address.label": "Adresa preglednika",
"address.placeholder": "Unesite URL",
"action.stop": "Zaustavi",
replaced: "Upravljanje preglednikom premješteno je u drugi prozor Desktopa.",
unsupported: "Ova aplikacija za računalo ne podržava okno preglednika.",
suspended: "Preglednik je obustavljen. Stupite u interakciju s ovom sesijom da biste se ponovno povezali.",
"empty.title": "Unesite URL",
"empty.description": "Ili zadajte upit „Otvori u pregledniku aplikacije“",
"failed.title": "URL nije dostupan",
"failed.description": "Provjerite URL i vezu, a zatim pokušajte ponovno.",
"action.reload": "Ponovno učitaj",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Böngészőoldal újratöltése",
"tab.title": "Böngésző",
"address.label": "Böngésző címe",
"address.placeholder": "Írja be az URL-t",
"action.stop": "Leállítás",
replaced: "A böngésző vezérlése átkerült egy másik asztali ablakba.",
unsupported: "Ez az asztali alkalmazás nem támogatja a böngésző ablaktáblát.",
suspended: "A böngésző felfüggesztve. Lépjen kapcsolatba ezzel a munkamenettel az újracsatlakozáshoz.",
"empty.title": "Adja meg az URL-címet",
"empty.description": "Vagy kérje ezt: „Megnyitás az alkalmazás böngészőjében”",
"failed.title": "Az URL-cím nem érhető el",
"failed.description": "Ellenőrizze az URL-címet és a kapcsolatot, majd próbálja újra.",
"action.reload": "Újratöltés",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Թարմացրեք զննարկչի էջը",
"tab.title": "Դիտարկիչ",
"address.label": "Դիտարկչի հասցե",
"address.placeholder": "Ներմուծեք URL",
"action.stop": "Կանգնեցնել",
replaced: "Դիտարկիչների կառավարումը տեղափոխվել է այլ աշխատասեղանի պատուհան։",
unsupported: "Այս աշխատասեղանի հավելվածը չի աջակցում դիտարկիչի վահանակը։",
suspended: "Բրաուզերը ժամանակավորապես կանգնեցվել է։ Հետադարձ կապ հաստատեք այս նստաշրջանի հետ՝ նորից միանալու համար։",
"empty.title": "Մուտքագրեք URL",
"empty.description": "Կամ գրեք «Բացել հավելվածի դիտարկիչում»",
"failed.title": "URL-ը հասանելի չէ",
"failed.description": "Ստուգեք URL-ը և կապը, ապա կրկին փորձեք։",
"action.reload": "Վերբեռնել կրկին",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Muat ulang halaman peramban",
"tab.title": "Peramban",
"address.label": "Alamat peramban",
"address.placeholder": "Masukkan URL",
"action.stop": "Hentikan",
replaced: "Kontrol peramban dipindahkan ke jendela desktop lain.",
unsupported: "Aplikasi desktop ini tidak mendukung panel peramban.",
suspended: "Peramban dijeda. Berinteraksilah dengan sesi ini untuk terhubung kembali.",
"empty.title": "Masukkan URL",
"empty.description": 'Atau masukkan prompt "Buka di peramban aplikasi"',
"failed.title": "URL tidak dapat dijangkau",
"failed.description": "Periksa URL dan koneksi Anda, lalu coba lagi.",
"action.reload": "Muat ulang",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Endurhlaða vafrasíðu",
"tab.title": "Vafri",
"address.label": "Heimilisfang vafra",
"address.placeholder": "Sláðu inn vefslóð",
"action.stop": "Stöðva",
replaced: "Vafrastýring færð í annan skjáborðsglugga.",
unsupported: "Þetta skrifborðsforrit styður ekki vafrarúðuna.",
suspended: "Vafra lokað. Vertu í samskiptum við þessa lotu til að tengjast aftur.",
"empty.title": "Sláðu inn vefslóð",
"empty.description": "Eða biddu um „Opna í vafra forritsins“",
"failed.title": "Ekki næst í vefslóðina",
"failed.description": "Athugaðu vefslóðina og tenginguna og reyndu aftur.",
"action.reload": "Endurhlaða",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Ricarica la pagina del browser",
"tab.title": "Navigatore",
"address.label": "Indirizzo del browser",
"address.placeholder": "Inserisci URL",
"action.stop": "Interrompi",
replaced: "Il controllo del browser è stato spostato su un'altra finestra del desktop.",
unsupported: "Questa app desktop non supporta il pannello del browser.",
suspended: "Browser sospeso. Interagisci con questa sessione per riconnetterti.",
"empty.title": "Inserisci URL",
"empty.description": "Oppure chiedi “Apri nel browser dell’app”",
"failed.title": "Impossibile raggiungere l’URL",
"failed.description": "Controlla l’URL e la connessione, quindi riprova.",
"action.reload": "Ricarica",
@@ -3,13 +3,10 @@ export default {
"command.reload": "ブラウザーページを再読み込み",
"tab.title": "ブラウザー",
"address.label": "ブラウザーのアドレス",
"address.placeholder": "URLを入力",
"action.stop": "停止",
replaced: "ブラウザー制御が別のデスクトップウィンドウに移動しました。",
unsupported: "このデスクトップアプリはブラウザペインをサポートしていません。",
suspended: "ブラウザーが一時停止しました。このセッションと対話して再接続してください。",
"empty.title": "URLを入力",
"empty.description": "または「アプリ内ブラウザで開く」とプロンプトに入力",
"failed.title": "URLにアクセスできません",
"failed.description": "URLと接続を確認して、もう一度お試しください。",
"action.reload": "再読み込み",
@@ -3,13 +3,10 @@ export default {
"command.reload": "ბრაუზერის გვერდის გადატვირთვა",
"tab.title": "ბრაუზერი",
"address.label": "ბრაუზერის მისამართი",
"address.placeholder": "შეიყვანეთ URL",
"action.stop": "შეჩერება",
replaced: "ბრაუზერის კონტროლი გადანაცვლდა სხვა დესკტოპის ფანჯარაში.",
unsupported: "დესკტოპის ეს აპი ბრაუზერის პანელს არ უჭერს მხარს.",
suspended: "ბრაუზერი შეჩერებულია. გამართეთ ინტერაქცია ამ სესიასთან, რათა კვლავ დაუკავშირდეთ.",
"empty.title": "შეიყვანეთ URL",
"empty.description": "ან შეიყვანეთ მოთხოვნა „გახსენი აპის ბრაუზერში“",
"failed.title": "URL მიუწვდომელია",
"failed.description": "შეამოწმეთ URL და კავშირი, შემდეგ ხელახლა სცადეთ.",
"action.reload": "ხელახლა ჩატვირთვა",
@@ -3,13 +3,10 @@ export default {
"command.reload": "ផ្ទុកទំព័រកម្មវិធីរុករកឡើងវិញ",
"tab.title": "កម្មវិធីរុករក",
"address.label": "អាសយដ្ឋានកម្មវិធីរុករក",
"address.placeholder": "បញ្ចូល URL",
"action.stop": "ឈប់",
replaced: "ការត្រួតពិនិត្យរុករកបានផ្លាស់ទៅវីនដូតែមួយផ្សេងទៀតលើឌេស្គ្ទុប។",
unsupported: "កម្មវិធីដេស្គ្ទុបនេះមិនគាំទ្របានផ្ទាំងរុករកទេ។",
suspended: "កម្មវិធីរុករកបានផ្អាក។ សូមអន្តរកម្មជាមួយសម័យនេះដើម្បីភ្ជាប់ឡើងវិញ។",
"empty.title": "បញ្ចូល URL",
"empty.description": 'ឬបញ្ចូល prompt "បើកក្នុងកម្មវិធីរុករករបស់កម្មវិធី"',
"failed.title": "មិនអាចចូលដល់ URL បានទេ",
"failed.description": "ពិនិត្យ URL និងការតភ្ជាប់របស់អ្នក រួចសាកល្បងម្តងទៀត។",
"action.reload": "ផ្ទុកឡើងវិញ",
@@ -3,13 +3,10 @@ export default {
"command.reload": "브라우저 페이지 새로 고침",
"tab.title": "브라우저",
"address.label": "브라우저 주소",
"address.placeholder": "URL 입력",
"action.stop": "중지",
replaced: "브라우저 제어가 다른 데스크톱 창으로 이동되었습니다.",
unsupported: "이 데스크톱 앱은 브라우저 창을 지원하지 않습니다.",
suspended: "브라우저가 일시 중지되었습니다. 다시 연결하려면 이 세션과 상호작용하세요.",
"empty.title": "URL 입력",
"empty.description": '또는 "앱 브라우저에서 열어 줘"라고 프롬프트 입력',
"failed.title": "URL에 연결할 수 없음",
"failed.description": "URL과 연결을 확인한 후 다시 시도하세요.",
"action.reload": "다시 로드",
@@ -3,13 +3,10 @@ export default {
"command.reload": "ໂຫຼດຫນ້າບຣາວເຊີ",
"tab.title": "ເບຣາວເຊີ",
"address.label": "ທີ່ຢູ່ເບຣາວເຊີ",
"address.placeholder": "ໃສ່ URL",
"action.stop": "ຢຸດ",
replaced: "ການຄວບຄຸມເບຣາວເຊີໄດ້ຍ້າຍໄປຢູ່ຫນ້າຕ່າງເດສທັອບອື່ນ.",
unsupported: "ແອັບເດສທັອບນີ້ບໍ່ຮອງຮັບແຖບບຣາວເຊີ.",
suspended: "ເບຣາວເຊີຖືກລະງັບ.ປະຕິບັດກັບ session ນີ້ເພື່ອເຊື່ອມຕໍ່ອີກຄັ້ງ.",
"empty.title": "ໃສ່ URL",
"empty.description": 'ຫຼືປ້ອນ prompt "ເປີດໃນບຣາວເຊີຂອງແອັບ"',
"failed.title": "ເຂົ້າເຖິງ URL ບໍ່ໄດ້",
"failed.description": "ກວດສອບ URL ແລະການເຊື່ອມຕໍ່ ແລ້ວລອງໃໝ່.",
"action.reload": "ໂຫຼດຄືນໃໝ່",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Iš naujo įkelti naršyklės puslapį",
"tab.title": "Naršyklė",
"address.label": "Naršyklės adresas",
"address.placeholder": "Įveskite URL",
"action.stop": "Stabdyti",
replaced: "Naršyklės valdymas perkeltas į kitą darbalaukio langą.",
unsupported: "Ši darbalaukio programa nepalaiko naršyklės srities.",
suspended: "Naršyklė sustabdyta. Norėdami vėl prisijungti, sąveikaukite su šia sesija.",
"empty.title": "Įveskite URL",
"empty.description": "Arba paprašykite „Atverti programos naršyklėje“",
"failed.title": "URL nepasiekiamas",
"failed.description": "Patikrinkite URL bei ryšį ir bandykite dar kartą.",
"action.reload": "Įkelti iš naujo",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Pārlādēt pārlūkprogrammas lapu",
"tab.title": "Pārlūkprogramma",
"address.label": "Pārlūkprogrammas adrese",
"address.placeholder": "Ievadiet URL",
"action.stop": "Apturēt",
replaced: "Pārlūka vadība ir pārvietota uz citu darbvirsmas logu.",
unsupported: "Šī darbvirsmas lietotne neatbalsta pārlūkprogrammas rūti.",
suspended: "Pārlūka darbība ir apturēta. Mijiedarbojieties ar šo sesiju, lai atjaunotu savienojumu.",
"empty.title": "Ievadiet URL",
"empty.description": "Vai arī lūdziet “Atvērt lietotnes pārlūkā”",
"failed.title": "URL nav sasniedzams",
"failed.description": "Pārbaudiet URL un savienojumu un mēģiniet vēlreiz.",
"action.reload": "Ielādēt atkārtoti",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Освежи страна на прелистувач",
"tab.title": "Прелистувач",
"address.label": "Адреса на прелистувач",
"address.placeholder": "Внесете URL",
"action.stop": "Стоп",
replaced: "Контролата на прелистувачот е преместена во друг прозорец на десктопот.",
unsupported: "Оваа десктоп апликација не поддржува панел за прелистувач.",
suspended: "Прелистувачот е суспендиран. Интеракцијата со оваа сесија ќе овозможи повторно поврзување.",
"empty.title": "Внесете URL",
"empty.description": "Или внесете барање „Отвори во прелистувачот на апликацијата“",
"failed.title": "URL-адресата не е достапна",
"failed.description": "Проверете ги URL-адресата и врската, па обидете се повторно.",
"action.reload": "Превчитај",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Браузерын хуудасыг дахин ачаалах",
"tab.title": "Хөтөч",
"address.label": "Хөтчийн хаяг",
"address.placeholder": "URL оруулах",
"action.stop": "Зогс",
replaced: "Хөтчийн хяналт өөр ширээний цонхны руу шилжсэн.",
unsupported: "Энэ десктоп апп хөтчийн самбарыг дэмждэггүй.",
suspended: "Браузер түр зогсоогдлоо. Дахин холбогдохын тулд энэ сесситэй харьцана уу.",
"empty.title": "URL оруулна уу",
"empty.description": "Эсвэл “Аппын хөтөч дээр нээ” гэж хүсэлт өгнө үү",
"failed.title": "URL-д хандах боломжгүй",
"failed.description": "URL болон холболтоо шалгаад дахин оролдоно уу.",
"action.reload": "Дахин ачаалах",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Muat semula halaman penyemak imbas",
"tab.title": "Pelayar",
"address.label": "Alamat pelayar",
"address.placeholder": "Masukkan URL",
"action.stop": "Henti",
replaced: "Kawalan pelayar dipindahkan ke tetingkap desktop lain.",
unsupported: "Aplikasi desktop ini tidak menyokong panel pelayar.",
suspended: "Pelayar digantung. Berinteraksi dengan sesi ini untuk menyambung semula.",
"empty.title": "Masukkan URL",
"empty.description": 'Atau masukkan prompt "Buka dalam pelayar aplikasi"',
"failed.title": "URL tidak dapat dicapai",
"failed.description": "Semak URL dan sambungan anda, kemudian cuba lagi.",
"action.reload": "Muat semula",
@@ -3,13 +3,10 @@ export default {
"command.reload": "ဘရောက်ဇာစာမျက်နှာကို ပြန်လည်တင်ပါ",
"tab.title": "ဘရောက်ဇာ",
"address.label": "ဘရောက်ဇာလိပ်စာ",
"address.placeholder": "URL ထည့်ပါ",
"action.stop": "ရပ်ပါ။",
replaced: "ဘရောက်ဇာ ထိန်းချုပ်မှုကို အခြားဒက်စ်ကတော့ပြင်ပ ပြတင်းပေါက်သို့ ရွှေ့လိုက်သည်။",
unsupported: "ဒီ desktop အက်ပ်သည် ဘရောက်ဇာပန်းကို မထောက်ပံ့ပါ။",
suspended: "ဘရောက်ဇာ ရပ်ဆိုင်းထားပါသည်။ ထပ်မံချိတ်ဆက်ရန် ဒီအစည်းအဝေးနှင့် အပြန်အလှန် အပြုအမူ ပြုလုပ်ပါ။",
"empty.title": "URL ထည့်ပါ",
"empty.description": 'သို့မဟုတ် "အက်ပ်ဘရောက်ဇာတွင် ဖွင့်ပါ" ဟု prompt ရိုက်ထည့်ပါ',
"failed.title": "URL ကို ချိတ်ဆက်၍မရပါ",
"failed.description": "URL နှင့် ချိတ်ဆက်မှုကို စစ်ဆေးပြီး ထပ်မံကြိုးစားပါ။",
"action.reload": "ပြန်လည်ဖွင့်ပါ",
@@ -3,13 +3,10 @@ export default {
"command.reload": "ब्राउजर पृष्ठ पुन: लोड गर्नुहोस्",
"tab.title": "ब्राउजर",
"address.label": "ब्राउजर ठेगाना",
"address.placeholder": "प्रविष्ट गर्नुहोस् URL",
"action.stop": "रोक्नुहोस्",
replaced: "ब्राउजर नियन्त्रण अर्को डेस्कटप विन्डोमा सारियो।",
unsupported: "यो डेस्कटप एपले ब्राउजर फलकलाई समर्थन गर्दैन।",
suspended: "ब्राउजर निलम्बित। पुन: जडान गर्न यो सत्रसँग अन्तर्क्रिया गर्नुहोस्।",
"empty.title": "URL प्रविष्ट गर्नुहोस्",
"empty.description": "वा “एप ब्राउजरमा खोल्नुहोस्” भनेर प्रम्प्ट गर्नुहोस्",
"failed.title": "URL मा पुग्न सकिएन",
"failed.description": "URL र आफ्नो जडान जाँचेर फेरि प्रयास गर्नुहोस्।",
"action.reload": "पुनः लोड गर्नुहोस्",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Browserpagina opnieuw laden",
"tab.title": "Browser",
"address.label": "Browseradres",
"address.placeholder": "Voer URL in",
"action.stop": "Stop",
replaced: "Browserbediening verplaatst naar een ander bureaubladvenster.",
unsupported: "Deze desktopapp ondersteunt het browserpaneel niet.",
suspended: "Browser opgeschort. Interactie met deze sessie om opnieuw verbinding te maken.",
"empty.title": "Voer URL in",
"empty.description": "Of vraag ‘Openen in de appbrowser’",
"failed.title": "URL is niet bereikbaar",
"failed.description": "Controleer de URL en je verbinding en probeer het opnieuw.",
"action.reload": "Opnieuw laden",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Last nettlesersiden på nytt",
"tab.title": "Nettleser",
"address.label": "Nettleseradresse",
"address.placeholder": "Skriv inn URL",
"action.stop": "Stopp",
replaced: "Nettleserkontrollen flyttet til et annet skrivebordsvindu.",
unsupported: "Denne skrivebordsappen støtter ikke nettleserpanelet.",
suspended: "Nettleseren er suspendert. Samhandle med denne økten for å koble til på nytt.",
"empty.title": "Skriv inn URL",
"empty.description": "Eller be om «Åpne i appnettleseren»",
"failed.title": "URL-en kan ikke nås",
"failed.description": "Kontroller URL-en og tilkoblingen, og prøv på nytt.",
"action.reload": "Last inn på nytt",
@@ -3,13 +3,10 @@ export default {
"command.reload": "براؤزر دا صفحہ دوبارہ لوڈ کرو۔",
"tab.title": "براؤزر",
"address.label": "براؤزر دا پتہ",
"address.placeholder": "درج کرو URL",
"action.stop": "روکو",
replaced: "براؤزر کنٹرول کو دوسری ڈیسک ٹاپ ونڈو میں منتقل کر دیا گیا۔",
unsupported: "یہ ڈیسک ٹاپ ایپ براؤزر پین کو سپورٹ نئیں کرتی اے۔",
suspended: "براؤزر معطل۔ دوبارہ منسلک ہونے لئی اس سیشن دے ساتھ تعامل کرو۔",
"empty.title": "URL درج کرو",
"empty.description": "یا پرامپٹ دیو ”ایپ براؤزر وچ کھولو“",
"failed.title": "URL تک نہیں پہنچیا جا سکیا",
"failed.description": "URL تے اپنا کنکشن چیک کرو، فیر کوشش کرو۔",
"action.reload": "دوبارہ لوڈ کرو",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Przeładuj stronę przeglądarki",
"tab.title": "Przeglądarka",
"address.label": "Adres przeglądarki",
"address.placeholder": "Wprowadź URL",
"action.stop": "Zatrzymaj",
replaced: "Kontrola przeglądarki została przeniesiona do innego okna pulpitu.",
unsupported: "Ta aplikacja na pulpit nie obsługuje panelu przeglądarki.",
suspended: "Przeglądarka zawieszona. Wejdź w interakcję z tą sesją, aby ponownie połączyć.",
"empty.title": "Wprowadź adres URL",
"empty.description": "Lub wpisz polecenie „Otwórz w przeglądarce aplikacji”",
"failed.title": "Nie można otworzyć adresu URL",
"failed.description": "Sprawdź adres URL i połączenie, a następnie spróbuj ponownie.",
"action.reload": "Wczytaj ponownie",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Reîncărcați pagina browser",
"tab.title": "Browser",
"address.label": "Adresa browserului",
"address.placeholder": "Introduceți adresa URL",
"action.stop": "Oprește",
replaced: "Controlul browserului a fost mutat într-o altă fereastră de desktop.",
unsupported: "Această aplicație desktop nu acceptă panoul browserului.",
suspended: "Browser suspendat. Interacționați cu această sesiune pentru a vă reconecta.",
"empty.title": "Introdu adresa URL",
"empty.description": "Sau solicită „Deschide în browserul aplicației”",
"failed.title": "Adresa URL nu poate fi accesată",
"failed.description": "Verifică adresa URL și conexiunea, apoi încearcă din nou.",
"action.reload": "Reîncarcă",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Перезагрузить страницу браузера",
"tab.title": "Браузер",
"address.label": "Адрес браузера",
"address.placeholder": "Введите URL",
"action.stop": "Остановить",
replaced: "Управление браузером перемещено в другое окно рабочего стола.",
unsupported: "Это настольное приложение не поддерживает панель браузера.",
suspended: "Браузер приостановлен. Взаимодействуйте с этой сессией, чтобы переподключиться.",
"empty.title": "Введите URL",
"empty.description": "Или отправьте запрос «Открыть во встроенном браузере»",
"failed.title": "Не удаётся открыть URL",
"failed.description": "Проверьте URL и подключение, затем повторите попытку.",
"action.reload": "Перезагрузить",
@@ -3,13 +3,10 @@ export default {
"command.reload": "බ්‍රවුසර පිටුව නැවත පූරණය කරන්න",
"tab.title": "බ්රවුසරය",
"address.label": "බ්රවුසර ලිපිනය",
"address.placeholder": "URL ඇතුළු කරන්න",
"action.stop": "නවත්වන්න",
replaced: "බ්‍රවුසර පාලනය වෙනත් ඩෙස්ක්ටොප් කවුළුවකට ගෙන ගියේය.",
unsupported: "මෙම ඩෙස්ක්ටොප් යෙදුම බ්‍රවුසර කවුළුව සඳහා සහය නොදක්වයි.",
suspended: "බ්‍රව්සරය අත්හිටුවා ඇත. නැවත සම්බන්ධ වීමට මෙම සැසිය සමඟ අන්තර් ක්‍රියා කරන්න.",
"empty.title": "URL එකක් ඇතුළත් කරන්න",
"empty.description": "නැතහොත් “යෙදුම් බ්‍රවුසරයේ විවෘත කරන්න” යනුවෙන් ප්‍රේරකයක් දෙන්න",
"failed.title": "URL වෙත ළඟා විය නොහැක",
"failed.description": "URL එක සහ ඔබේ සම්බන්ධතාව පරීක්ෂා කර නැවත උත්සාහ කරන්න.",
"action.reload": "නැවත පූරණය කරන්න",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Obnoviť stránku webového prehliadača",
"tab.title": "Webový prehliadač",
"address.label": "Adresa prehliadača",
"address.placeholder": "Zadajte URL",
"action.stop": "Zastaviť",
replaced: "Ovládanie prehliadača presunuté do iného okna desktopu.",
unsupported: "Táto desktopová aplikácia nepodporuje panel prehliadača.",
suspended: "Prehliadač bol pozastavený. Interagujte s reláciou pre obnovenie pripojenia.",
"empty.title": "Zadajte URL",
"empty.description": "Alebo zadajte pokyn „Otvoriť v prehliadači aplikácie“",
"failed.title": "URL nie je dostupná",
"failed.description": "Skontrolujte URL a pripojenie a skúste to znova.",
"action.reload": "Znova načítať",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Osveži stran brskalnika",
"tab.title": "Spletni brskalnik",
"address.label": "Naslov v brskalniku",
"address.placeholder": "Vnesite URL",
"action.stop": "Ustavi",
replaced: "Nadzor brskalnika je premaknjen v drugo namizno okno.",
unsupported: "Ta namizna aplikacija ne podpira podokna brskalnika.",
suspended: "Brskalnik je začasno ustavljen. Interakcija s sejo za ponovno povezavo.",
"empty.title": "Vnesite URL",
"empty.description": "Ali vnesite poziv »Odpri v brskalniku aplikacije«",
"failed.title": "URL ni dosegljiv",
"failed.description": "Preverite URL in povezavo ter poskusite znova.",
"action.reload": "Znova naloži",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Rifresko faqen e shfletuesit",
"tab.title": "Shfletuesi",
"address.label": "Adresa e shfletuesit",
"address.placeholder": "Futni URL-në",
"action.stop": "Ndalo",
replaced: "Kontrolli i shfletuesit u zhvendos në një dritare tjetër të desktopit.",
unsupported: "Ky aplikacion desktopi nuk e mbështet panelin e shfletuesit.",
suspended: "Shfletuesi është pezulluar. Ndërveproni me këtë seancë për t'u rilidhur.",
"empty.title": "Jep URL-në",
"empty.description": "Ose kërko “Hap në shfletuesin e aplikacionit”",
"failed.title": "URL-ja nuk mund të arrihet",
"failed.description": "Kontrollo URL-në dhe lidhjen, pastaj provo përsëri.",
"action.reload": "Ringarko",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Освежи страницу прегледника",
"tab.title": "Прегледник",
"address.label": "Адреса прегледника",
"address.placeholder": "Унесите URL",
"action.stop": "Стоп",
replaced: "Контрола прегледника пребачена је у други прозор радне површине.",
unsupported: "Ова десктоп апликација не подржава панел прегледника.",
suspended: "Прегледник је суспендован. Интерагујте са овом сесијом да бисте се поново повезали.",
"empty.title": "Унесите URL",
"empty.description": "Или задајте упит „Отвори у прегледачу апликације“",
"failed.title": "URL није доступан",
"failed.description": "Проверите URL и везу, па покушајте поново.",
"action.reload": "Поново учитај",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Ladda om webbläsarsidan",
"tab.title": "Webbläsare",
"address.label": "Webbläsarens adress",
"address.placeholder": "Ange URL",
"action.stop": "Stoppa",
replaced: "Webbläsarkontrollen har flyttats till ett annat skrivbordsfönster.",
unsupported: "Den här skrivbordsappen stöder inte webbläsarpanelen.",
suspended: "Webbläsaren avstängd. Interagera med den här sessionen för att återansluta.",
"empty.title": "Ange URL",
"empty.description": "Eller be ”Öppna i appens webbläsare”",
"failed.title": "URL:en kan inte nås",
"failed.description": "Kontrollera URL:en och anslutningen och försök igen.",
"action.reload": "Läs in igen",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Саҳифаи браузерро аз нав бор кунед",
"tab.title": "Браузер",
"address.label": "Суроғаи браузер",
"address.placeholder": "URL-ро ворид кунед",
"action.stop": "Ист",
replaced: "Назорати браузер ба равзанаи дигари мизи корӣ кӯчонида шуд.",
unsupported: "Ин барномаи мизи корӣ панели браузерро дастгирӣ намекунад.",
suspended: "Браузер боздошта шуд. Барои аз нав пайваст шудан бо ин сессия муошират кунед.",
"empty.title": "URL-ро ворид кунед",
"empty.description": "Ё дархости «Дар браузери барнома кушоед»-ро ворид кунед",
"failed.title": "URL дастнорас аст",
"failed.description": "URL ва пайвастшавиро санҷед ва аз нав кӯшиш кунед.",
"action.reload": "Аз нав бор кардан",
@@ -3,13 +3,10 @@ export default {
"command.reload": "โหลดหน้าของเบราว์เซอร์ใหม่",
"tab.title": "เบราว์เซอร์",
"address.label": "ที่อยู่เบราว์เซอร์",
"address.placeholder": "ป้อน URL",
"action.stop": "หยุด",
replaced: "การควบคุมเบราว์เซอร์ถูกย้ายไปยังหน้าต่างเดสก์ท็อปอื่น",
unsupported: "แอปเดสก์ท็อปนี้ไม่รองรับแผงเบราว์เซอร์",
suspended: "เบราว์เซอร์ถูกพักการทำงาน โต้ตอบกับเซสชันนี้เพื่อเชื่อมต่อใหม่",
"empty.title": "ป้อน URL",
"empty.description": 'หรือป้อนพรอมต์ "เปิดในเบราว์เซอร์ของแอป"',
"failed.title": "เข้าถึง URL ไม่ได้",
"failed.description": "ตรวจสอบ URL และการเชื่อมต่อ แล้วลองอีกครั้ง",
"action.reload": "โหลดใหม่",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Brauzer sahypasyny täzeden ýükläň",
"tab.title": "Brauzer",
"address.label": "Brauzeriň salgysy",
"address.placeholder": "URL giriziň",
"action.stop": "Dur",
replaced: "Brauzer dolandyryşy başga bir iş stolunyň penjiresine geçirildi.",
unsupported: "Bu iş stoly programmasy brauzer panelini goldamaýar.",
suspended: "Brauzer togtadyldy Birikdirmek üçin bu sessiýa bilen täsirleşiň.",
"empty.title": "URL giriziň",
"empty.description": "Ýa-da “Programmanyň brauzerinde aç” diýip soraň",
"failed.title": "URL elýeterli däl",
"failed.description": "URL-i we birikmäňizi barlaň, soňra gaýtadan synanyşyň.",
"action.reload": "Täzeden ýükle",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Tarayıcı sayfasını yeniden yükle",
"tab.title": "Tarayıcı",
"address.label": "Tarayıcı adresi",
"address.placeholder": "URL'yi girin",
"action.stop": "Durdur",
replaced: "Tarayıcı kontrolü başka bir masaüstü penceresine taşındı.",
unsupported: "Bu masaüstü uygulaması tarayıcı bölmesini desteklemiyor.",
suspended: "Tarayıcı askıya alındı. Yeniden bağlanmak için bu oturumla etkileşim kurun.",
"empty.title": "URL girin",
"empty.description": "Ya da “Uygulama tarayıcısında aç” istemini kullanın",
"failed.title": "URL’ye erişilemiyor",
"failed.description": "URL’yi ve bağlantınızı kontrol edip yeniden deneyin.",
"action.reload": "Yeniden yükle",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Оновити сторінку веббраузера",
"tab.title": "Веббраузер",
"address.label": "Адреса веббраузера",
"address.placeholder": "Введіть URL",
"action.stop": "Зупинити",
replaced: "Керування веббраузером переміщено в інше вікно робочого столу.",
unsupported: "Цей додаток для робочого столу не підтримує панель веббраузера.",
suspended: "Веббраузер призупинено. Взаємодійте із цією сесією, щоб перепідключитися.",
"empty.title": "Введіть URL",
"empty.description": "Або надішліть запит «Відкрити у браузері застосунку»",
"failed.title": "Не вдається відкрити URL",
"failed.description": "Перевірте URL і з’єднання, а потім повторіть спробу.",
"action.reload": "Перезавантажити",
@@ -3,13 +3,10 @@ export default {
"command.reload": "براؤزر کا صفحہ دوبارہ لوڈ کریں۔",
"tab.title": "براؤزر",
"address.label": "براؤزر کا پتہ",
"address.placeholder": "درج کریں URL",
"action.stop": "روکیں",
replaced: "براؤزر کنٹرول کو دوسری ڈیسک ٹاپ ونڈو میں منتقل کر دیا گیا۔",
unsupported: "یہ ڈیسک ٹاپ ایپ براؤزر پین کو سپورٹ نہیں کرتی ہے۔",
suspended: "براؤزر معطل۔ دوبارہ منسلک ہونے کے لیے اس سیشن کے ساتھ تعامل کریں۔",
"empty.title": "URL درج کریں",
"empty.description": "یا یہ پرامپٹ دیں: ”ایپ براؤزر میں کھولیں“",
"failed.title": "URL تک رسائی نہیں ہو سکی",
"failed.description": "URL اور اپنا کنکشن چیک کریں، پھر دوبارہ کوشش کریں۔",
"action.reload": "دوبارہ لوڈ کریں",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Brauzer sahifasini qayta yuklash",
"tab.title": "Brauzer",
"address.label": "Brauzer manzili",
"address.placeholder": "URL manzilini kiriting",
"action.stop": "To'xtang",
replaced: "Brauzer boshqaruvi boshqa ish stoli oynasiga ko'chirildi.",
unsupported: "Bu ish stoli ilovasi brauzer panelini qoʻllab-quvvatlamaydi.",
suspended: "Brauzer to'xtatildi. Qayta ulanish uchun ushbu seans bilan oʻzaro aloqada boʻling.",
"empty.title": "URL kiriting",
"empty.description": "Yoki “Ilova brauzerida ochish” so‘rovini yuboring",
"failed.title": "URL manziliga kirib bo‘lmadi",
"failed.description": "URL va ulanishingizni tekshiring, so‘ng qayta urinib ko‘ring.",
"action.reload": "Qayta yuklash",
@@ -3,13 +3,10 @@ export default {
"command.reload": "Tải lại trang trình duyệt",
"tab.title": "Trình duyệt",
"address.label": "Địa chỉ trình duyệt",
"address.placeholder": "Nhập URL",
"action.stop": "Dừng",
replaced: "Điều khiển trình duyệt đã được chuyển sang cửa sổ máy tính để bàn khác.",
unsupported: "Ứng dụng máy tính để bàn này không hỗ trợ ngăn trình duyệt.",
suspended: "Trình duyệt bị tạm dừng. Tương tác với phiên này để kết nối lại.",
"empty.title": "Nhập URL",
"empty.description": 'Hoặc nhập lời nhắc "Mở trong trình duyệt của ứng dụng"',
"failed.title": "Không thể truy cập URL",
"failed.description": "Kiểm tra URL và kết nối, rồi thử lại.",
"action.reload": "Tải lại",
@@ -3,13 +3,10 @@ export default {
"command.reload": "重新加载浏览器页面",
"tab.title": "浏览器",
"address.label": "浏览器地址",
"address.placeholder": "输入 URL",
"action.stop": "停止",
replaced: "浏览器控件已移动到另一个桌面窗口。",
unsupported: "此桌面应用程序不支持浏览器面板。",
suspended: "浏览器已挂起。请与此会话交互以重新连接。",
"empty.title": "输入 URL",
"empty.description": "或提示“在应用内浏览器中打开”",
"failed.title": "无法访问 URL",
"failed.description": "请检查 URL 和网络连接,然后重试。",
"action.reload": "重新加载",
@@ -3,13 +3,10 @@ export default {
"command.reload": "重新載入瀏覽器頁面",
"tab.title": "瀏覽器",
"address.label": "瀏覽器位址",
"address.placeholder": "輸入 URL",
"action.stop": "停止",
replaced: "瀏覽器控制已移至另一個桌面視窗。",
unsupported: "此桌面應用程式不支援瀏覽器面板。",
suspended: "瀏覽器已暫停。與此工作階段互動以重新連線。",
"empty.title": "輸入 URL",
"empty.description": "或輸入提示「在應用程式內建瀏覽器中開啟」",
"failed.title": "無法連上 URL",
"failed.description": "請檢查 URL 和網路連線,然後再試一次。",
"action.reload": "重新載入",
@@ -0,0 +1,53 @@
import { nativeImage } from "electron"
import { MAX_ICON_URL } from "./ipc"
import type { BrowserNetwork } from "./network"
type Fetched = { mime: string; data: Buffer }
/**
* The first of a page's icon candidates that loads, as a data URL small enough to report and store. An SVG stays as
* it is; any other format is redrawn as a PNG of at most 32px, which also drops anything that is not an image.
*/
export function loadIcon(candidates: readonly string[], network: BrowserNetwork | null) {
return candidates
.filter((url) => /^(?:https?:|data:image\/)/i.test(url))
.slice(0, 3)
.reduce<Promise<string | undefined>>(
(found, url) =>
found.then(async (icon) => {
if (icon) return icon
const fetched = url.startsWith("data:") ? inline(url) : await network?.icon(url)
return fetched ? encode(fetched) : undefined
}),
Promise.resolve(undefined),
)
}
function inline(url: string): Fetched | undefined {
const match = /^data:(image\/[\w.+-]+)(;base64)?,(.*)$/is.exec(url)
if (!match) return
const body = match[3] ?? ""
return {
mime: (match[1] ?? "").toLowerCase(),
data: match[2] ? Buffer.from(body, "base64") : Buffer.from(decodeURIComponent(body)),
}
}
function encode(fetched: Fetched) {
// An SVG in an <img> runs no script and loads nothing, so it needs no redrawing.
if (fetched.mime === "image/svg+xml") {
const url = `data:image/svg+xml;base64,${fetched.data.toString("base64")}`
return url.length <= MAX_ICON_URL ? url : undefined
}
const image = nativeImage.createFromBuffer(fetched.data)
if (image.isEmpty()) return
const url = (image.getSize().width > 32 ? image.resize({ width: 32, quality: "best" }) : image).toDataURL()
return url.length <= MAX_ICON_URL ? url : undefined
}
@@ -1,6 +1,7 @@
import { Schema } from "effect"
import { Extension, Ipc, Store } from "../sdk"
import { Browser } from "./contract"
import { History } from "./history"
import en from "./i18n/en"
import type { BrowserPane } from "./ipc"
@@ -14,6 +15,9 @@ export default Extension.define({
stores: {
// The end of the last block of element refs main reserved, so refs stay unique across reloads.
refs: Store.main(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)), 0),
// Pages the browser showed, for the new tab page and the address field's suggestions. One list for every
// session and server, kept on this device.
history: Store.global(History, { visits: [] }),
},
i18n: {
en,
@@ -8,6 +8,9 @@ const detail = (maximum: number) => Schema.String.check(Schema.isMaxLength(maxim
const binding = text(128)
/** The longest page icon data URL main reports: a 32px PNG is a few kilobytes; larger icons are dropped. */
export const MAX_ICON_URL = 24_576
/** An element the user picked in the page. The ref stays valid for browser tools until the page navigates. */
export const PaneElement = Schema.Struct({
ref: Browser.Ref,
@@ -39,6 +42,16 @@ export const PaneEvent = Schema.Union([
active: Schema.Boolean,
element: Schema.optionalKey(PaneElement),
}),
// Details only this desktop shows, kept out of the server's tab state: the page's icon as a data URL, and its zoom
// factor, 1 at 100%.
Schema.Struct({
type: Schema.Literal("page"),
tabID: Browser.TabID,
icon: Schema.optionalKey(detail(MAX_ICON_URL).check(Schema.isStartsWith("data:image/"))),
zoom: Schema.Finite.check(Schema.isBetween({ minimum: 0.25, maximum: 5 })),
}),
// The page asked for the address field, with the platform's address shortcut.
Schema.Struct({ type: Schema.Literal("address"), tabID: Browser.TabID }),
])
export type PaneEvent = typeof PaneEvent.Type
@@ -65,6 +78,18 @@ export const BrowserPane = Ipc.define({
inspect: { input: Schema.Struct({ binding, tabID: Browser.TabID, enabled: Schema.Boolean }) },
// Highlights a picked element briefly, or clears any highlight when ref is omitted.
highlight: { input: Schema.Struct({ binding, tabID: Browser.TabID, ref: Schema.optionalKey(Browser.Ref) }) },
// Zooms the page one step in or out, or back to 100%; the page reports its new zoom as a page event.
zoom: {
input: Schema.Struct({ binding, tabID: Browser.TabID, zoom: Schema.Literals(["in", "out", "reset"]) }),
},
// The site data the page's address can read in this desktop's browser: its cookie count. Zero for a page that is
// not a web page.
site: {
input: Schema.Struct({ binding, tabID: Browser.TabID }),
output: Schema.Struct({ cookies: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)) }),
},
// Deletes the cookies the page's address can read and its origin's stored data, then reloads the page.
clearSite: { input: Schema.Struct({ binding, tabID: Browser.TabID }) },
close: { input: Schema.Struct({ binding }) },
},
events: {
@@ -34,6 +34,9 @@ const setup: MainSetup<typeof definition> = (ctx) => {
(await existing()).inspect(caller.window, input.binding, input.tabID, input.enabled),
highlight: async (input, caller) =>
(await existing()).highlight(caller.window, input.binding, input.tabID, input.ref),
zoom: async (input, caller) => (await existing()).zoom(caller.window, input.binding, input.tabID, input.zoom),
site: async (input, caller) => (await existing()).site(caller.window, input.binding, input.tabID),
clearSite: async (input, caller) => (await existing()).clearSite(caller.window, input.binding, input.tabID),
close: async (input, caller) => (await existing()).close(caller.window, input.binding),
})
+94 -4
View File
@@ -4,7 +4,15 @@ import { makeEventListener } from "@solid-primitives/event-listener"
import type { Browser } from "@opencode/plugin-browser/rpc"
import { createKeyed, type Link, type SessionRef, type SetupContext } from "../sdk"
import { readHref } from "./comment"
import { createConnection, unavailable, type Connection, type InspectEvent, type Registration } from "./connection"
import {
createConnection,
unavailable,
type Connection,
type InspectEvent,
type Registration,
type Zoom,
} from "./connection"
import { recordable, remember, withIcon } from "./history"
import type definition from "./index"
import { isHtml, resolveLink, workspaceFileURL } from "./link"
import { BrowserPane, type PaneEvent } from "./ipc"
@@ -37,8 +45,13 @@ type ModelState = {
/** Servers whose plugin lacks the browser RPC; sessions on them stop retrying. */
unsupported: Record<string, true | undefined>
errors: Record<string, string | undefined>
/** Each session's page icons and zoom by tab, as this desktop reports them. */
pages: Record<string, Record<string, PageDetail | undefined> | undefined>
}
/** A page's icon as a data URL, and its zoom factor, 1 at 100%. */
type PageDetail = { icon?: string; zoom: number }
/** A mounted pane; the newest one answers the reload and inspect commands. */
type PaneHandle = {
visible: () => boolean
@@ -47,6 +60,8 @@ type PaneHandle = {
inspectable: () => boolean
/** Turns the element picker on or off. */
inspect: () => void
/** Focuses the address field and selects its text. */
focusAddress: () => void
}
export type Model = ReturnType<typeof createModel>
@@ -68,13 +83,37 @@ export function createModel(ctx: SetupContext<typeof definition>) {
}
const owner = getOwner()
const [state, setState] = createStore<ModelState>({ attachments: {}, unsupported: {}, errors: {} })
const history = ctx.stores.history
const [state, setState] = createStore<ModelState>({ attachments: {}, unsupported: {}, errors: {}, pages: {} })
const [panes, setPanes] = createSignal<readonly PaneHandle[]>([])
const live = new Map<string, Live>()
const listeners = new Map<string, (event: PaneEvent) => void>()
const inspectors = new Map<string, Set<(event: InspectEvent) => void>>()
const addressed = new Map<string, Set<(tabID: Browser.TabID) => void>>()
// Sessions where the user just opened a tab; its pane focuses the address field once the blank page shows.
const opening = new Set<string>()
// Each tab's last recorded page, so a state that repeats it does not write the history again.
const recorded = new Map<string, string>()
const key = (tabID: string) => `${ctx.id}:${tabID}`
// Pages the user or the agent opened, once loaded: only a tab whose page exists has a real URL and title, as a
// restored tab's saved URL carries no title until it loads again.
const record = (session: string, next: { browser: Browser.State | null; embeds: Readonly<Record<string, string>> }) =>
next.browser?.tabs.forEach((tab) => {
if (tab.loading || tab.loadError || !next.embeds[tab.id] || !recordable(tab.url)) return
const page = `${tab.url}\n${tab.title}`
if (recorded.get(`${session}\n${tab.id}`) === page) return
recorded.set(`${session}\n${tab.id}`, page)
history.set({
visits: remember(
history.value.visits,
{ url: tab.url, title: tab.title },
state.pages[session]?.[tab.id]?.icon,
),
})
})
// The SDK removes the listener when the Ipc's generation ends.
createKeyed(pane, (current) => current.on("event", (value) => listeners.get(value.binding)?.(value.event)))
@@ -100,7 +139,14 @@ export function createModel(ctx: SetupContext<typeof definition>) {
const close = (id: string) => {
live.get(id)?.dispose()
live.delete(id)
setState("attachments", id, undefined)
opening.delete(id)
Array.from(recorded.keys())
.filter((item) => item.startsWith(`${id}\n`))
.forEach((item) => recorded.delete(item))
batch(() => {
setState("attachments", id, undefined)
setState("pages", id, undefined)
})
}
const attach = (ref: SessionRef) => {
@@ -137,6 +183,17 @@ export function createModel(ctx: SetupContext<typeof definition>) {
},
preview: (path) => preview(entry, path),
inspect: (event) => inspectors.get(id)?.forEach((listener) => listener(event)),
page: (event) => {
setState("pages", id, (pages) => ({
...pages,
[event.tabID]: event.icon ? { icon: event.icon, zoom: event.zoom } : { zoom: event.zoom },
}))
const url = tab({ key: id }, event.tabID)?.url
const visits = url && event.icon ? withIcon(history.value.visits, url, event.icon) : undefined
if (visits) history.set({ visits })
},
address: (tabID) => addressed.get(id)?.forEach((listener) => listener(tabID)),
change: (next, mirror) => {
if (next.error === "browser.pane.unsupported") {
setState("unsupported", ref.server.id, true)
@@ -167,6 +224,7 @@ export function createModel(ctx: SetupContext<typeof definition>) {
: undefined,
}),
)
record(id, next)
// After the store: closing a strip tab asks this model whether the desktop still has it.
if (ref.location) return mirror()
@@ -379,8 +437,40 @@ export function createModel(ctx: SetupContext<typeof definition>) {
openURL,
command,
tab,
/** Opens a blank tab for the user, whose pane then focuses the address field. */
open(session: SessionRef) {
if (available(session)) command(session, { type: "tabs.open" })
if (!available(session)) return
opening.add(session.key)
command(session, { type: "tabs.open" })
},
/** Whether the user just opened a tab in this session; true once, for the pane that focuses its address. */
opened: (session: Session) => opening.delete(session.key),
/** A page's icon and zoom, once this desktop reported them. */
page: (session: Session, tabID: string) => state.pages[session.key]?.[tabID],
zoom(session: Session, tabID: Browser.TabID, zoom: Zoom) {
live.get(session.key)?.connection.zoom(tabID, zoom)
},
/** The page's cookie count; undefined while the pane cannot answer. */
site: (session: Session, tabID: Browser.TabID) => live.get(session.key)?.connection.site(tabID),
/** Deletes the page's cookies and stored data, and reloads it. */
clearSite: (session: Session, tabID: Browser.TabID) => live.get(session.key)?.connection.clearSite(tabID),
/** Pages the browser showed, newest first. */
visits: () => history.value.visits,
clearHistory: () => {
recorded.clear()
history.set({ visits: [] })
},
/** The page asking for the address field with its shortcut. */
onAddress(session: Session, listener: (tabID: Browser.TabID) => void) {
const set = addressed.get(session.key) ?? new Set()
set.add(listener)
addressed.set(session.key, set)
return () => {
set.delete(listener)
if (!set.size) addressed.delete(session.key)
}
},
pending,
/**
+45 -1
View File
@@ -1,4 +1,4 @@
import { session, type WebContents } from "electron"
import { net, session, type WebContents } from "electron"
import type { RpcClient } from "@opencode/client/effect/api"
import type { Session } from "@opencode/schema/session"
import { Browser } from "@opencode/plugin-browser/rpc"
@@ -73,5 +73,49 @@ export const createBrowserNetwork = Effect.fn("BrowserNetwork.create")(function*
return () => contents.off("login", login)
},
/**
* Fetches a page icon through the server's network, as the page loaded it. Resolves undefined for anything but a
* small image: a failure, a timeout, another content type, or more than `MAX_ICON_BYTES`.
*/
icon: (url: string) =>
new Promise<{ mime: string; data: Buffer } | undefined>((resolve) => {
const request = net.request({ url, session: partition, useSessionCookies: true, redirect: "follow" })
const chunks: Buffer[] = []
const finish = (value?: { mime: string; data: Buffer }) => {
clearTimeout(timeout)
resolve(value)
}
const fail = () => {
request.abort()
finish()
}
const timeout = setTimeout(fail, 5_000)
request.on("login", (auth, callback) => {
if (auth.isProxy && auth.host === proxy.host && auth.port === proxy.port)
return callback(proxy.credentials.username, proxy.credentials.password)
callback()
})
request.on("response", (response) => {
const header = response.headers["content-type"]
const mime = (Array.isArray(header) ? header[0] : header)?.split(";")[0]?.trim().toLowerCase() ?? ""
if (response.statusCode !== 200 || !mime.startsWith("image/")) return fail()
response.on("data", (chunk) => {
chunks.push(chunk)
if (chunks.reduce((size, item) => size + item.length, 0) > MAX_ICON_BYTES) fail()
})
response.on("end", () => finish({ mime, data: Buffer.concat(chunks) }))
response.on("error", fail)
})
request.on("error", fail)
request.end()
}),
}
})
/** Icons larger than this are not worth reducing; sites list a favicon of a few kilobytes. */
const MAX_ICON_BYTES = 256 * 1024
+23 -2
View File
@@ -325,6 +325,15 @@ export function createBrowserPane(input: {
async highlight(window: number, binding: string, tabID: Browser.TabID, ref?: Browser.Ref) {
await owned(window, binding).pages.get(tabID)?.highlight(ref)
},
zoom(window: number, binding: string, tabID: Browser.TabID, direction: "in" | "out" | "reset") {
owned(window, binding).pages.get(tabID)?.zoom(direction)
},
async site(window: number, binding: string, tabID: Browser.TabID) {
return (await owned(window, binding).pages.get(tabID)?.site()) ?? { cookies: 0 }
},
async clearSite(window: number, binding: string, tabID: Browser.TabID) {
await owned(window, binding).pages.get(tabID)?.clearSite()
},
async command(window: number, binding: string, command: Browser.Action) {
const entry = owned(window, binding)
await execute(entry, { action: command, files: [] }, new AbortController().signal)
@@ -480,9 +489,21 @@ export function createBrowserPane(input: {
inspect: (event) => {
if (entry.pages.has(id)) report(entry, { type: "inspect", tabID: id, ...event })
},
popup: (popupOptions) => {
// Straight to the window: icons and zoom are local to this desktop, like the embed.
detail: (value) => {
if (entry.pages.has(id)) publish(entry, { type: "page", tabID: id, ...value })
},
zoomed: () => entry.pages.forEach((page) => page.detail()),
address: () => {
if (!entry.pages.has(id) || entry.win.isDestroyed()) return
// The page held keyboard focus; the app's address field needs it back.
entry.win.webContents.focus()
publish(entry, { type: "address", tabID: id })
},
popup: (popupOptions, background) => {
const popup = create(entry, false, popupOptions)
focus(entry, popup.state().id)
if (!background) focus(entry, popup.state().id)
return popup.contents
},
@@ -41,6 +41,8 @@ import {
type Storage,
type Workspaces,
} from "../sdk"
import barStyles from "./bar.css?inline"
import type { History } from "./history"
import browserEn from "./i18n/en"
import type definition from "./index"
import { createModel } from "./model"
@@ -73,8 +75,35 @@ type PaneFixtureState = {
picker: Record<string, boolean | undefined>
highlights: { sessionKey: string; ref?: Browser.Ref }[]
comments: ComposerNote[]
/** The page's zoom as main last reported it. */
zoom: number
/** The browser history store. */
history: History
/** URLs the pane opened in the system browser. */
external: string[]
/** Cookies the page's address can read. */
cookies: number
}
// A 16px blue square, as main reports a page icon.
const icon =
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiByeD0iMyIgZmlsbD0iIzNiODJmNiIvPjwvc3ZnPg=="
const visits: History["visits"] = [
{
url: "https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements",
title: "HTML elements reference - HTML | MDN",
icon,
},
{
url: "https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Colors/Color_format_converter",
title: "Color format converter - CSS | MDN",
icon,
},
{ url: "http://localhost:5173/settings", title: "Settings - Preview" },
{ url: "https://alpha.example/", title: "Alpha" },
]
// Component-test fixture: the real pane on the real host embeds, with the desktop faked at its two
// boundaries: the model's main-process pane (tab state, picker events) and the host bridge that shows native views.
export function mountBrowserPane(input: PaneHost) {
@@ -105,6 +134,10 @@ export function mountBrowserPane(input: PaneHost) {
picker: {},
highlights: [],
comments: [],
zoom: 1,
history: { visits: [] },
external: [],
cookies: 3,
})
// Each capture waits until the fixture releases it, so a spec can observe the pending state.
@@ -151,12 +184,19 @@ export function mountBrowserPane(input: PaneHost) {
// SAFETY: the host embeds call only `embed` and `capture` on their bridge (`runtime/extension/embeds.tsx`).
const embeds = input.createEmbeds({ bridge: bridge as Bridge, zoom: () => 1, dialog: () => false })
const t = (key: string, params?: Readonly<Partial<Record<string, string | number>>>) =>
(messages.get(key) ?? language.t(key)).replace(/\{\{(\w+)\}\}/g, (_, name: string) =>
String(params?.[name] ?? ""),
)
const base = {
id: "browser",
keybinds: { keybind: () => [], keys: (bind: string) => bind.split("+") },
desktop: { zoom: () => 1 },
embeds,
t: (key: string) => messages.get(key) ?? language.t(key),
t,
// English plural forms, as the host picks them.
plural: (key: string, count: number) => t(`${key}.${count === 1 ? "one" : "other"}`, { count }),
}
const panel: PanelFrame = {
@@ -169,7 +209,14 @@ export function mountBrowserPane(input: PaneHost) {
open: () => [],
}
const server = { id: "browser-test", compatible: true, data: { on: () => () => undefined } }
const server = {
id: "browser-test",
name: "Local",
local: true,
compatible: true,
data: { on: () => () => undefined },
}
const [reads, setReads] = createStore({ directory: 0 })
// Frozen session refs, as the real host supplies. Only the key belongs in the pane's transient state.
@@ -272,6 +319,20 @@ export function mountBrowserPane(input: PaneHost) {
if (!key) throw new Error("Unknown highlight binding")
setStore("highlights", (items) => [...items, { sessionKey: key, ref: value.ref }])
},
// Main steps through Chromium's presets and reports the page's new zoom.
zoom: async (value) => {
const steps = [0.9, 1, 1.1, 1.25]
const index = steps.indexOf(store.zoom)
const next = value.zoom === "reset" ? 1 : (steps[index + (value.zoom === "in" ? 1 : -1)] ?? store.zoom)
setStore("zoom", next)
emit(store.session, { type: "page", tabID: value.tabID, zoom: next })
},
site: async () => ({ cookies: store.cookies }),
// Main deletes the site's data and reloads the page.
clearSite: async () => {
setStore({ cookies: 0, generation: store.generation + 1 })
report()
},
close: async () => undefined,
state: () => undefined,
on: (_name, listener) => {
@@ -292,6 +353,18 @@ export function mountBrowserPane(input: PaneHost) {
screen: { current: () => screen },
layout: { narrow: () => false, stored: () => [], state: () => "visible", open() {}, close() {} },
links: { open() {} },
stores: {
history: {
get value() {
return store.history
},
set: (next: History) => setStore("history", reconcile(next)),
},
},
system: {
copy: async () => undefined,
openExternal: (url: string) => setStore("external", (items) => [...items, url]),
},
}
// SAFETY: the real model and pane use only the host boundaries implemented above in this fixture's flows.
@@ -319,6 +392,9 @@ export function mountBrowserPane(input: PaneHost) {
return (
<ExtensionContext.Provider value={extension}>
<PanelContext.Provider value={panel}>
{/* The extension contributes the bar's styles through the host's Style registry, which this fixture skips.
Menus and suggestions portal into <body>, under this fixture's fixed host unless raised above it. */}
<style>{`${barStyles}\n[data-popper-positioner] { z-index: 1001 !important; }`}</style>
<h1 style={{ "font-size": "24px", "margin-bottom": "16px" }}>Browser pane lifecycle</h1>
<nav style={{ display: "flex", "flex-wrap": "wrap", gap: "12px", margin: "16px 0" }}>
<For each={["Alpha", "Beta", "Empty"]}>
@@ -388,12 +464,26 @@ export function mountBrowserPane(input: PaneHost) {
<button onClick={() => held.splice(0).forEach((resolve) => resolve())}>Release capture</button>
<button onClick={() => setStore("covered", (covered) => !covered)}>Toggle popover</button>
<button onClick={pick}>Pick element</button>
<button onClick={() => setStore("history", { visits })}>Seed history</button>
<button onClick={() => emit(store.session, { type: "page", tabID: current().id, icon, zoom: store.zoom })}>
Page icon
</button>
<button onClick={() => emit(store.session, { type: "address", tabID: current().id })}>
Address shortcut
</button>
</nav>
<p>Captures: {store.captures}</p>
<p>Zoom: {Math.round(store.zoom * 100)}</p>
<p>Visits: {store.history.visits.map((visit) => visit.url).join(" ")}</p>
<p>External: {store.external.join(" ")}</p>
<p>Session getter reads: {reads.directory}</p>
<p>Picker: {store.picker[store.session] ? "on" : "off"}</p>
<For each={tabs}>
{(tab) => <p>Picker {tab.title}: {store.picker[tab.title] ? "on" : "off"}</p>}
{(tab) => (
<p>
Picker {tab.title}: {store.picker[tab.title] ? "on" : "off"}
</p>
)}
</For>
<p>Highlights: {store.highlights.map((item) => item.ref ?? "clear").join(",")}</p>
<p>Highlight owners: {store.highlights.map((item) => item.sessionKey).join(",")}</p>
@@ -689,6 +779,9 @@ export function mountBrowserRegion(input: RegionHost) {
command: async () => undefined,
inspect: async () => undefined,
highlight: async () => undefined,
zoom: async () => undefined,
site: async () => ({ cookies: 0 }),
clearSite: async () => undefined,
close: async () => undefined,
state: () => undefined,
on: (_name, listener) => {
File diff suppressed because it is too large Load Diff
@@ -4,6 +4,7 @@ import { Command, createKeyed, LinkHandler, MenuItem, onIdle, Panel, Style, type
import { Browser } from "./contract"
import type definition from "./index"
import type { Model } from "./model"
import barStyles from "./bar.css?inline"
import commentStyles from "./comment.css?inline"
import tabStyles from "./tabs.css?inline"
@@ -32,6 +33,7 @@ const setup: Setup<typeof definition> = (ctx) => {
// Tab trigger styles render with the strip, before the pane chunk loads.
ctx.add(Style, tabStyles)
ctx.add(Style, commentStyles)
ctx.add(Style, barStyles)
// Everything here serves a mounted session, so the attachment model and the pane's protocol
// schemas load when the first session opens instead of at startup.
const opened = createMemo((seen: boolean) => seen || !!sessions.current(), false)
@@ -67,6 +69,25 @@ const setup: Setup<typeof definition> = (ctx) => {
}
})
// The system browser's address shortcut. While the page has focus, the page claims it and main forwards it; here it
// covers focus elsewhere in the pane. Ctrl+L focuses the composer outside the pane on Windows and Linux.
ctx.add(Command, (): Command | undefined => {
const pane = model()?.pane()
if (!pane) return undefined
return {
id: "address",
title: ctx.t("command.address"),
group: ctx.t("command.category.view"),
bind: "mod+l",
scope: "#browser-panel",
editable: true,
enabled: pane.visible(),
run: pane.focusAddress,
}
})
// Ctrl+Shift+C copies in the terminal, so only the focused page claims it, as in Chromium.
ctx.add(Command, (): Command | undefined => {
const pane = model()?.pane()
@@ -120,9 +141,11 @@ const setup: Setup<typeof definition> = (ctx) => {
const text = () => {
const tab = model()?.tab({ key: session }, id)
return !tab?.url || tab.url === "about:blank" ? ctx.t("tab.title") : tab.title || tab.url
return !tab?.url || tab.url === "about:blank" ? ctx.t("tab.new") : tab.title || tab.url
}
const icon = () => model()?.page({ key: session }, id)?.icon
return {
id,
get title() {
@@ -130,7 +153,9 @@ const setup: Setup<typeof definition> = (ctx) => {
},
label: () => (
<div class="flex items-center gap-1.5">
<Icon name="globe" size="small" />
<Show when={icon()} fallback={<Icon name="outline-globe" class="shrink-0" />}>
{(source) => <img src={source()} alt="" class="size-4 shrink-0 object-contain" />}
</Show>
<span class="max-w-40 truncate">{text()}</span>
</div>
),
+32
View File
@@ -186,6 +186,38 @@ const icons = {
viewBox: "0 0 16 16",
body: `<path d="M4.14908 11.0081H1.76282V1.51758H9.1038V2.55588M14.2225 4.99681H6.75397V14.4873H14.2225V4.99681Z" stroke="currentColor"/>`,
},
"outline-arrow-left": {
viewBox: "0 0 16 16",
body: `<path d="M2.44442 7.99999H13.5555M6.22221 4.22222L2.44442 7.99999L6.22221 11.7778" stroke="currentColor"/>`,
},
"outline-arrow-right": {
viewBox: "0 0 16 16",
body: `<path d="M13.5555 7.99999H2.4444M9.77773 11.7778L13.5555 7.99999L9.77773 4.22222" stroke="currentColor"/>`,
},
"outline-arrow-up-right": {
viewBox: "0 0 16 16",
body: `<path d="M12.5 3.5L3.5 12.5M12.5 9.62L12.5 3.5L6.38 3.5" stroke="currentColor"/>`,
},
"outline-rotate-clockwise": {
viewBox: "0 0 16 16",
body: `<path d="M14.1992 8C14.1992 9.18669 13.8473 10.3467 13.188 11.3334C12.5288 12.3201 11.5917 13.0892 10.4953 13.5433C9.39897 13.9974 8.19257 14.1162 7.02868 13.8847C5.86479 13.6532 4.7957 13.0818 3.95658 12.2426C3.11747 11.4035 2.54602 10.3344 2.31451 9.17054C2.083 8.00666 2.20182 6.80026 2.65594 5.7039C3.11007 4.60754 3.87911 3.67047 4.8658 3.01118C5.85249 2.35189 7.01253 2 8.19922 2C9.87922 2 11.4859 2.66667 12.6926 3.82667L14.1992 5.33333M10.866 5.33333L14.1992 5.33333L14.1993 2" stroke="currentColor" stroke-linecap="square" stroke-linejoin="round"/>`,
},
"outline-globe": {
viewBox: "0 0 16 16",
body: `<path d="M8.00001 14.4445C9.47277 14.4445 10.6667 11.5592 10.6667 8.00001C10.6667 4.44085 9.47277 1.55557 8.00001 1.55557M8.00001 14.4445C6.52725 14.4445 5.33335 11.5592 5.33335 8.00001C5.33335 4.44085 6.52725 1.55557 8.00001 1.55557M8.00001 14.4445C11.5592 14.4445 14.4444 11.5592 14.4444 8C14.4444 4.44083 11.5592 1.55557 8.00001 1.55557M8.00001 14.4445C4.44085 14.4445 1.55556 11.5592 1.55556 8C1.55556 4.44083 4.44085 1.55557 8.00001 1.55557M1.87203 6.00001H14.128M2.03555 10.4445H13.9644" stroke="currentColor"/>`,
},
"outline-globe-plus": {
viewBox: "0 0 16 16",
body: `<path d="M7 12.6667C5.71133 12.6667 4.66667 10.1296 4.66667 7C4.66667 3.87039 5.71133 1.33333 7 1.33333C8.2426 1.33333 9.25833 3.69221 9.32933 6.66667" stroke="currentColor" stroke-miterlimit="10"/><path d="M12.6667 6.66667H1.33333" stroke="currentColor"/><path d="M12.6667 7.72825V7C12.6667 3.87039 10.1296 1.33333 7 1.33333C3.8704 1.33333 1.33333 3.87039 1.33333 7C1.33333 10.1296 3.8704 12.6667 7 12.6667H7.58694" stroke="currentColor" stroke-miterlimit="10"/><path d="M9.5 11.5H13.5M11.5 9.5V13.5" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/>`,
},
"outline-cookie": {
viewBox: "0 0 16 16",
body: `<path d="M14 8.5A6 6 0 1 1 7.5 2a2 2 0 0 0 2.5 2.5 2 2 0 0 0 2.5 2.5c.4.6.9 1.1 1.5 1.5Z" stroke="currentColor" stroke-linejoin="round"/><path d="M5.5 6.5h.01M5.5 10h.01M8.5 9h.01M10.5 11.5h.01" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>`,
},
"outline-browser-annotate": {
viewBox: "0 0 16 16",
body: `<path d="M10.6667 2H14V5.33333M2 5.33333V2H5.33333M2 10.6667V14H5.33333" stroke="currentColor" stroke-linecap="square"/><path d="M11.8571 11.8572L14 14M6.50008 6.50033L14.0001 9.00033L9.00008 14.0003L6.50008 6.50033Z" stroke="currentColor" stroke-linecap="square"/>`,
},
"arrow-up-right": {
viewBox: "0 0 16 16",
body: `<path d="M11 9.56V5H6.44M11 5L5 11" stroke="currentColor"/>`,
+2
View File
@@ -63,6 +63,8 @@ export function Icon(props: IconProps) {
data-directional={
iconName() === "arrow-left" ||
iconName() === "arrow-right" ||
iconName() === "outline-arrow-left" ||
iconName() === "outline-arrow-right" ||
iconName() === "chevron-left" ||
iconName() === "chevron-right"
? ""