mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-03 16:41:26 +01:00
feat(sharing,gui,cli): change public links and show folder sizes
The share dialog gets Link settings under an existing link: role, password and expiry apply at once and keep the URL. The daemon fills in the options a change keeps from the link as it stands, and refuses to keep a password it cannot read rather than dropping it. pdfs public-link update does the same from a terminal, and pdfs members shows the expiry. Details shows a folder's size and item count as Proton Drive counts it, trash included, and pdfs du prints it. Both are refused offline and for a folder that is not on Drive yet. Needs proton-drive-rs with update_public_link, get_folder_size and PublicLink::custom_password.
This commit is contained in:
1 parent
ee59e338b6
commit
4edcff3f87
21 files changed
+1824
-686
No files matched your search
@@ -25,6 +25,13 @@ scratch (user data in `staging/` and `recovery/` is never touched by this).
|
||||
`pdfs copy ~/ProtonDrive/report.pdf ~/ProtonDrive/Archive`. A folder is copied with everything
|
||||
in it, and a name already taken gets a " (1)" suffix. A file or folder with changes that have
|
||||
not synced yet is refused until they have.
|
||||
- **Change a public link without getting a new one.** In **Share…**, open **Link settings** under
|
||||
the link to switch between Viewer and Editor, set, change or remove the password, and change or
|
||||
remove the expiry. The address stays the same, so people who already have the link keep it.
|
||||
From a terminal: `pdfs public-link update PATH ID [--role] [--password | --no-password]
|
||||
[--expires EPOCH | --no-expiry]`. `pdfs members` now also shows when a link expires.
|
||||
- **Folder sizes.** **Details** shows how much a folder holds and how many items are in it, as
|
||||
Proton Drive counts it, including items in the trash. From a terminal: `pdfs du PATH`.
|
||||
|
||||
### Changed
|
||||
- **Reorganised documentation, now also on the
|
||||
|
||||
+3
-1
@@ -59,6 +59,7 @@ browser, complete it, then press Enter.
|
||||
| `pdfs rename PATH NEW_NAME` | Rename a file or folder. |
|
||||
| `pdfs move PATH... NEW_PARENT` | Move one or more files or folders into another folder. The two may be in different locations (My files, an on-demand or a mirrored synced folder); the move happens on Proton Drive, without downloading or uploading anything. |
|
||||
| `pdfs copy PATH... NEW_PARENT` | Copy one or more files or folders into another folder in My files. The copy happens on Proton Drive, without downloading or uploading anything; a name already taken gets a " (1)" suffix. Changes that have not synced yet must sync first. |
|
||||
| `pdfs du PATH` | Show how much a folder holds on Proton Drive and how many items are in it. The size includes items in the trash. |
|
||||
| `pdfs rm PATH` | Move to the Trash. |
|
||||
| `pdfs upload SOURCES... [-t FOLDER]` | Upload local files and folders (recursively) in the background. Follow with `pdfs transfers`. |
|
||||
| `pdfs refresh [TARGET] [--full]` | Forget a cached listing so the next read fetches it again. `TARGET` is a folder, `trash` or `photos`; `--full` with `photos` re-reads every photo's metadata. |
|
||||
@@ -134,10 +135,11 @@ commands are for scripts and for cases where the mount is not available.
|
||||
| Command | Description |
|
||||
|---|---|
|
||||
| `pdfs share PATH EMAILS... [--role viewer\|editor\|admin] [--message TEXT]` | Invite people to a file or folder. |
|
||||
| `pdfs members PATH` | List members, pending invitations and the public link. |
|
||||
| `pdfs members PATH` | List members, pending invitations and the public link, with the link's id and expiry. |
|
||||
| `pdfs share-role PATH ID KIND ROLE` | Change a member's or invitation's role. |
|
||||
| `pdfs unshare PATH [ID KIND]` | Stop sharing, or remove one member or invitation. |
|
||||
| `pdfs public-link create PATH [--role] [--password] [--expires EPOCH]` | Create a public link. `--expires` takes Unix seconds. |
|
||||
| `pdfs public-link update PATH ID [--role] [--password TEXT \| --no-password] [--expires EPOCH \| --no-expiry]` | Change a public link's role, password or expiry. The URL stays the same, and an option you leave out is kept. |
|
||||
| `pdfs public-link remove PATH ID` | Remove a public link. |
|
||||
| `pdfs shared` | List what you share. |
|
||||
| `pdfs shared-with-me [UID]` | List what others share with you, or the contents of one shared folder. |
|
||||
|
||||
+2
-1
@@ -59,7 +59,8 @@ folder off instead.
|
||||
The **My files** page shows the same files without going through the folder. It has a grid and
|
||||
a list view, sorting, thumbnails (including camera RAW previews), multi-select, and drag and drop
|
||||
to upload. **Details** (Alt+Enter) shows the size, dates, sharing and version history of the
|
||||
selected item.
|
||||
selected item. For a folder, the size and the number of items in it come from Proton Drive and
|
||||
include items in the trash; `pdfs du PATH` prints the same.
|
||||
|
||||
Right-click an item for more. **Make a Copy** copies it into the same folder, and **Copy To…**
|
||||
copies it, or a whole selection, into another folder in My files. The copy is made on Proton
|
||||
|
||||
@@ -33,6 +33,12 @@ In **Share…**, create a public link. Anyone with the link can open the item. Y
|
||||
link with a password and let it expire on a date. From a terminal, use `pdfs public-link create`
|
||||
and `pdfs public-link remove`.
|
||||
|
||||
To change a link later, open **Link settings** under it. You can switch it between Viewer and
|
||||
Editor, set, change or remove its password, and change or remove its expiry. The address stays
|
||||
the same, so everyone who has the link keeps it. From a terminal, use `pdfs public-link update`;
|
||||
`pdfs members` shows the link's id. A link made long ago by an older Proton app may not be
|
||||
changeable; remove it and create a new one instead.
|
||||
|
||||
## See what you share
|
||||
|
||||
**Shared by me** lists everything you share. Filter it by links, by people, or by expired links.
|
||||
|
||||
Reference in new issue
Block a user