High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
import { CastDestinationType, castManager } from '#lib/managers/cast-manager.svelte.ts';
import { GCastDestination } from '#lib/utils/cast/gcast-destination.svelte.ts';
import type { ActionItem } from '@immich/ui';
import { mdiCast, mdiCastConnected } from '@mdi/js';
import type { MessageFormatter } from 'svelte-i18n';
export const getGlobalActions = ($t: MessageFormatter) => {
const Cast: ActionItem = {
title: $t('cast'),
icon: castManager.isCasting ? mdiCastConnected : mdiCast,
color: castManager.isCasting ? 'primary' : 'secondary',
$if: () =>
castManager.availableDestinations.length > 0 &&
castManager.availableDestinations[0].type === CastDestinationType.GCAST,
onAction: () => void GCastDestination.showCastDialog(),
};
return { Cast };
};