|
|
|
@@ -9,96 +9,105 @@ import type { GridItem } from '$lib/components/IconGridSelect.svelte';
|
|
|
|
|
// --- Sort ---
|
|
|
|
|
|
|
|
|
|
export const sortByItems = (): GridItem[] => [
|
|
|
|
|
{ value: 'none', icon: 'mdiMinus', label: t('trackingConfig.sortNone') },
|
|
|
|
|
{ value: 'date', icon: 'mdiCalendar', label: t('trackingConfig.sortDate') },
|
|
|
|
|
{ value: 'rating', icon: 'mdiStar', label: t('trackingConfig.sortRating') },
|
|
|
|
|
{ value: 'name', icon: 'mdiSortAlphabeticalAscending', label: t('trackingConfig.sortName') },
|
|
|
|
|
{ value: 'random', icon: 'mdiDice3', label: t('trackingConfig.sortRandom') },
|
|
|
|
|
{ value: 'none', icon: 'mdiMinus', label: t('trackingConfig.sortNone'), desc: t('gridDesc.sortNone') },
|
|
|
|
|
{ value: 'date', icon: 'mdiCalendar', label: t('trackingConfig.sortDate'), desc: t('gridDesc.sortDate') },
|
|
|
|
|
{ value: 'rating', icon: 'mdiStar', label: t('trackingConfig.sortRating'), desc: t('gridDesc.sortRating') },
|
|
|
|
|
{ value: 'name', icon: 'mdiSortAlphabeticalAscending', label: t('trackingConfig.sortName'), desc: t('gridDesc.sortName') },
|
|
|
|
|
{ value: 'random', icon: 'mdiDice3', label: t('trackingConfig.sortRandom'), desc: t('gridDesc.sortRandom') },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
export const sortOrderItems = (): GridItem[] => [
|
|
|
|
|
{ value: 'descending', icon: 'mdiSortDescending', label: t('trackingConfig.orderDesc') },
|
|
|
|
|
{ value: 'ascending', icon: 'mdiSortAscending', label: t('trackingConfig.orderAsc') },
|
|
|
|
|
{ value: 'descending', icon: 'mdiSortDescending', label: t('trackingConfig.orderDesc'), desc: t('gridDesc.orderDesc') },
|
|
|
|
|
{ value: 'ascending', icon: 'mdiSortAscending', label: t('trackingConfig.orderAsc'), desc: t('gridDesc.orderAsc') },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// --- Album mode ---
|
|
|
|
|
|
|
|
|
|
export const albumModeItems = (): GridItem[] => [
|
|
|
|
|
{ value: 'per_collection', icon: 'mdiViewGrid', label: t('trackingConfig.albumModePerAlbum') },
|
|
|
|
|
{ value: 'combined', icon: 'mdiSetMerge', label: t('trackingConfig.albumModeCombined') },
|
|
|
|
|
{ value: 'random', icon: 'mdiDice3', label: t('trackingConfig.albumModeRandom') },
|
|
|
|
|
{ value: 'per_collection', icon: 'mdiViewGrid', label: t('trackingConfig.albumModePerAlbum'), desc: t('gridDesc.albumModePerAlbum') },
|
|
|
|
|
{ value: 'combined', icon: 'mdiSetMerge', label: t('trackingConfig.albumModeCombined'), desc: t('gridDesc.albumModeCombined') },
|
|
|
|
|
{ value: 'random', icon: 'mdiDice3', label: t('trackingConfig.albumModeRandom'), desc: t('gridDesc.albumModeRandom') },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// --- Asset type ---
|
|
|
|
|
|
|
|
|
|
export const assetTypeItems = (): GridItem[] => [
|
|
|
|
|
{ value: 'all', icon: 'mdiSelectAll', label: t('trackingConfig.assetTypeAll') },
|
|
|
|
|
{ value: 'photo', icon: 'mdiImage', label: t('trackingConfig.assetTypePhoto') },
|
|
|
|
|
{ value: 'video', icon: 'mdiVideo', label: t('trackingConfig.assetTypeVideo') },
|
|
|
|
|
{ value: 'all', icon: 'mdiSelectAll', label: t('trackingConfig.assetTypeAll'), desc: t('gridDesc.assetTypeAll') },
|
|
|
|
|
{ value: 'photo', icon: 'mdiImage', label: t('trackingConfig.assetTypePhoto'), desc: t('gridDesc.assetTypePhoto') },
|
|
|
|
|
{ value: 'video', icon: 'mdiVideo', label: t('trackingConfig.assetTypeVideo'), desc: t('gridDesc.assetTypeVideo') },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// --- Memory source ---
|
|
|
|
|
|
|
|
|
|
export const memorySourceItems = (): GridItem[] => [
|
|
|
|
|
{ value: 'albums', icon: 'mdiImageMultiple', label: t('trackingConfig.memorySourceAlbums') },
|
|
|
|
|
{ value: 'native', icon: 'mdiMemory', label: t('trackingConfig.memorySourceNative') },
|
|
|
|
|
{ value: 'albums', icon: 'mdiImageMultiple', label: t('trackingConfig.memorySourceAlbums'), desc: t('gridDesc.memorySourceAlbums') },
|
|
|
|
|
{ value: 'native', icon: 'mdiMemory', label: t('trackingConfig.memorySourceNative'), desc: t('gridDesc.memorySourceNative') },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// --- Locale ---
|
|
|
|
|
|
|
|
|
|
export const localeItems = (): GridItem[] => [
|
|
|
|
|
{ value: 'en', icon: 'mdiAlphabeticalVariant', label: 'English' },
|
|
|
|
|
{ value: 'ru', icon: 'mdiAlphabeticalVariant', label: 'Русский' },
|
|
|
|
|
{ value: 'en', icon: 'mdiAlphabeticalVariant', label: 'English', desc: t('gridDesc.localeEn') },
|
|
|
|
|
{ value: 'ru', icon: 'mdiAlphabeticalVariant', label: 'Русский', desc: t('gridDesc.localeRu') },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// --- Response mode ---
|
|
|
|
|
|
|
|
|
|
export const responseModeItems = (tFn: typeof t): GridItem[] => [
|
|
|
|
|
{ value: 'media', icon: 'mdiImage', label: tFn('commandConfig.modeMedia') },
|
|
|
|
|
{ value: 'text', icon: 'mdiText', label: tFn('commandConfig.modeText') },
|
|
|
|
|
{ value: 'media', icon: 'mdiImage', label: tFn('commandConfig.modeMedia'), desc: tFn('gridDesc.modeMedia') },
|
|
|
|
|
{ value: 'text', icon: 'mdiText', label: tFn('commandConfig.modeText'), desc: tFn('gridDesc.modeText') },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// --- Event type filter (dashboard) ---
|
|
|
|
|
|
|
|
|
|
export const eventTypeFilterItems = (): GridItem[] => [
|
|
|
|
|
{ value: '', icon: 'mdiFilterOff', label: t('dashboard.allEvents') },
|
|
|
|
|
{ value: 'assets_added', icon: 'mdiImagePlus', label: t('dashboard.filterAssetsAdded') },
|
|
|
|
|
{ value: 'assets_removed', icon: 'mdiImageMinus', label: t('dashboard.filterAssetsRemoved') },
|
|
|
|
|
{ value: 'collection_renamed', icon: 'mdiRename', label: t('dashboard.filterRenamed') },
|
|
|
|
|
{ value: 'collection_deleted', icon: 'mdiDeleteAlert', label: t('dashboard.filterDeleted') },
|
|
|
|
|
{ value: 'sharing_changed', icon: 'mdiShareVariant', label: t('dashboard.filterSharingChanged') },
|
|
|
|
|
{ value: '', icon: 'mdiFilterOff', label: t('dashboard.allEvents'), desc: t('gridDesc.allEvents') },
|
|
|
|
|
{ value: 'assets_added', icon: 'mdiImagePlus', label: t('dashboard.filterAssetsAdded'), desc: t('gridDesc.assetsAdded') },
|
|
|
|
|
{ value: 'assets_removed', icon: 'mdiImageMinus', label: t('dashboard.filterAssetsRemoved'), desc: t('gridDesc.assetsRemoved') },
|
|
|
|
|
{ value: 'collection_renamed', icon: 'mdiRename', label: t('dashboard.filterRenamed'), desc: t('gridDesc.renamed') },
|
|
|
|
|
{ value: 'collection_deleted', icon: 'mdiDeleteAlert', label: t('dashboard.filterDeleted'), desc: t('gridDesc.deleted') },
|
|
|
|
|
{ value: 'sharing_changed', icon: 'mdiShareVariant', label: t('dashboard.filterSharingChanged'), desc: t('gridDesc.sharingChanged') },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// --- Sort filter (dashboard) ---
|
|
|
|
|
|
|
|
|
|
export const sortFilterItems = (): GridItem[] => [
|
|
|
|
|
{ value: 'newest', icon: 'mdiSortClockDescending', label: t('dashboard.newestFirst') },
|
|
|
|
|
{ value: 'oldest', icon: 'mdiSortClockAscending', label: t('dashboard.oldestFirst') },
|
|
|
|
|
{ value: 'newest', icon: 'mdiSortClockDescending', label: t('dashboard.newestFirst'), desc: t('gridDesc.newestFirst') },
|
|
|
|
|
{ value: 'oldest', icon: 'mdiSortClockAscending', label: t('dashboard.oldestFirst'), desc: t('gridDesc.oldestFirst') },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// --- Chat action (Telegram targets) ---
|
|
|
|
|
|
|
|
|
|
export const chatActionItems = (): GridItem[] => [
|
|
|
|
|
{ value: '', icon: 'mdiMinus', label: t('targets.chatActionNone') },
|
|
|
|
|
{ value: 'typing', icon: 'mdiKeyboard', label: t('targets.chatActionTyping') },
|
|
|
|
|
{ value: 'upload_photo', icon: 'mdiImagePlus', label: t('targets.chatActionUploadPhoto') },
|
|
|
|
|
{ value: 'upload_video', icon: 'mdiVideoPlus', label: t('targets.chatActionUploadVideo') },
|
|
|
|
|
{ value: 'upload_document', icon: 'mdiFileUpload', label: t('targets.chatActionUploadDoc') },
|
|
|
|
|
{ value: 'record_video', icon: 'mdiVideo', label: t('targets.chatActionRecordVideo') },
|
|
|
|
|
{ value: 'record_voice', icon: 'mdiMicrophone', label: t('targets.chatActionRecordVoice') },
|
|
|
|
|
{ value: '', icon: 'mdiMinus', label: t('targets.chatActionNone'), desc: t('gridDesc.chatActionNone') },
|
|
|
|
|
{ value: 'typing', icon: 'mdiKeyboard', label: t('targets.chatActionTyping'), desc: t('gridDesc.chatActionTyping') },
|
|
|
|
|
{ value: 'upload_photo', icon: 'mdiImagePlus', label: t('targets.chatActionUploadPhoto'), desc: t('gridDesc.chatActionUploadPhoto') },
|
|
|
|
|
{ value: 'upload_video', icon: 'mdiVideoPlus', label: t('targets.chatActionUploadVideo'), desc: t('gridDesc.chatActionUploadVideo') },
|
|
|
|
|
{ value: 'upload_document', icon: 'mdiFileUpload', label: t('targets.chatActionUploadDoc'), desc: t('gridDesc.chatActionUploadDoc') },
|
|
|
|
|
{ value: 'record_video', icon: 'mdiVideo', label: t('targets.chatActionRecordVideo'), desc: t('gridDesc.chatActionRecordVideo') },
|
|
|
|
|
{ value: 'record_voice', icon: 'mdiMicrophone', label: t('targets.chatActionRecordVoice'), desc: t('gridDesc.chatActionRecordVoice') },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// --- Preview target type ---
|
|
|
|
|
|
|
|
|
|
export const previewTargetTypeItems = (): GridItem[] => [
|
|
|
|
|
{ value: 'telegram', icon: 'mdiSend', label: t('targets.typeTelegram') },
|
|
|
|
|
{ value: 'webhook', icon: 'mdiWebhook', label: t('targets.typeWebhook') },
|
|
|
|
|
{ value: 'telegram', icon: 'mdiSend', label: t('targets.typeTelegram'), desc: t('gridDesc.previewTelegram') },
|
|
|
|
|
{ value: 'webhook', icon: 'mdiWebhook', label: t('targets.typeWebhook'), desc: t('gridDesc.previewWebhook') },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// --- Provider type filter (with "All" option) ---
|
|
|
|
|
|
|
|
|
|
export const providerTypeFilterItems = (): GridItem[] => [
|
|
|
|
|
{ value: '', icon: 'mdiFilterOff', label: t('common.allTypes'), desc: t('gridDesc.allEvents') },
|
|
|
|
|
{ value: 'immich', icon: 'mdiCamera', label: t('providers.typeImmich'), desc: t('gridDesc.providerImmich') },
|
|
|
|
|
{ value: 'gitea', icon: 'mdiGit', label: t('providers.typeGitea'), desc: t('gridDesc.providerGitea') },
|
|
|
|
|
{ value: 'scheduler', icon: 'mdiClockOutline', label: t('providers.typeScheduler'), desc: t('gridDesc.providerScheduler') },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// --- Provider type ---
|
|
|
|
|
|
|
|
|
|
export const providerTypeItems = (): GridItem[] => [
|
|
|
|
|
{ value: 'immich', icon: 'mdiCamera', label: t('providers.typeImmich') },
|
|
|
|
|
{ value: 'gitea', icon: 'mdiGit', label: t('providers.typeGitea') },
|
|
|
|
|
{ value: 'scheduler', icon: 'mdiClockOutline', label: t('providers.typeScheduler') },
|
|
|
|
|
{ value: 'immich', icon: 'mdiCamera', label: t('providers.typeImmich'), desc: t('gridDesc.providerImmich') },
|
|
|
|
|
{ value: 'gitea', icon: 'mdiGit', label: t('providers.typeGitea'), desc: t('gridDesc.providerGitea') },
|
|
|
|
|
{ value: 'scheduler', icon: 'mdiClockOutline', label: t('providers.typeScheduler'), desc: t('gridDesc.providerScheduler') },
|
|
|
|
|
];
|
|
|
|
|