mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-11-05 08:16:22 +00:00
An upload over a name that is taken in the target folder used to add "name (1)" without a word. Every upload path (picker, drag and drop, the drop overlay, folder upload) now asks per name, with "Do this for all n conflicts" when there are several: - Replace gives the existing node the new blob, so it keeps its id, shares and links; for a folder it merges into the existing one and replaces files of the same name. - Keep both numbers the new one, as before. - Skip leaves it out; Cancel stops the whole upload. Also in Files: - A file with no preview and no office editor opens a pane with its icon, size and Download instead of downloading at once, and in the desktop app also Open in default app (the attachment Edit path). The item menu gets Open for such files, and Open in default app in the desktop app. - Enter opens the row Tab put the focus on. - After sharing with someone new, a toast offers Send a message, which opens the composer to them with a link to the file. - The empty folder's buttons read Upload files... and New folder..., as the menus do.
16 lines
589 B
TypeScript
16 lines
589 B
TypeScript
import { appPath, buildSharedFilesPath } from "@/lib/deep-links";
|
|
|
|
/**
|
|
* The link a person a file or folder was shared with opens it by. The node
|
|
* is theirs to see under "<owner account>:<node id>" (the id a drive shared
|
|
* with them is listed by); a file opens in its preview there.
|
|
*/
|
|
export function sharedNodeLink(
|
|
origin: string,
|
|
ownerAccountId: string,
|
|
node: { id: string; name: string; isDirectory: boolean },
|
|
): string {
|
|
const shared = `${ownerAccountId}:${node.id}`;
|
|
return `${origin}${appPath(buildSharedFilesPath(shared, node.isDirectory ? null : node.name))}`;
|
|
}
|