feat(files): upload files with drag and drop
This commit is contained in:
@@ -43,6 +43,7 @@ import { opencodeClient } from '@/lib/opencode/client';
|
||||
import { FileTypeIcon } from '@/components/icons/FileTypeIcon';
|
||||
import { Icon } from "@/components/icon/Icon";
|
||||
import { getContextFileOpenFailureMessage, validateContextFileOpen } from '@/lib/contextFileOpenGuard';
|
||||
import { isFilesystemError } from '@/lib/api/files-errors';
|
||||
import { isBrowserClientRuntime } from '@/lib/desktop';
|
||||
import { useI18n } from '@/lib/i18n';
|
||||
|
||||
@@ -54,6 +55,40 @@ type FileNode = {
|
||||
relativePath?: string;
|
||||
};
|
||||
|
||||
type UploadConflicts = {
|
||||
directory: string;
|
||||
files: File[];
|
||||
runtimeKey: string;
|
||||
workspaceRoot: string;
|
||||
};
|
||||
|
||||
type UploadOutcome = 'uploaded' | 'conflict' | 'failed';
|
||||
|
||||
const MAX_PARALLEL_UPLOADS = 3;
|
||||
|
||||
const hasExternalFiles = (dataTransfer: DataTransfer): boolean => (
|
||||
Array.from(dataTransfer.types).includes('Files')
|
||||
);
|
||||
|
||||
const getExternalFiles = (dataTransfer: DataTransfer): File[] => {
|
||||
const items = Array.from(dataTransfer.items);
|
||||
if (items.length === 0) return Array.from(dataTransfer.files);
|
||||
|
||||
return items.flatMap((item) => {
|
||||
if (item.kind !== 'file' || item.webkitGetAsEntry()?.isDirectory) return [];
|
||||
const file = item.getAsFile();
|
||||
return file ? [file] : [];
|
||||
});
|
||||
};
|
||||
|
||||
const getUploadName = (file: File): string | null => {
|
||||
const name = file.name;
|
||||
if (!name || name === '.' || name === '..' || name.includes('/') || name.includes('\\')) {
|
||||
return null;
|
||||
}
|
||||
return name;
|
||||
};
|
||||
|
||||
const sortNodes = (items: FileNode[]) =>
|
||||
items.slice().sort((a, b) => {
|
||||
if (a.type !== b.type) {
|
||||
@@ -93,6 +128,22 @@ const getRelativePath = (root: string, path: string): string => {
|
||||
return normalizedPath.slice(normalizedRoot.length + 1);
|
||||
};
|
||||
|
||||
const getDropTargetLabel = (root: string, target: string): string => {
|
||||
const relativePath = getRelativePath(root, target);
|
||||
if (relativePath !== '.') return relativePath;
|
||||
|
||||
const normalizedRoot = normalizePath(root);
|
||||
return normalizedRoot.split('/').filter(Boolean).pop() ?? normalizedRoot;
|
||||
};
|
||||
|
||||
const getParentPath = (value: string): string => {
|
||||
const normalized = normalizePath(value);
|
||||
const separatorIndex = normalized.lastIndexOf('/');
|
||||
if (separatorIndex < 0) return '';
|
||||
if (separatorIndex === 0) return '/';
|
||||
return normalized.slice(0, separatorIndex);
|
||||
};
|
||||
|
||||
const isAbsolutePath = (value: string): boolean => {
|
||||
return value.startsWith('/') || value.startsWith('//') || /^[A-Za-z]:\//.test(value);
|
||||
};
|
||||
@@ -194,6 +245,8 @@ interface FileRowProps {
|
||||
isBrowserClient: boolean;
|
||||
status?: FileStatus | null;
|
||||
badge?: { modified: number; added: number } | null;
|
||||
isDropTarget: boolean;
|
||||
canUpload: boolean;
|
||||
permissions: {
|
||||
canRename: boolean;
|
||||
canCreateFile: boolean;
|
||||
@@ -206,6 +259,8 @@ interface FileRowProps {
|
||||
onToggle: (path: string) => void;
|
||||
onRevealPath: (path: string) => void;
|
||||
onOpenDialog: (type: 'createFile' | 'createFolder' | 'rename' | 'delete', data: { path: string; name?: string; type?: 'file' | 'directory' }) => void;
|
||||
onSetDropTarget: (path: string | null) => void;
|
||||
onDropFiles: (directory: string, dataTransfer: DataTransfer) => void;
|
||||
}
|
||||
|
||||
const FileRow: React.FC<FileRowProps> = ({
|
||||
@@ -216,15 +271,20 @@ const FileRow: React.FC<FileRowProps> = ({
|
||||
isBrowserClient,
|
||||
status,
|
||||
badge,
|
||||
isDropTarget,
|
||||
canUpload,
|
||||
permissions,
|
||||
downloadFile,
|
||||
onSelect,
|
||||
onToggle,
|
||||
onRevealPath,
|
||||
onOpenDialog,
|
||||
onSetDropTarget,
|
||||
onDropFiles,
|
||||
}) => {
|
||||
const { t } = useI18n();
|
||||
const isDir = node.type === 'directory';
|
||||
const uploadDirectory = isDir ? node.path : getParentPath(node.path);
|
||||
const { canRename, canCreateFile, canCreateFolder, canDelete, canReveal } = permissions;
|
||||
const canDownload = !isDir && Boolean(downloadFile);
|
||||
const canRevealPath = canReveal && !isBrowserClient;
|
||||
@@ -333,9 +393,40 @@ const FileRow: React.FC<FileRowProps> = ({
|
||||
e.dataTransfer.effectAllowed = 'copy';
|
||||
}, [node.path, root]);
|
||||
|
||||
const handleExternalDragOver = React.useCallback((event: React.DragEvent) => {
|
||||
if (!canUpload || !uploadDirectory || !hasExternalFiles(event.dataTransfer)) return;
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
event.dataTransfer.dropEffect = 'copy';
|
||||
onSetDropTarget(uploadDirectory);
|
||||
}, [canUpload, onSetDropTarget, uploadDirectory]);
|
||||
|
||||
const handleExternalDragLeave = React.useCallback((event: React.DragEvent) => {
|
||||
if (!canUpload || !uploadDirectory || !hasExternalFiles(event.dataTransfer)) return;
|
||||
if (event.relatedTarget instanceof Node && event.currentTarget.contains(event.relatedTarget)) return;
|
||||
event.stopPropagation();
|
||||
onSetDropTarget(null);
|
||||
}, [canUpload, onSetDropTarget, uploadDirectory]);
|
||||
|
||||
const handleExternalDrop = React.useCallback((event: React.DragEvent) => {
|
||||
if (!canUpload || !uploadDirectory || !hasExternalFiles(event.dataTransfer)) return;
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
onDropFiles(uploadDirectory, event.dataTransfer);
|
||||
}, [canUpload, onDropFiles, uploadDirectory]);
|
||||
|
||||
return (
|
||||
<ContextMenu open={rightClickOpen} onOpenChange={setRightClickOpen}>
|
||||
<ContextMenuTrigger render={<div className="group relative flex items-center" onContextMenu={handleContextMenu} />}>
|
||||
<ContextMenuTrigger render={(
|
||||
<div
|
||||
className="group relative flex items-center"
|
||||
onContextMenu={handleContextMenu}
|
||||
onDragEnter={handleExternalDragOver}
|
||||
onDragOver={handleExternalDragOver}
|
||||
onDragLeave={handleExternalDragLeave}
|
||||
onDrop={handleExternalDrop}
|
||||
/>
|
||||
)}>
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleInteraction}
|
||||
@@ -344,7 +435,9 @@ const FileRow: React.FC<FileRowProps> = ({
|
||||
onDragStart={handleDragStart}
|
||||
className={cn(
|
||||
'flex w-full items-center gap-1.5 rounded-md px-2 py-1 text-left text-foreground transition-colors pr-8 select-none',
|
||||
isActive ? 'bg-interactive-selection/70' : 'hover:bg-interactive-hover/40',
|
||||
isDropTarget
|
||||
? 'bg-interactive-selection ring-2 ring-inset ring-primary'
|
||||
: (isActive ? 'bg-interactive-selection/70' : 'hover:bg-interactive-hover/40'),
|
||||
'cursor-grab active:cursor-grabbing'
|
||||
)}
|
||||
>
|
||||
@@ -415,12 +508,16 @@ const areFileRowPropsEqual = (prev: FileRowProps, next: FileRowProps): boolean =
|
||||
&& prev.isBrowserClient === next.isBrowserClient
|
||||
&& prev.status === next.status
|
||||
&& prev.badge === next.badge
|
||||
&& prev.isDropTarget === next.isDropTarget
|
||||
&& prev.canUpload === next.canUpload
|
||||
&& prev.permissions === next.permissions
|
||||
&& prev.downloadFile === next.downloadFile
|
||||
&& prev.onSelect === next.onSelect
|
||||
&& prev.onToggle === next.onToggle
|
||||
&& prev.onRevealPath === next.onRevealPath
|
||||
&& prev.onOpenDialog === next.onOpenDialog
|
||||
&& prev.onSetDropTarget === next.onSetDropTarget
|
||||
&& prev.onDropFiles === next.onDropFiles
|
||||
);
|
||||
|
||||
const MemoizedFileRow = React.memo(FileRow, areFileRowPropsEqual);
|
||||
@@ -444,6 +541,12 @@ export const SidebarFilesTree: React.FC = () => {
|
||||
const searchInputRef = React.useRef<HTMLInputElement>(null);
|
||||
const [searchResults, setSearchResults] = React.useState<FileNode[]>([]);
|
||||
const [searching, setSearching] = React.useState(false);
|
||||
const [dropTarget, setDropTarget] = React.useState<string | null>(null);
|
||||
const [isUploading, setIsUploading] = React.useState(false);
|
||||
const [uploadConflicts, setUploadConflicts] = React.useState<UploadConflicts | null>(null);
|
||||
const uploadingRef = React.useRef(false);
|
||||
const rootRef = React.useRef(root);
|
||||
rootRef.current = root;
|
||||
|
||||
const [childrenByDir, setChildrenByDir] = React.useState<Record<string, FileNode[]>>({});
|
||||
const [loadErrorsByDir, setLoadErrorsByDir] = React.useState<Record<string, string>>({});
|
||||
@@ -457,6 +560,8 @@ export const SidebarFilesTree: React.FC = () => {
|
||||
// combining the two means the tree re-paints with cached data instead
|
||||
// of blanking out and re-listing every directory.
|
||||
React.useEffect(() => {
|
||||
setDropTarget(null);
|
||||
setUploadConflicts(null);
|
||||
if (!root) {
|
||||
setChildrenByDir({});
|
||||
setLoadErrorsByDir({});
|
||||
@@ -544,6 +649,7 @@ export const SidebarFilesTree: React.FC = () => {
|
||||
const canRename = Boolean(files.rename);
|
||||
const canDelete = Boolean(files.delete);
|
||||
const canReveal = Boolean(files.revealPath);
|
||||
const canUpload = Boolean(files.uploadFile);
|
||||
|
||||
const fileRowPermissions = React.useMemo(
|
||||
() => ({ canRename, canCreateFile, canCreateFolder, canDelete, canReveal }),
|
||||
@@ -897,6 +1003,101 @@ export const SidebarFilesTree: React.FC = () => {
|
||||
}
|
||||
}, [loadDirectory, root, toggleExpandedPath]);
|
||||
|
||||
const uploadDroppedFiles = React.useCallback(async (
|
||||
directory: string,
|
||||
droppedFiles: File[],
|
||||
overwrite = false,
|
||||
) => {
|
||||
const uploadFile = files.uploadFile;
|
||||
if (!uploadFile || droppedFiles.length === 0 || uploadingRef.current || !root) return;
|
||||
|
||||
const operationRoot = root;
|
||||
const operationRuntime = getRuntimeKey();
|
||||
uploadingRef.current = true;
|
||||
setIsUploading(true);
|
||||
setDropTarget(directory);
|
||||
if (overwrite) setUploadConflicts(null);
|
||||
|
||||
const outcomes: UploadOutcome[] = [];
|
||||
for (let index = 0; index < droppedFiles.length; index += MAX_PARALLEL_UPLOADS) {
|
||||
const batch = droppedFiles.slice(index, index + MAX_PARALLEL_UPLOADS);
|
||||
const batchOutcomes = await Promise.all(batch.map(async (file): Promise<UploadOutcome> => {
|
||||
const name = getUploadName(file);
|
||||
if (!name || getRuntimeKey() !== operationRuntime) return 'failed';
|
||||
|
||||
try {
|
||||
const result = await uploadFile(normalizePath(`${directory}/${name}`), file, {
|
||||
directory: operationRoot,
|
||||
overwrite,
|
||||
});
|
||||
return result.success ? 'uploaded' : 'failed';
|
||||
} catch (error) {
|
||||
if (!overwrite && isFilesystemError(error) && error.reason === 'already-exists') {
|
||||
return 'conflict';
|
||||
}
|
||||
return 'failed';
|
||||
}
|
||||
}));
|
||||
outcomes.push(...batchOutcomes);
|
||||
}
|
||||
|
||||
const uploadedCount = outcomes.filter((outcome) => outcome === 'uploaded').length;
|
||||
const failedCount = outcomes.filter((outcome) => outcome === 'failed').length;
|
||||
const conflictingFiles = droppedFiles.filter((_, index) => outcomes[index] === 'conflict');
|
||||
const isCurrentDestination = rootRef.current === operationRoot && getRuntimeKey() === operationRuntime;
|
||||
|
||||
try {
|
||||
if (uploadedCount > 0 && isCurrentDestination) {
|
||||
await refreshDirectory(directory);
|
||||
}
|
||||
if (uploadedCount > 0) {
|
||||
toast.success(t(conflictingFiles.length > 0
|
||||
? 'sidebarFilesTree.toast.uploadedWithoutConflicts'
|
||||
: 'sidebarFilesTree.toast.uploaded'));
|
||||
}
|
||||
if (failedCount > 0) {
|
||||
toast.error(t('sidebarFilesTree.toast.uploadFailed'));
|
||||
}
|
||||
if (conflictingFiles.length > 0 && isCurrentDestination) {
|
||||
setUploadConflicts({
|
||||
directory,
|
||||
files: conflictingFiles,
|
||||
runtimeKey: operationRuntime,
|
||||
workspaceRoot: operationRoot,
|
||||
});
|
||||
}
|
||||
} finally {
|
||||
uploadingRef.current = false;
|
||||
setIsUploading(false);
|
||||
setDropTarget(null);
|
||||
}
|
||||
}, [files.uploadFile, refreshDirectory, root, t]);
|
||||
|
||||
const handleDropFiles = React.useCallback((directory: string, dataTransfer: DataTransfer) => {
|
||||
const droppedFiles = getExternalFiles(dataTransfer);
|
||||
if (droppedFiles.length === 0) return;
|
||||
void uploadDroppedFiles(directory, droppedFiles);
|
||||
}, [uploadDroppedFiles]);
|
||||
|
||||
const handleRootDragOver = React.useCallback((event: React.DragEvent) => {
|
||||
if (!canUpload || uploadingRef.current || !root || !hasExternalFiles(event.dataTransfer)) return;
|
||||
event.preventDefault();
|
||||
event.dataTransfer.dropEffect = 'copy';
|
||||
setDropTarget(root);
|
||||
}, [canUpload, root]);
|
||||
|
||||
const handleRootDragLeave = React.useCallback((event: React.DragEvent) => {
|
||||
if (!hasExternalFiles(event.dataTransfer)) return;
|
||||
if (event.relatedTarget instanceof Node && event.currentTarget.contains(event.relatedTarget)) return;
|
||||
setDropTarget(null);
|
||||
}, []);
|
||||
|
||||
const handleRootDrop = React.useCallback((event: React.DragEvent) => {
|
||||
if (!canUpload || uploadingRef.current || !root || !hasExternalFiles(event.dataTransfer)) return;
|
||||
event.preventDefault();
|
||||
handleDropFiles(root, event.dataTransfer);
|
||||
}, [canUpload, handleDropFiles, root]);
|
||||
|
||||
// --- Dialog submit (matching FilesView) ---
|
||||
|
||||
const handleDialogSubmit = React.useCallback(async (e?: React.FormEvent) => {
|
||||
@@ -1056,12 +1257,16 @@ export const SidebarFilesTree: React.FC = () => {
|
||||
isBrowserClient={isBrowserClient}
|
||||
status={!isDir ? getFileStatus(node.path) : undefined}
|
||||
badge={isDir ? getFolderBadge(node.path) : undefined}
|
||||
isDropTarget={isDir && dropTarget === node.path}
|
||||
canUpload={canUpload && !isUploading}
|
||||
permissions={fileRowPermissions}
|
||||
downloadFile={files.downloadFile}
|
||||
onSelect={handleOpenFile}
|
||||
onToggle={toggleDirectory}
|
||||
onRevealPath={handleRevealPath}
|
||||
onOpenDialog={handleOpenDialog}
|
||||
onSetDropTarget={setDropTarget}
|
||||
onDropFiles={handleDropFiles}
|
||||
/>
|
||||
{isDir && isExpanded && (
|
||||
<ul className="flex flex-col gap-1 ml-3 pl-3 border-l border-border/40 relative">
|
||||
@@ -1084,6 +1289,7 @@ export const SidebarFilesTree: React.FC = () => {
|
||||
|
||||
const hasTree = Boolean(root && childrenByDir[root]);
|
||||
const rootLoadError = root ? loadErrorsByDir[root] : null;
|
||||
const dropTargetLabel = dropTarget ? getDropTargetLabel(root, dropTarget) : '';
|
||||
|
||||
return (
|
||||
<section className="flex h-full min-h-0 flex-col overflow-hidden">
|
||||
@@ -1182,7 +1388,15 @@ export const SidebarFilesTree: React.FC = () => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ScrollableOverlay outerClassName="flex-1 min-h-0" className="p-2">
|
||||
<div className="relative flex-1 min-h-0">
|
||||
<ScrollableOverlay
|
||||
outerClassName="h-full min-h-0"
|
||||
className={cn('p-2', dropTarget === root && 'bg-interactive-selection/10')}
|
||||
onDragEnter={handleRootDragOver}
|
||||
onDragOver={handleRootDragOver}
|
||||
onDragLeave={handleRootDragLeave}
|
||||
onDrop={handleRootDrop}
|
||||
>
|
||||
<ul className="flex flex-col">
|
||||
{searching ? (
|
||||
<li className="flex items-center gap-1.5 px-2 py-1 typography-meta text-muted-foreground">
|
||||
@@ -1235,7 +1449,52 @@ export const SidebarFilesTree: React.FC = () => {
|
||||
<li className="px-2 py-1 typography-meta text-muted-foreground">{t('sidebarFilesTree.state.loading')}</li>
|
||||
)}
|
||||
</ul>
|
||||
</ScrollableOverlay>
|
||||
</ScrollableOverlay>
|
||||
{dropTarget ? (
|
||||
<div className="pointer-events-none absolute left-2 right-2 top-2 z-50 flex items-center gap-2 rounded-md border border-primary bg-background/95 px-2 py-1.5 shadow-sm">
|
||||
<Icon name={isUploading ? 'loader-4' : 'folder-received'} className={cn('size-4 flex-shrink-0', isUploading && 'animate-spin')} />
|
||||
<span className="min-w-0 truncate typography-meta" title={dropTargetLabel}>
|
||||
{t(isUploading ? 'sidebarFilesTree.drop.uploading' : 'sidebarFilesTree.drop.target', { path: dropTargetLabel })}
|
||||
</span>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
<Dialog open={Boolean(uploadConflicts)} onOpenChange={(open: boolean) => !open && setUploadConflicts(null)}>
|
||||
<DialogContent>
|
||||
<DialogHeader>
|
||||
<DialogTitle>{t('sidebarFilesTree.dialog.uploadConflicts.title')}</DialogTitle>
|
||||
<DialogDescription>
|
||||
{t('sidebarFilesTree.dialog.uploadConflicts.description', { path: uploadConflicts?.directory ?? '' })}
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
<ScrollableOverlay outerClassName="max-h-52" className="flex flex-col gap-1 pr-2">
|
||||
{uploadConflicts?.files.map((file, index) => (
|
||||
<div key={`${file.name}-${file.size}-${index}`} className="truncate rounded-md bg-muted px-2 py-1 typography-meta" title={file.name}>
|
||||
{file.name}
|
||||
</div>
|
||||
))}
|
||||
</ScrollableOverlay>
|
||||
<DialogFooter>
|
||||
<Button variant="outline" onClick={() => setUploadConflicts(null)} disabled={isUploading}>
|
||||
{t('sidebarFilesTree.dialog.cancel')}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
if (!uploadConflicts) return;
|
||||
if (uploadConflicts.runtimeKey !== getRuntimeKey() || uploadConflicts.workspaceRoot !== root) {
|
||||
setUploadConflicts(null);
|
||||
return;
|
||||
}
|
||||
void uploadDroppedFiles(uploadConflicts.directory, uploadConflicts.files, true);
|
||||
}}
|
||||
disabled={isUploading}
|
||||
>
|
||||
{t('sidebarFilesTree.dialog.uploadConflicts.replace')}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
||||
{/* CRUD dialogs (matching FilesView) */}
|
||||
<Dialog open={!!activeDialog} onOpenChange={(open) => !open && setActiveDialog(null)}>
|
||||
|
||||
@@ -25,4 +25,9 @@ describe('FilesystemError', () => {
|
||||
expect(parseFilesystemErrorReason('made-up')).toBe('unknown');
|
||||
expect(parseFilesystemErrorReason(undefined)).toBe('unknown');
|
||||
});
|
||||
|
||||
test('recognizes filesystem errors created across runtime boundaries', () => {
|
||||
expect(isFilesystemError({ reason: 'already-exists' })).toBe(true);
|
||||
expect(isFilesystemError({ reason: 409 })).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export type FilesystemErrorReason =
|
||||
| 'os-permission'
|
||||
| 'already-exists'
|
||||
| 'not-found'
|
||||
| 'not-directory'
|
||||
| 'invalid-response'
|
||||
@@ -30,6 +31,7 @@ export const isFilesystemError = (error: unknown): error is FilesystemError => (
|
||||
export const parseFilesystemErrorReason = (value: unknown): FilesystemErrorReason => {
|
||||
switch (value) {
|
||||
case 'os-permission':
|
||||
case 'already-exists':
|
||||
case 'not-found':
|
||||
case 'not-directory':
|
||||
case 'invalid-response':
|
||||
|
||||
@@ -606,6 +606,7 @@ export interface FilesAPI {
|
||||
readFile?(path: string, options?: FileReadOptions): Promise<{ content: string; path: string }>;
|
||||
readFileBinary?(path: string, options?: FileReadOptions): Promise<{ dataUrl: string; path: string }>;
|
||||
writeFile?(path: string, content: string): Promise<{ success: boolean; path: string }>;
|
||||
uploadFile?(path: string, file: Blob, options?: { overwrite?: boolean; directory?: string }): Promise<{ success: boolean; path: string }>;
|
||||
delete?(path: string): Promise<{ success: boolean }>;
|
||||
rename?(oldPath: string, newPath: string): Promise<{ success: boolean; path: string }>;
|
||||
revealPath?(path: string): Promise<{ success: boolean }>;
|
||||
|
||||
@@ -1172,6 +1172,14 @@ export const dict = {
|
||||
'sidebarFilesTree.toast.writeNotSupported': 'Schreiben nicht unterstützt',
|
||||
'sidebarFilesTree.toast.fileCreated': 'Datei erstellt',
|
||||
'sidebarFilesTree.toast.operationFailed': 'Operation fehlgeschlagen',
|
||||
'sidebarFilesTree.toast.uploaded': 'Dateien hochgeladen',
|
||||
'sidebarFilesTree.toast.uploadedWithoutConflicts': 'Dateien ohne Konflikte wurden hochgeladen',
|
||||
'sidebarFilesTree.toast.uploadFailed': 'Einige Dateien konnten nicht hochgeladen werden',
|
||||
'sidebarFilesTree.drop.target': 'In {path} hochladen',
|
||||
'sidebarFilesTree.drop.uploading': 'Dateien werden in {path} hochgeladen',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.title': 'Vorhandene Dateien ersetzen?',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.description': 'Dateien mit diesen Namen sind in {path} bereits vorhanden. Das Ersetzen kann nicht rückgängig gemacht werden.',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.replace': 'Ersetzen',
|
||||
'sidebarFilesTree.toast.folderNameRequired': 'Ordnername ist erforderlich',
|
||||
'sidebarFilesTree.toast.folderCreated': 'Ordner erstellt',
|
||||
'sidebarFilesTree.toast.nameRequired': 'Name ist erforderlich',
|
||||
|
||||
@@ -1322,6 +1322,14 @@ export const dict = {
|
||||
'sidebarFilesTree.toast.writeNotSupported': 'Write not supported',
|
||||
'sidebarFilesTree.toast.fileCreated': 'File created',
|
||||
'sidebarFilesTree.toast.operationFailed': 'Operation failed',
|
||||
'sidebarFilesTree.toast.uploaded': 'Files uploaded',
|
||||
'sidebarFilesTree.toast.uploadedWithoutConflicts': 'Files without conflicts were uploaded',
|
||||
'sidebarFilesTree.toast.uploadFailed': 'Some files could not be uploaded',
|
||||
'sidebarFilesTree.drop.target': 'Upload to {path}',
|
||||
'sidebarFilesTree.drop.uploading': 'Uploading files to {path}',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.title': 'Replace existing files?',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.description': 'Files with these names already exist in {path}. Replacing them cannot be undone.',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.replace': 'Replace',
|
||||
'sidebarFilesTree.toast.folderNameRequired': 'Folder name is required',
|
||||
'sidebarFilesTree.toast.folderCreated': 'Folder created',
|
||||
'sidebarFilesTree.toast.nameRequired': 'Name is required',
|
||||
|
||||
@@ -1288,6 +1288,14 @@ export const dict: Record<I18nKey, string> = {
|
||||
"sidebarFilesTree.toast.writeNotSupported": "La escritura no es compatible",
|
||||
"sidebarFilesTree.toast.fileCreated": "Archivo creado",
|
||||
"sidebarFilesTree.toast.operationFailed": "No se pudo completar la operación",
|
||||
"sidebarFilesTree.toast.uploaded": "Archivos subidos",
|
||||
"sidebarFilesTree.toast.uploadedWithoutConflicts": "Se subieron los archivos sin conflictos",
|
||||
"sidebarFilesTree.toast.uploadFailed": "No se pudieron subir algunos archivos",
|
||||
"sidebarFilesTree.drop.target": "Subir a {path}",
|
||||
"sidebarFilesTree.drop.uploading": "Subiendo archivos a {path}",
|
||||
"sidebarFilesTree.dialog.uploadConflicts.title": "¿Reemplazar los archivos existentes?",
|
||||
"sidebarFilesTree.dialog.uploadConflicts.description": "Ya existen archivos con estos nombres en {path}. El reemplazo no se puede deshacer.",
|
||||
"sidebarFilesTree.dialog.uploadConflicts.replace": "Reemplazar",
|
||||
"sidebarFilesTree.toast.folderNameRequired": "El nombre de carpeta es obligatorio",
|
||||
"sidebarFilesTree.toast.folderCreated": "Carpeta creada",
|
||||
"sidebarFilesTree.toast.nameRequired": "El nombre es obligatorio",
|
||||
|
||||
@@ -1089,6 +1089,14 @@ export const dict = {
|
||||
'sidebarFilesTree.toast.writeNotSupported': 'Écriture non prise en charge',
|
||||
'sidebarFilesTree.toast.fileCreated': 'Fichier créé',
|
||||
'sidebarFilesTree.toast.operationFailed': 'L\'opération a échoué',
|
||||
'sidebarFilesTree.toast.uploaded': 'Fichiers téléversés',
|
||||
'sidebarFilesTree.toast.uploadedWithoutConflicts': 'Les fichiers sans conflit ont été téléversés',
|
||||
'sidebarFilesTree.toast.uploadFailed': 'Certains fichiers n’ont pas pu être téléversés',
|
||||
'sidebarFilesTree.drop.target': 'Téléverser dans {path}',
|
||||
'sidebarFilesTree.drop.uploading': 'Téléversement des fichiers dans {path}',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.title': 'Remplacer les fichiers existants ?',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.description': 'Des fichiers portant ces noms existent déjà dans {path}. Leur remplacement est irréversible.',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.replace': 'Remplacer',
|
||||
'sidebarFilesTree.toast.folderNameRequired': 'Le nom du dossier est requis',
|
||||
'sidebarFilesTree.toast.folderCreated': 'Dossier créé',
|
||||
'sidebarFilesTree.toast.nameRequired': 'Le nom est requis',
|
||||
|
||||
@@ -1318,6 +1318,14 @@ export const dict: Record<I18nKey, string> = {
|
||||
'sidebarFilesTree.toast.writeNotSupported': '書き込みはサポートされていません',
|
||||
'sidebarFilesTree.toast.fileCreated': 'ファイルを作成しました',
|
||||
'sidebarFilesTree.toast.operationFailed': '操作に失敗しました',
|
||||
'sidebarFilesTree.toast.uploaded': 'ファイルをアップロードしました',
|
||||
'sidebarFilesTree.toast.uploadedWithoutConflicts': '競合のないファイルをアップロードしました',
|
||||
'sidebarFilesTree.toast.uploadFailed': '一部のファイルをアップロードできませんでした',
|
||||
'sidebarFilesTree.drop.target': '{path} にアップロード',
|
||||
'sidebarFilesTree.drop.uploading': '{path} にファイルをアップロードしています',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.title': '既存のファイルを置き換えますか?',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.description': '同じ名前のファイルが {path} に既に存在します。置き換えは元に戻せません。',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.replace': '置き換える',
|
||||
'sidebarFilesTree.toast.folderNameRequired': 'フォルダ名が必要です',
|
||||
'sidebarFilesTree.toast.folderCreated': 'フォルダを作成しました',
|
||||
'sidebarFilesTree.toast.nameRequired': '名前が必要です',
|
||||
|
||||
@@ -1324,6 +1324,14 @@ export const dict: Record<I18nKey, string> = {
|
||||
'sidebarFilesTree.toast.writeNotSupported': '쓰기를 지원하지 않음',
|
||||
'sidebarFilesTree.toast.fileCreated': '파일 생성됨',
|
||||
'sidebarFilesTree.toast.operationFailed': '작업 실패',
|
||||
'sidebarFilesTree.toast.uploaded': '파일을 업로드했습니다',
|
||||
'sidebarFilesTree.toast.uploadedWithoutConflicts': '충돌하지 않은 파일을 업로드했습니다',
|
||||
'sidebarFilesTree.toast.uploadFailed': '일부 파일을 업로드하지 못했습니다',
|
||||
'sidebarFilesTree.drop.target': '{path}에 업로드',
|
||||
'sidebarFilesTree.drop.uploading': '{path}에 파일 업로드 중',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.title': '기존 파일을 교체할까요?',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.description': '같은 이름의 파일이 {path}에 이미 있습니다. 교체 작업은 취소할 수 없습니다.',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.replace': '교체',
|
||||
'sidebarFilesTree.toast.folderNameRequired': '폴더 이름 필수',
|
||||
'sidebarFilesTree.toast.folderCreated': '폴더 생성됨',
|
||||
'sidebarFilesTree.toast.nameRequired': '이름 필수',
|
||||
|
||||
@@ -2845,6 +2845,14 @@ export const dict: Record<I18nKey, string> = {
|
||||
'sidebarFilesTree.toast.folderNameRequired': 'Nazwa folderu jest wymagana',
|
||||
'sidebarFilesTree.toast.nameRequired': 'Nazwa jest wymagana',
|
||||
'sidebarFilesTree.toast.operationFailed': 'Operacja nie powiodła się',
|
||||
'sidebarFilesTree.toast.uploaded': 'Pliki przesłano',
|
||||
'sidebarFilesTree.toast.uploadedWithoutConflicts': 'Przesłano pliki bez konfliktów',
|
||||
'sidebarFilesTree.toast.uploadFailed': 'Nie udało się przesłać niektórych plików',
|
||||
'sidebarFilesTree.drop.target': 'Prześlij do {path}',
|
||||
'sidebarFilesTree.drop.uploading': 'Przesyłanie plików do {path}',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.title': 'Zastąpić istniejące pliki?',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.description': 'Pliki o tych nazwach już istnieją w {path}. Zastąpienia nie można cofnąć.',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.replace': 'Zastąp',
|
||||
'sidebarFilesTree.toast.pathCopied': 'Ścieżka skopiowana',
|
||||
'sidebarFilesTree.toast.renameNotSupported': 'Zmiana nazwy nie jest obsługiwana',
|
||||
'sidebarFilesTree.toast.renamedSuccessfully': 'Zmieniono nazwę pomyślnie',
|
||||
|
||||
@@ -1288,6 +1288,14 @@ export const dict: Record<I18nKey, string> = {
|
||||
"sidebarFilesTree.toast.writeNotSupported": "A escrita não é compatível",
|
||||
"sidebarFilesTree.toast.fileCreated": "Arquivo criado",
|
||||
"sidebarFilesTree.toast.operationFailed": "Não foi possível completar a operación",
|
||||
"sidebarFilesTree.toast.uploaded": "Arquivos enviados",
|
||||
"sidebarFilesTree.toast.uploadedWithoutConflicts": "Os arquivos sem conflitos foram enviados",
|
||||
"sidebarFilesTree.toast.uploadFailed": "Não foi possível enviar alguns arquivos",
|
||||
"sidebarFilesTree.drop.target": "Enviar para {path}",
|
||||
"sidebarFilesTree.drop.uploading": "Enviando arquivos para {path}",
|
||||
"sidebarFilesTree.dialog.uploadConflicts.title": "Substituir arquivos existentes?",
|
||||
"sidebarFilesTree.dialog.uploadConflicts.description": "Já existem arquivos com esses nomes em {path}. A substituição não pode ser desfeita.",
|
||||
"sidebarFilesTree.dialog.uploadConflicts.replace": "Substituir",
|
||||
"sidebarFilesTree.toast.folderNameRequired": "O nome de pasta é obrigatório",
|
||||
"sidebarFilesTree.toast.folderCreated": "Pasta criada",
|
||||
"sidebarFilesTree.toast.nameRequired": "O nome é obrigatório",
|
||||
|
||||
@@ -1288,6 +1288,14 @@ export const dict: Record<I18nKey, string> = {
|
||||
"sidebarFilesTree.toast.writeNotSupported": "Запис не підтримується",
|
||||
"sidebarFilesTree.toast.fileCreated": "Файл створено",
|
||||
"sidebarFilesTree.toast.operationFailed": "Операція не вдалася",
|
||||
"sidebarFilesTree.toast.uploaded": "Файли завантажено",
|
||||
"sidebarFilesTree.toast.uploadedWithoutConflicts": "Файли без конфліктів завантажено",
|
||||
"sidebarFilesTree.toast.uploadFailed": "Деякі файли не вдалося завантажити",
|
||||
"sidebarFilesTree.drop.target": "Завантажити в {path}",
|
||||
"sidebarFilesTree.drop.uploading": "Завантаження файлів у {path}",
|
||||
"sidebarFilesTree.dialog.uploadConflicts.title": "Замінити наявні файли?",
|
||||
"sidebarFilesTree.dialog.uploadConflicts.description": "Файли з такими назвами вже існують у {path}. Заміну неможливо скасувати.",
|
||||
"sidebarFilesTree.dialog.uploadConflicts.replace": "Замінити",
|
||||
"sidebarFilesTree.toast.folderNameRequired": "Потрібно вказати назву папки",
|
||||
"sidebarFilesTree.toast.folderCreated": "Папку створено",
|
||||
"sidebarFilesTree.toast.nameRequired": "Потрібно вказати назву",
|
||||
|
||||
@@ -1288,6 +1288,14 @@ export const dict: Record<I18nKey, string> = {
|
||||
'sidebarFilesTree.toast.writeNotSupported': '不支持写入',
|
||||
'sidebarFilesTree.toast.fileCreated': '文件已创建',
|
||||
'sidebarFilesTree.toast.operationFailed': '操作失败',
|
||||
'sidebarFilesTree.toast.uploaded': '文件已上传',
|
||||
'sidebarFilesTree.toast.uploadedWithoutConflicts': '无冲突的文件已上传',
|
||||
'sidebarFilesTree.toast.uploadFailed': '部分文件无法上传',
|
||||
'sidebarFilesTree.drop.target': '上传到 {path}',
|
||||
'sidebarFilesTree.drop.uploading': '正在将文件上传到 {path}',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.title': '替换现有文件?',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.description': '{path} 中已存在同名文件。替换后无法撤销。',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.replace': '替换',
|
||||
'sidebarFilesTree.toast.folderNameRequired': '文件夹名不能为空',
|
||||
'sidebarFilesTree.toast.folderCreated': '文件夹已创建',
|
||||
'sidebarFilesTree.toast.nameRequired': '名称不能为空',
|
||||
|
||||
@@ -1300,6 +1300,14 @@ export const dict: Record<I18nKey, string> = {
|
||||
'sidebarFilesTree.toast.writeNotSupported': '不支援寫入',
|
||||
'sidebarFilesTree.toast.fileCreated': '檔案已建立',
|
||||
'sidebarFilesTree.toast.operationFailed': '操作失敗',
|
||||
'sidebarFilesTree.toast.uploaded': '檔案已上傳',
|
||||
'sidebarFilesTree.toast.uploadedWithoutConflicts': '無衝突的檔案已上傳',
|
||||
'sidebarFilesTree.toast.uploadFailed': '部分檔案無法上傳',
|
||||
'sidebarFilesTree.drop.target': '上傳至 {path}',
|
||||
'sidebarFilesTree.drop.uploading': '正在將檔案上傳至 {path}',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.title': '取代現有檔案?',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.description': '{path} 中已有同名檔案。取代後無法復原。',
|
||||
'sidebarFilesTree.dialog.uploadConflicts.replace': '取代',
|
||||
'sidebarFilesTree.toast.folderNameRequired': '資料夾名稱不能為空',
|
||||
'sidebarFilesTree.toast.folderCreated': '資料夾已建立',
|
||||
'sidebarFilesTree.toast.nameRequired': '名稱不能為空',
|
||||
|
||||
Reference in New Issue
Block a user