mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-26 02:18:11 +08:00
Refactor platform detection to use import.meta.env.MODE instead of isPlatformNative()
This commit is contained in:
@@ -28,7 +28,6 @@
|
||||
colorEquals,
|
||||
gradientFirstColor,
|
||||
} from "/src/utility-functions/colors";
|
||||
import { isPlatformNative } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
import type { FillChoice, MenuDirection, Color } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
type PresetColors = "None" | "Black" | "White" | "Red" | "Yellow" | "Green" | "Cyan" | "Blue" | "Magenta";
|
||||
@@ -404,7 +403,7 @@
|
||||
// TODO: Replace this temporary usage of the browser eyedropper API, that only works in Chromium-based browsers, with the custom color sampler system used by the Eyedropper tool
|
||||
function eyedropperSupported(): boolean {
|
||||
// TODO: Implement support in the desktop app for OS-level color picking
|
||||
if (isPlatformNative()) return false;
|
||||
if (import.meta.env.MODE === "native") return false;
|
||||
|
||||
return window.EyeDropper !== undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user