mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-08-27 22:04:01 +02:00
Merge branch 'main' into agent/stage-imports-before-commit
This commit is contained in:
@@ -26,19 +26,19 @@ jobs:
|
|||||||
os: "macos"
|
os: "macos"
|
||||||
runtime: "wry"
|
runtime: "wry"
|
||||||
targets: "x86_64-apple-darwin"
|
targets: "x86_64-apple-darwin"
|
||||||
- platform: "ubuntu-24.04"
|
- platform: "ubuntu-22.04"
|
||||||
args: '--config ./tauri.release.conf.json --config ''{"build":{"features":["updater","license","wry"]}}'''
|
args: '--config ./tauri.release.conf.json --config ''{"build":{"features":["updater","license","wry"]}}'''
|
||||||
yaak_arch: "x64"
|
yaak_arch: "x64"
|
||||||
os: "ubuntu"
|
os: "ubuntu"
|
||||||
runtime: "wry"
|
runtime: "wry"
|
||||||
targets: ""
|
targets: ""
|
||||||
- platform: "ubuntu-24.04-arm"
|
- platform: "ubuntu-22.04-arm"
|
||||||
args: '--config ./tauri.release.conf.json --config ''{"build":{"features":["updater","license","wry"]}}'''
|
args: '--config ./tauri.release.conf.json --config ''{"build":{"features":["updater","license","wry"]}}'''
|
||||||
yaak_arch: "arm64"
|
yaak_arch: "arm64"
|
||||||
os: "ubuntu"
|
os: "ubuntu"
|
||||||
runtime: "wry"
|
runtime: "wry"
|
||||||
targets: ""
|
targets: ""
|
||||||
- platform: "ubuntu-24.04"
|
- platform: "ubuntu-22.04"
|
||||||
args: >-
|
args: >-
|
||||||
--bundles deb
|
--bundles deb
|
||||||
--config ./tauri.release.conf.json
|
--config ./tauri.release.conf.json
|
||||||
@@ -47,7 +47,7 @@ jobs:
|
|||||||
os: "ubuntu"
|
os: "ubuntu"
|
||||||
runtime: "cef"
|
runtime: "cef"
|
||||||
targets: ""
|
targets: ""
|
||||||
- platform: "ubuntu-24.04-arm"
|
- platform: "ubuntu-22.04-arm"
|
||||||
args: >-
|
args: >-
|
||||||
--bundles deb
|
--bundles deb
|
||||||
--config ./tauri.release.conf.json
|
--config ./tauri.release.conf.json
|
||||||
@@ -102,7 +102,13 @@ jobs:
|
|||||||
if: matrix.os == 'ubuntu'
|
if: matrix.os == 'ubuntu'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y cmake ninja-build libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev libnss3 patchelf xdg-utils
|
sudo apt-get install -y cmake ninja-build libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev libnss3 patchelf xdg-utils clang-15 llvm-15
|
||||||
|
# crates/yaak-web compiles SQLite to wasm via sqlite-wasm-rs, whose C shim
|
||||||
|
# uses C23 [[noreturn]]. Ubuntu 22.04's default clang-14 rejects it; clang-15
|
||||||
|
# from the same repos accepts it. Only the wasm build uses this compiler, so
|
||||||
|
# the shipped binary keeps 22.04's glibc floor.
|
||||||
|
echo "CC_wasm32_unknown_unknown=/usr/bin/clang-15" >> "$GITHUB_ENV"
|
||||||
|
echo "AR_wasm32_unknown_unknown=/usr/bin/llvm-ar-15" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Install Protoc for plugin-runtime
|
- name: Install Protoc for plugin-runtime
|
||||||
uses: arduino/setup-protoc@v3
|
uses: arduino/setup-protoc@v3
|
||||||
|
|||||||
@@ -333,7 +333,9 @@ export function formatHotkeyString(trigger: string): string[] {
|
|||||||
} else if (p === "Alt") {
|
} else if (p === "Alt") {
|
||||||
labelParts.push("⌥");
|
labelParts.push("⌥");
|
||||||
} else if (p === "Enter") {
|
} else if (p === "Enter") {
|
||||||
labelParts.push("↩");
|
// U+21A9 has an emoji presentation, which Chromium's font fallback picks
|
||||||
|
// (a blue glyph among monochrome ones). U+FE0E forces the text form.
|
||||||
|
labelParts.push("↩︎");
|
||||||
} else if (p === "Tab") {
|
} else if (p === "Tab") {
|
||||||
labelParts.push("⇥");
|
labelParts.push("⇥");
|
||||||
} else if (p === "Backspace") {
|
} else if (p === "Backspace") {
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ const ALL_CAPABILITIES: PlatformCapabilities = {
|
|||||||
localFiles: true,
|
localFiles: true,
|
||||||
timeline: true,
|
timeline: true,
|
||||||
multiWindow: true,
|
multiWindow: true,
|
||||||
|
windowChrome: true,
|
||||||
plugins: true,
|
plugins: true,
|
||||||
encryption: true,
|
encryption: true,
|
||||||
updater: true,
|
updater: true,
|
||||||
|
|||||||
@@ -255,6 +255,13 @@ export interface PlatformCapabilities {
|
|||||||
timeline: boolean;
|
timeline: boolean;
|
||||||
/** More than one window or tab on the same data. */
|
/** More than one window or tab on the same data. */
|
||||||
multiWindow: boolean;
|
multiWindow: boolean;
|
||||||
|
/**
|
||||||
|
* The page is the window's titlebar: it draws the drag region and window
|
||||||
|
* controls, and leaves room for macOS traffic lights. False when something
|
||||||
|
* else owns the frame around the page (a browser tab), so none of that
|
||||||
|
* chrome should be reserved or drawn.
|
||||||
|
*/
|
||||||
|
windowChrome: boolean;
|
||||||
/** The plugin runtime. */
|
/** The plugin runtime. */
|
||||||
plugins: boolean;
|
plugins: boolean;
|
||||||
/** Workspace encryption backed by a key the host keeps. */
|
/** Workspace encryption backed by a key the host keeps. */
|
||||||
|
|||||||
@@ -129,13 +129,16 @@ Reported honestly, so callers gate on the question rather than on the host:
|
|||||||
|
|
||||||
| True | False |
|
| True | False |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `cookieJar` (the jar stores and edits here; only filling it needs the sender) | `grpc`, `websocket`, `git`, `sync`, `tlsOptions`, `localFiles`, `timeline`, `multiWindow`, `plugins`, `encryption`, `updater`, `clipboardRead`, `systemFonts`, `license` |
|
| `cookieJar` (the jar stores and edits here; only filling it needs the sender) | `grpc`, `websocket`, `git`, `sync`, `tlsOptions`, `localFiles`, `timeline`, `multiWindow`, `windowChrome`, `plugins`, `encryption`, `updater`, `clipboardRead`, `systemFonts`, `license` |
|
||||||
|
|
||||||
`multiWindow: false` means the host cannot open a *second window* on demand —
|
`multiWindow: false` means the host cannot open a *second window* on demand —
|
||||||
what `cmd_new_child_window` does for Settings and workspace switching. It is not
|
what `cmd_new_child_window` does for Settings and workspace switching. It is not
|
||||||
a claim that nothing else is looking: other tabs may well be open on the same
|
a claim that nothing else is looking: other tabs may well be open on the same
|
||||||
worker, and it pushes every write to all of them regardless.
|
worker, and it pushes every write to all of them regardless.
|
||||||
|
|
||||||
|
`windowChrome: false` means the browser owns the frame around the page, so the
|
||||||
|
header draws no window controls and reserves no room for macOS traffic lights.
|
||||||
|
|
||||||
## Multiple tabs
|
## Multiple tabs
|
||||||
|
|
||||||
Each tab mints a label at load (`tab_xxxxxxxx`) and sends it with every command;
|
Each tab mints a label at load (`tab_xxxxxxxx`) and sends it with every command;
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ function capabilitiesFor(): PlatformCapabilities {
|
|||||||
// else is looking: other tabs may well be open on the same worker, and it
|
// else is looking: other tabs may well be open on the same worker, and it
|
||||||
// pushes every write to all of them regardless of this flag.
|
// pushes every write to all of them regardless of this flag.
|
||||||
multiWindow: false,
|
multiWindow: false,
|
||||||
|
// The browser draws the frame around the page. There are no traffic lights
|
||||||
|
// to leave room for and no window controls to draw.
|
||||||
|
windowChrome: false,
|
||||||
plugins: false,
|
plugins: false,
|
||||||
encryption: false,
|
encryption: false,
|
||||||
updater: false,
|
updater: false,
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { useCapability } from "@yaakapp-internal/platform";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import type { CSSProperties, HTMLAttributes, ReactNode } from "react";
|
import type { CSSProperties, HTMLAttributes, ReactNode } from "react";
|
||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
@@ -31,6 +32,10 @@ export function HeaderSize({
|
|||||||
interfaceScale,
|
interfaceScale,
|
||||||
}: HeaderSizeProps) {
|
}: HeaderSizeProps) {
|
||||||
const isFullscreen = useIsFullscreen();
|
const isFullscreen = useIsFullscreen();
|
||||||
|
// The header only doubles as the titlebar when the host hands the page the
|
||||||
|
// window frame (Tauri) and the user hasn't opted for the native one. In a
|
||||||
|
// browser tab the frame is the browser's: no controls, no traffic lights.
|
||||||
|
const drawsWindowChrome = useCapability("windowChrome") && !useNativeTitlebar;
|
||||||
const finalStyle = useMemo<CSSProperties>(() => {
|
const finalStyle = useMemo<CSSProperties>(() => {
|
||||||
const s = { ...style };
|
const s = { ...style };
|
||||||
|
|
||||||
@@ -38,8 +43,8 @@ export function HeaderSize({
|
|||||||
if (size === "md") s.minHeight = HEADER_SIZE_MD;
|
if (size === "md") s.minHeight = HEADER_SIZE_MD;
|
||||||
if (size === "lg") s.minHeight = HEADER_SIZE_LG;
|
if (size === "lg") s.minHeight = HEADER_SIZE_LG;
|
||||||
|
|
||||||
if (useNativeTitlebar) {
|
if (!drawsWindowChrome) {
|
||||||
// No style updates when using native titlebar
|
// No style updates when something else draws the titlebar
|
||||||
} else if (osType === "macos") {
|
} else if (osType === "macos") {
|
||||||
if (!isFullscreen) {
|
if (!isFullscreen) {
|
||||||
// Add large padding for window controls
|
// Add large padding for window controls
|
||||||
@@ -57,7 +62,7 @@ export function HeaderSize({
|
|||||||
interfaceScale,
|
interfaceScale,
|
||||||
size,
|
size,
|
||||||
style,
|
style,
|
||||||
useNativeTitlebar,
|
drawsWindowChrome,
|
||||||
osType,
|
osType,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -82,7 +87,7 @@ export function HeaderSize({
|
|||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
{!hideControls && !useNativeTitlebar && (
|
{!hideControls && drawsWindowChrome && (
|
||||||
<WindowControls
|
<WindowControls
|
||||||
onlyX={onlyXWindowControl}
|
onlyX={onlyXWindowControl}
|
||||||
osType={osType}
|
osType={osType}
|
||||||
|
|||||||
Reference in New Issue
Block a user