provide info for each command

Signed-off-by: FTCHD <144691102+FTCHD@users.noreply.github.com>
This commit is contained in:
FTCHD
2025-11-02 17:28:33 +01:00
parent c0c5a999b4
commit d099c164f0
9 changed files with 79 additions and 10 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ export default function CommandInfo({ content }: { content: string }) {
}
classNames={{
base: '-mx-2 bg-primary-100 rounded-b-large px-8 whitespace-pre-wrap text-primary-900',
trigger: 'pb-1.5 pt-1 !cursor-pointer',
trigger: 'pb-1.5 pt-1 !cursor-pointer !outline-none !ring-0',
title: 'text-small !cursor-pointer text-primary-700 font-light',
}}
indicator={<InfoIcon className="text-primary-800 size-3.5" />}
+7 -1
View File
@@ -30,6 +30,7 @@ import {
import { RCLONE_CONFIG_DEFAULTS } from '../../lib/rclone/constants'
import { usePersistedStore } from '../../lib/store'
import { openWindow } from '../../lib/window'
import CommandInfo from '../components/CommandInfo'
import CronEditor from '../components/CronEditor'
import OptionsSection from '../components/OptionsSection'
import { MultiPathFinder } from '../components/PathFinder'
@@ -524,7 +525,12 @@ export default function Copy() {
}
return (
<div className="flex flex-col h-screen gap-10 pt-10">
<div className="flex flex-col h-screen gap-10">
<CommandInfo
content={`Copy the source to the destination. Does not transfer files that are identical on source and destination, testing by size and modification time or MD5SUM. Doesn't delete files from the destination. If you want to also delete files from destination, to make it match source, use the SYNC command instead.
Note that it is always the contents of the directory that is synced, not the directory itself. So when source:path is a directory, it's the contents of source:path that are copied, not the directory name and contents.`}
/>
{/* Main Content */}
<div className="flex flex-col flex-1 w-full max-w-3xl gap-6 mx-auto">
{/* Paths Display */}
+8 -1
View File
@@ -24,6 +24,7 @@ import {
} from '../../lib/rclone/api'
import { RCLONE_CONFIG_DEFAULTS } from '../../lib/rclone/constants'
import { usePersistedStore } from '../../lib/store'
import CommandInfo from '../components/CommandInfo'
import CronEditor from '../components/CronEditor'
import OptionsSection from '../components/OptionsSection'
import { PathField } from '../components/PathFinder'
@@ -289,7 +290,13 @@ export default function Delete() {
})()
return (
<div className="flex flex-col h-screen gap-10 pt-10">
<div className="flex flex-col h-screen gap-10">
<CommandInfo
content={`Remove the files in path. Unlike purge it obeys include/exclude filters so can be used to selectively delete files.
Delete only deletes files but leaves the directory structure alone. If you want to delete a directory and all of its contents use the PURGE command.`}
/>
{/* Main Content */}
<div
className="flex flex-col flex-1 w-full max-w-3xl gap-6 mx-auto"
+13 -2
View File
@@ -5,6 +5,7 @@ import { message } from '@tauri-apps/plugin-dialog'
import { DownloadIcon, FoldersIcon, XIcon } from 'lucide-react'
import { useEffect, useState } from 'react'
import { startDownload } from '../../lib/rclone/api'
import CommandInfo from '../components/CommandInfo'
import { PathField } from '../components/PathFinder'
function isValidUrl(url: string) {
@@ -194,7 +195,17 @@ export default function Download() {
}, [url])
return (
<div className="flex flex-col h-screen gap-2 pt-10">
<div className="flex flex-col h-screen gap-2">
<CommandInfo
content={`Download a URL's content and copy it to the destination without saving it in temporary storage, using the copyurl command.
Supports Youtube, TikTok, SoundCloud, Google Drive, etc. as well as regular URLs.
If you can't get Download to work then make sure the site works with curl directly.`}
/>
<div className="w-full h-5" />
{/* Main Content */}
<div className="flex flex-col flex-1 w-full max-w-3xl gap-4 mx-auto">
<Input
@@ -267,7 +278,7 @@ export default function Download() {
muted={true}
// controls={true}
src={downloadData.url}
className="object-contain w-full h-64"
className="object-contain w-full h-64 mx-10 overflow-hidden rounded-large"
/>
)}
+10 -1
View File
@@ -29,6 +29,7 @@ import { dialogGetMountPlugin } from '../../lib/rclone/mount'
import { needsMountPlugin } from '../../lib/rclone/mount'
import { usePersistedStore } from '../../lib/store'
import { triggerTrayRebuild } from '../../lib/tray'
import CommandInfo from '../components/CommandInfo'
import OptionsSection from '../components/OptionsSection'
import { PathFinder } from '../components/PathFinder'
@@ -263,7 +264,15 @@ export default function Mount() {
})()
return (
<div className="flex flex-col h-screen gap-10 pt-10">
<div className="flex flex-col h-screen gap-10">
<CommandInfo
content={`Mount allows Linux, FreeBSD, macOS and Windows users to mount any of rclone's cloud storage systems as a file system with FUSE.
On Linux/macOS/FreeBSD the mount point must be a empty directory.
On Windows, when mounting as a fixed disk drive you can either mount to an unused drive letter, or to a path representing a nonexistent subdirectory of an existing parent directory or drive. Using the special value "*" in the Destination field will tell rclone to automatically assign the next available drive letter, starting with Z: and moving backward.`}
/>
{/* Main Content */}
<div className="flex flex-col flex-1 w-full max-w-3xl gap-6 mx-auto">
{/* Paths Display */}
+10 -1
View File
@@ -31,6 +31,7 @@ import {
import { RCLONE_CONFIG_DEFAULTS } from '../../lib/rclone/constants'
import { usePersistedStore } from '../../lib/store'
import { openWindow } from '../../lib/window'
import CommandInfo from '../components/CommandInfo'
import CronEditor from '../components/CronEditor'
import OptionsSection from '../components/OptionsSection'
import { MultiPathFinder } from '../components/PathFinder'
@@ -535,7 +536,15 @@ export default function Move() {
})()
return (
<div className="flex flex-col h-screen gap-10 pt-10">
<div className="flex flex-col h-screen gap-10">
<CommandInfo
content={`Moves the contents of the source directory to the destination directory. Rclone will error if the source and destination overlap and the remote does not support a server-side directory move operation.
Can also be used to move a single file to a different remote.
Rclone will sync the modification times of files and directories if the backend supports it.`}
/>
{/* Main Content */}
<div className="flex flex-col flex-1 w-full max-w-3xl gap-6 mx-auto">
{/* Paths Display */}
+7 -1
View File
@@ -22,6 +22,7 @@ import {
} from '../../lib/rclone/api'
import { RCLONE_CONFIG_DEFAULTS } from '../../lib/rclone/constants'
import { usePersistedStore } from '../../lib/store'
import CommandInfo from '../components/CommandInfo'
import CronEditor from '../components/CronEditor'
import OptionsSection from '../components/OptionsSection'
import { PathField } from '../components/PathFinder'
@@ -249,7 +250,12 @@ export default function Purge() {
})()
return (
<div className="flex flex-col h-screen gap-10 pt-10">
<div className="flex flex-col h-screen gap-10">
<CommandInfo
content={`Remove the path and all of its contents.
Note that this does not obey include/exclude filters — everything will be removed.`}
/>
{/* Main Content */}
<div className="flex flex-col flex-1 w-full max-w-3xl gap-6 mx-auto">
{/* Path Display */}
+7 -1
View File
@@ -22,6 +22,7 @@ import { RCLONE_VFS_DEFAULTS } from '../../lib/rclone/constants'
import { usePersistedStore, useStore } from '../../lib/store'
import { triggerTrayRebuild } from '../../lib/tray'
import type { FlagValue } from '../../types/rclone'
import CommandInfo from '../components/CommandInfo'
import OptionsSection from '../components/OptionsSection'
const SERVE_TYPES = ['dlna', 'ftp', 'sftp', 'http', 'nfs', 'restic', 's3', 'webdav'] as const
@@ -174,7 +175,12 @@ export default function Serve() {
console.log('type', type)
return (
<div className="flex flex-col h-screen gap-10 pt-10">
<div className="flex flex-col h-screen gap-10">
<CommandInfo
content={
'Serve allows you to serve the contents of a remote as a file server of a specific protocol/type.'
}
/>
<div className="flex flex-col flex-1 w-full max-w-3xl gap-6 mx-auto">
<Select
selectedKeys={remote ? [remote] : []}
+16 -1
View File
@@ -30,6 +30,7 @@ import {
import { RCLONE_CONFIG_DEFAULTS } from '../../lib/rclone/constants'
import { usePersistedStore } from '../../lib/store'
import { openWindow } from '../../lib/window'
import CommandInfo from '../components/CommandInfo'
import CronEditor from '../components/CronEditor'
import OptionsSection from '../components/OptionsSection'
import { PathFinder } from '../components/PathFinder'
@@ -336,7 +337,21 @@ export default function Sync() {
}, [syncOptionsJson, filterOptionsJson, configOptionsJson, remoteOptionsJson])
return (
<div className="flex flex-col h-screen gap-10 pt-10">
<div className="flex flex-col h-screen gap-10">
<CommandInfo
content={`Sync the source to the destination, changing the destination only. Doesn't transfer files that are identical on source and destination, testing by size and modification time or MD5SUM. Destination is updated to match source, including deleting files if necessary (except duplicate objects, see below). If you don't want to delete files from destination, use the COPY command instead.
Files in the destination won't be deleted if there were any errors at any point. Duplicate objects (files with the same name, on those providers that support it) are not yet handled.
It is always the contents of the directory that is synced, not the directory itself. So when source:path is a directory, it's the contents of source:path that are copied, not the directory name and contents.
If dest:path doesn't exist, it is created and the source:path contents go there.
It is not possible to sync overlapping remotes. However, you may exclude the destination from the sync with a filter rule or by putting an exclude-if-present file inside the destination directory and sync to a destination that is inside the source directory.
Rclone will sync the modification times of files and directories if the backend supports it.`}
/>
{/* Main Content */}
<div className="flex flex-col flex-1 w-full max-w-3xl gap-6 mx-auto">
{/* Paths Display */}