mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-25 15:25:44 +00:00
fix(cursor/linux): force bundled mac-style SVG pack for show-cursor
This commit is contained in:
@@ -167,6 +167,7 @@ function getAvailableCursorKeys(): CursorAssetKey[] {
|
||||
export async function preloadCursorAssets() {
|
||||
if (!cursorAssetsPromise) {
|
||||
cursorAssetsPromise = (async () => {
|
||||
const isLinux = typeof navigator !== 'undefined' && /linux/i.test(navigator.platform);
|
||||
let systemCursors: Record<string, SystemCursorAsset> = {};
|
||||
|
||||
try {
|
||||
@@ -182,7 +183,9 @@ export async function preloadCursorAssets() {
|
||||
SUPPORTED_CURSOR_KEYS.map(async (key) => {
|
||||
const systemAsset = systemCursors[key];
|
||||
const uploadedAsset = uploadedCursorAssets[key];
|
||||
const assetUrl = uploadedAsset?.url ?? systemAsset?.dataUrl;
|
||||
const assetUrl = isLinux
|
||||
? uploadedAsset?.url
|
||||
: uploadedAsset?.url ?? systemAsset?.dataUrl;
|
||||
|
||||
if (!assetUrl) {
|
||||
console.warn(`[CursorRenderer] No cursor image for: ${key}`);
|
||||
|
||||
@@ -32,13 +32,6 @@ export const uploadedCursorAssets: Partial<Record<CursorAssetKey, UploadedCursor
|
||||
trim: { x: 480, y: 435, width: 333, height: 553 },
|
||||
fallbackAnchor: { x: 0.18, y: 0.1 },
|
||||
},
|
||||
'not-allowed': {
|
||||
// Keep style consistent with bundled mac-like cursors instead of falling
|
||||
// back to platform-specific system icons.
|
||||
url: arrowUrl,
|
||||
trim: { x: 480, y: 435, width: 333, height: 553 },
|
||||
fallbackAnchor: { x: 0.18, y: 0.1 },
|
||||
},
|
||||
text: {
|
||||
url: textUrl,
|
||||
trim: { x: 404, y: 192, width: 247, height: 596 },
|
||||
|
||||
Reference in New Issue
Block a user