mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-15 17:19:40 +02:00
Move inactive projects out of active workspace: - bauntown (community website) - maerchenzauber (AI story generation) - memoro (voice memo app) - news (news aggregation) - nutriphi (nutrition tracking) - reader (reading app) - uload (URL shortener) - wisekeep (AI wisdom extraction) Update CLAUDE.md documentation: - Add presi to active projects - Document archived projects section - Update workspace configuration Archived apps can be re-activated by moving back to apps/ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
49 lines
1.4 KiB
TypeScript
49 lines
1.4 KiB
TypeScript
import { Platform } from 'react-native';
|
|
|
|
/**
|
|
* Detects if the app is running on macOS (via Mac Catalyst)
|
|
*/
|
|
export const isMacOS = (): boolean => {
|
|
// Check if running on iOS with Mac Catalyst
|
|
if (Platform.OS === 'ios') {
|
|
// @ts-ignore - isPad and isMacCatalyst are not in TypeScript definitions
|
|
const isPad = Platform.isPad;
|
|
const isMacCatalyst = Platform.isMacCatalyst;
|
|
|
|
// Mac Catalyst apps report as iOS but have special properties
|
|
if (isMacCatalyst === true) {
|
|
return true;
|
|
}
|
|
|
|
// Additional check: window dimensions on Mac are typically larger
|
|
if (typeof window !== 'undefined' && window.screen) {
|
|
const { width, height } = window.screen;
|
|
// Mac screens are typically much larger than iOS devices
|
|
if (width > 1920 || height > 1080) {
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
|
|
return false;
|
|
};
|
|
|
|
/**
|
|
* @deprecated Zeego handles platform differences internally
|
|
* Kept for backward compatibility, will be removed in future
|
|
*/
|
|
export const shouldDisableContextMenu = (): boolean => {
|
|
// Zeego handles all platform differences internally
|
|
// This function is deprecated and always returns false
|
|
return false;
|
|
};
|
|
|
|
/**
|
|
* Returns a safe platform string for logging and debugging
|
|
*/
|
|
export const getPlatformString = (): string => {
|
|
if (isMacOS()) return 'macos';
|
|
if (Platform.OS === 'ios') return 'ios';
|
|
if (Platform.OS === 'android') return 'android';
|
|
return Platform.OS;
|
|
};
|