Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

777 B
Raw Blame
import { invoke } from '@tauri-apps/api/core';

/** Store listing for the app; HTTPS works even when the Play Store app is absent. */
export function storeListingUrl(platform: 'ios' | 'android'): string {
  return platform === 'android'
    ? 'https://play.google.com/store/apps/details?id=com.macro.workspace.mobile'
    : 'https://apps.apple.com/us/app/macro-app/id6743133649';
}

/** Keep the current app usable when the operating system cannot open the link. */
export async function openNativeUpdateLink(
  platform: 'ios' | 'android'
): Promise<boolean> {
  try {
    await invoke('plugin:opener|open_url', { url: storeListingUrl(platform) });
    return true;
  } catch (error) {
    console.error('[native-update] unable to open store', error);
    return false;
  }
}