-
+ {AboutAppIcon ? (
+ }>
+
+
+ ) : (
+
+ )}
sessionpipe gui
{version ? `Version ${version}` : "–"}
diff --git a/web/src/native/AppSettings.tsx b/web/src/native/AppSettings.tsx
index e0eaa578..4b0db287 100644
--- a/web/src/native/AppSettings.tsx
+++ b/web/src/native/AppSettings.tsx
@@ -7,11 +7,13 @@
// Notifications instead (components/NotificationsSettings.tsx), above the sounds. The
// app's own update (UpdatesGroup) is Settings › About's, under the version it replaces.
import { type ComponentType, lazy, Suspense, useEffect, useLayoutEffect, useRef, useState } from "react";
+import { AppIcon } from "../components/AppIcon";
import { ActionButton, CommandWell, Toggle } from "../components/bits";
import { Select } from "../components/Select";
-import { Group, Row } from "../components/SettingsWindow";
+import { Group, Row, Tile, TileGroup } from "../components/SettingsWindow";
import { accountMode } from "../lib/net";
import {
+ type AppIconChoice,
loadNotify,
loadReceivers,
loadSettings,
@@ -156,6 +158,53 @@ export default function AppSettings() {
);
}
+const APP_ICONS: { value: AppIconChoice; label: string }[] = [
+ { value: "default", label: "Dark" },
+ { value: "silver", label: "Silver" },
+];
+
+/** Settings › General › Display: Dock / app-switcher icon finish (desktop shell only). */
+export function AppIconRow() {
+ const s = useCell(settings);
+ const f = features();
+ useEffect(() => {
+ if (!settings.get()) void loadSettings();
+ }, []);
+ if (!f.has("appIcon")) return null;
+ const active: AppIconChoice = s?.appIcon === "silver" ? "silver" : "default";
+ const pick = (appIcon: AppIconChoice) => {
+ if (appIcon === active) return;
+ void patchSettings({ appIcon }).catch(() => {});
+ };
+ return (
+
+
+ {APP_ICONS.map((opt) => (
+ pick(opt.value)}
+ >
+
+
+ ))}
+
+
+ );
+}
+
+/** Settings › About icon: follows the chosen desktop icon finish. */
+export function AboutAppIcon() {
+ const s = useCell(settings);
+ useEffect(() => {
+ if (!settings.get()) void loadSettings();
+ }, []);
+ return
;
+}
+
/** The app's own notifications: the one switch, and on a computer (`full`) Pause and what
* to notify about, which the phone's notifier does not read. A pause is one sentence with
* Resume; a refusal by macOS is the whole panel, one row with the way to System Settings
diff --git a/web/src/native/appState.ts b/web/src/native/appState.ts
index e594eefb..77338685 100644
--- a/web/src/native/appState.ts
+++ b/web/src/native/appState.ts
@@ -5,12 +5,16 @@
import { useSyncExternalStore } from "react";
import { invoke } from "./bridge";
+export type AppIconChoice = "default" | "silver";
+
export interface AppSettings {
launchAtLogin: boolean;
menuBar: boolean;
dockBadge: boolean;
keepRunning: boolean;
menuBarOnly: boolean;
+ /** Dock / taskbar icon finish ("default" dark tile or "silver" machined chassis). */
+ appIcon?: AppIconChoice;
/** The New session shortcut, an accelerator ("Control+Alt+N"), or null (off). It
* changes through app_shortcut_set, which can fail (taken by another app). */
hotkey: string | null;
diff --git a/web/src/native/shell.ts b/web/src/native/shell.ts
index a7a9c1aa..bd443476 100644
--- a/web/src/native/shell.ts
+++ b/web/src/native/shell.ts
@@ -21,6 +21,7 @@ export type Feature =
| "autostart"
| "deeplink"
| "updater"
+ | "appIcon"
| "signer"
| "vibrancy"
| "haptics"
@@ -61,6 +62,7 @@ const FEATURES: readonly string[] = [
"autostart",
"deeplink",
"updater",
+ "appIcon",
"signer",
"vibrancy",
"haptics",
diff --git a/web/src/styles/settings.css b/web/src/styles/settings.css
index 7a3193f6..a1c85981 100644
--- a/web/src/styles/settings.css
+++ b/web/src/styles/settings.css
@@ -843,8 +843,15 @@ a.settings-row:focus-visible {
box-shadow: 0 0 0 var(--hairline) var(--line);
transition: box-shadow var(--dur-fast) var(--ease-out);
}
+.tile--icon .tile-pic {
+ padding: 3px;
+ border-radius: 13px;
+}
+.tile--icon .app-icon {
+ display: block;
+}
@media (hover: hover) {
- .tiles:not(:disabled) .tile:hover .tile-pic {
+ .tiles:not(:disabled) .tile:not(.tile--on):hover .tile-pic {
box-shadow: 0 0 0 var(--hairline) var(--line-2);
}
}