package components import ( "context" "fmt" ) // Storage Providers Import Page // User uploads a config, previews/edit remotes, selects which to import // On submit, POSTs selected remotes to /storage-providers/import/confirm // Main import page template templ StorageProvidersImport(ctx context.Context, preview RcloneImportPreview) {

Import rclone Config

Back to Providers

Upload your rclone configuration file to import storage providers. You'll be able to preview and select which remotes to import.

Accepted formats: .conf, .txt, .ini, .cfg

@RcloneImportPreviewContent(ctx, preview)
} // Just the preview content for HTMX updates templ RcloneImportPreviewContent(ctx context.Context, preview RcloneImportPreview) { if preview.Error != "" { } else if preview.Remotes != nil && len(preview.Remotes) > 0 {

Found {fmt.Sprintf("%d", len(preview.Remotes))} remotes

Select which remotes to import and edit their details if needed.

if len(preview.Remotes) > 0 { for _, remote := range preview.Remotes { } } else { }
Name Type Fields
for k, v := range remote.Fields {
{k}:
}
No remotes found in config.
Cancel
} else { } }