Skip to content

Commit f5611e3

Browse files
committed
feat(app): use Tahoe Finder icon everywhere
1 parent bbcca51 commit f5611e3

6 files changed

Lines changed: 2 additions & 28 deletions

File tree

packages/app/src/components/session/session-header.tsx

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -115,26 +115,6 @@ export function SessionHeader() {
115115
return "unknown"
116116
})
117117

118-
const finder = createMemo(() => {
119-
if (os() !== "macos") return "finder"
120-
if (platform.platform === "desktop" && platform.os === "macos" && platform.osVersion) {
121-
const parts = platform.osVersion.split(/[._]/).map((part) => Number(part))
122-
const major = parts[0]
123-
if (!Number.isFinite(major)) return "finder"
124-
const value = major === 10 ? parts[1] ?? 0 : major
125-
if (value >= 26) return "finder-tahoe"
126-
return "finder"
127-
}
128-
if (typeof navigator !== "object") return "finder"
129-
const value = navigator.userAgent.match(/Mac OS X (\d+)(?:[._](\d+))?/i)
130-
if (!value) return "finder"
131-
const major = Number(value[1])
132-
if (!Number.isFinite(major)) return "finder"
133-
const version = major === 10 ? Number(value[2] ?? 0) : major
134-
if (version >= 26) return "finder-tahoe"
135-
return "finder"
136-
})
137-
138118
const [exists, setExists] = createStore<Partial<Record<OpenApp, boolean>>>({ finder: true })
139119

140120
createEffect(() => {
@@ -160,7 +140,7 @@ export function SessionHeader() {
160140

161141
const options = createMemo(() => {
162142
if (os() === "macos") {
163-
return [{ id: "finder", label: "Finder", icon: finder() }, ...MAC_APPS.filter((app) => exists[app.id])] as const
143+
return [{ id: "finder", label: "Finder", icon: "finder" }, ...MAC_APPS.filter((app) => exists[app.id])] as const
164144
}
165145

166146
if (os() === "windows") {

packages/app/src/context/platform.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ export type Platform = {
99
/** Desktop OS (Tauri only) */
1010
os?: "macos" | "windows" | "linux"
1111

12-
/** Desktop OS version (Tauri only) */
13-
osVersion?: string
14-
1512
/** App version */
1613
version?: string
1714

packages/desktop/src/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { open, save } from "@tauri-apps/plugin-dialog"
66
import { getCurrent, onOpenUrl } from "@tauri-apps/plugin-deep-link"
77
import { openPath as openerOpenPath } from "@tauri-apps/plugin-opener"
88
import { open as shellOpen } from "@tauri-apps/plugin-shell"
9-
import { type as ostype, version as osversion } from "@tauri-apps/plugin-os"
9+
import { type as ostype } from "@tauri-apps/plugin-os"
1010
import { check, Update } from "@tauri-apps/plugin-updater"
1111
import { getCurrentWindow } from "@tauri-apps/api/window"
1212
import { isPermissionGranted, requestPermission } from "@tauri-apps/plugin-notification"
@@ -57,7 +57,6 @@ const createPlatform = (password: Accessor<string | null>): Platform => ({
5757
if (type === "macos" || type === "windows" || type === "linux") return type
5858
return undefined
5959
})(),
60-
osVersion: osversion(),
6160
version: pkg.version,
6261

6362
async openDirectoryPickerDialog(opts) {
-240 KB
Loading

packages/ui/src/components/app-icon.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ const icons = {
2323
zed,
2424
"file-explorer": fileExplorer,
2525
finder,
26-
"finder-tahoe": "https://upload.wikimedia.org/wikipedia/commons/b/b9/Finder_Icon_macOS_Tahoe.png",
2726
terminal,
2827
iterm2,
2928
ghostty,

packages/ui/src/components/app-icons/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export const iconNames = [
66
"zed",
77
"file-explorer",
88
"finder",
9-
"finder-tahoe",
109
"terminal",
1110
"iterm2",
1211
"ghostty",

0 commit comments

Comments
 (0)