Fix the small mechanical rules. [skip build]
Checks / checks (push) Successful in 2m12s
Trigger cinny-mobile / dispatch (push) Successful in 1s

This commit is contained in:
2026-11-01 10:28:59 +11:00
parent bb85cd9778
commit 73554ecf7f
45 changed files with 331 additions and 347 deletions
+6 -7
View File
@@ -134,7 +134,6 @@ export const focusWindow = async (): Promise<void> => {
if (electron?.window?.focus) {
await electron.window.focus();
}
return;
} catch (err) {
console.warn('Failed to focus Electron window:', err);
}
@@ -426,12 +425,12 @@ export const readClipboardImage = async (): Promise<File | null> => {
if (electron?.clipboard?.readImage) {
const result = await electron.clipboard.readImage();
// IPC may return a data URL string or { success, data } depending on path.
const dataUrl =
typeof result === 'string'
? result
: result && typeof result === 'object' && typeof result.data === 'string'
? result.data
: null;
let dataUrl = null;
if (typeof result === 'string') {
dataUrl = result;
} else if (result && typeof result === 'object' && typeof result.data === 'string') {
dataUrl = result.data;
}
if (!dataUrl) return null;
// Convert data URL to File