Add folder mapping status indicator to task list

Add account label to folder mapping modal

Update folder mapping logic to include destination login
This commit is contained in:
2026-07-06 19:15:30 +07:00
parent e84366eb0c
commit b076ac92d6
3 changed files with 39 additions and 3 deletions
+8 -2
View File
@@ -7,6 +7,7 @@ type Props = {
dstFolders: string[]
initialMapping: Record<string, string>
initialExcluded: string[]
accountLabel?: string
onConfirm: (mapping: Record<string, string>, excluded: string[]) => void
onCancel: () => void
}
@@ -20,7 +21,7 @@ function defaultDst(src: string, dstFolders: string[], initial: Record<string, s
}
export function FolderMappingModal({
open, srcFolders, dstFolders, initialMapping, initialExcluded, onConfirm, onCancel,
open, srcFolders, dstFolders, initialMapping, initialExcluded, accountLabel, onConfirm, onCancel,
}: Props) {
const [choice, setChoice] = useState<Record<string, string>>({})
const [synced, setSynced] = useState<Record<string, boolean>>(() => {
@@ -58,7 +59,12 @@ export function FolderMappingModal({
}
return (
<Modal open={open} title="Map folders (source → destination)" onClose={onCancel} size="lg">
<Modal
open={open}
title={accountLabel ? `Map folders — ${accountLabel}` : 'Map folders (source → destination)'}
onClose={onCancel}
size="lg"
>
<div className="map-body">
<p className="map-hint">
Route each source folder to an existing destination folder. Leaving a folder mapped to its own name