1 import { type APP_NAMES } from '@proton/shared/lib/constants';
3 import { electronAppVersion } from '../helpers/desktop';
4 import { getInboxDesktopInfo, hasInboxDesktopFeature, invokeInboxDesktopIPC } from './ipcHelpers';
6 export const addDesktopAppVersion = (appVersion: string) => {
7 return `${electronAppVersion} (${appVersion})`;
10 export const storeAppVersion = (name: APP_NAMES, version: string) => {
11 if (!hasInboxDesktopFeature('StoreVersion')) {
14 invokeInboxDesktopIPC({ type: 'storeAppVersion', payload: { name, version } });
17 export const getAllAppVersions = (): string => {
18 if (!hasInboxDesktopFeature('StoreVersion')) {
19 return electronAppVersion ?? '';
22 return getInboxDesktopInfo('getAllAppVersions');