mirror of
https://github.com/StarFleetCPTN/GoMFT.git
synced 2026-09-08 15:41:20 +02:00
- Changed input field IDs and names from 'dest_endpoint' and 'source_endpoint' to 'dest_host' and 'source_host' for consistency across NextCloud and WebDAV forms. - Updated placeholder texts for username, password, and file path fields to be more user-friendly. - Enhanced the URL parsing and validation logic in the transfer configuration generation to ensure proper handling of WebDAV and NextCloud URLs, improving robustness and error handling.
82 lines
4.3 KiB
Templ
82 lines
4.3 KiB
Templ
package source
|
|
|
|
templ NextCloudSourceForm() {
|
|
<div class="space-y-6 mt-4">
|
|
<div class="p-4 mb-4 text-sm text-blue-800 rounded-lg bg-blue-50 dark:bg-blue-900/30 dark:text-blue-300" role="alert">
|
|
<div class="flex items-center">
|
|
<i class="fas fa-info-circle mr-2"></i>
|
|
<span>Configure your NextCloud connection details below. You'll need your server URL, username, and password.</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mb-6">
|
|
<label for="source_host" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">NextCloud URL</label>
|
|
<div class="relative">
|
|
<div class="absolute inset-y-0 start-0 flex items-center ps-3.5 pointer-events-none">
|
|
<i class="fas fa-cloud text-gray-400 dark:text-gray-500"></i>
|
|
</div>
|
|
<input type="text" id="source_host" name="source_host" x-model="sourceHost" required
|
|
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full ps-10 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
placeholder="https://nextcloud.example.com" />
|
|
</div>
|
|
<p class="mt-2 text-sm text-gray-500 dark:text-gray-400">
|
|
Full URL to your NextCloud server including protocol (https://)
|
|
</p>
|
|
</div>
|
|
|
|
<div class="mb-6">
|
|
<label for="source_user" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Username</label>
|
|
<div class="relative">
|
|
<div class="absolute inset-y-0 start-0 flex items-center ps-3.5 pointer-events-none">
|
|
<i class="fas fa-user text-gray-400 dark:text-gray-500"></i>
|
|
</div>
|
|
<input type="text" id="source_user" name="source_user" x-model="sourceUser" required
|
|
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full ps-10 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
placeholder="username" />
|
|
</div>
|
|
<p class="mt-2 text-sm text-gray-500 dark:text-gray-400">
|
|
Your NextCloud username
|
|
</p>
|
|
</div>
|
|
|
|
<div class="mb-6">
|
|
<label for="source_password" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Password</label>
|
|
<div class="relative">
|
|
<div class="absolute inset-y-0 start-0 flex items-center ps-3.5 pointer-events-none">
|
|
<i class="fas fa-lock text-gray-400 dark:text-gray-500"></i>
|
|
</div>
|
|
<input type="password" id="source_password" name="source_password" x-model="sourcePassword" required
|
|
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full ps-10 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
placeholder="password" />
|
|
</div>
|
|
<p class="mt-2 text-sm text-gray-500 dark:text-gray-400">
|
|
Your NextCloud account password
|
|
</p>
|
|
</div>
|
|
|
|
<div class="mb-6">
|
|
<label for="source_path" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Remote Path</label>
|
|
<div class="relative">
|
|
<div class="absolute inset-y-0 start-0 flex items-center ps-3.5 pointer-events-none">
|
|
<i class="fas fa-folder-open text-gray-400 dark:text-gray-500"></i>
|
|
</div>
|
|
<input type="text" id="source_path" name="source_path" x-model="sourcePath" required
|
|
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full ps-10 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
placeholder="/path/to/files" />
|
|
</div>
|
|
<p class="mt-2 text-sm text-gray-500 dark:text-gray-400">
|
|
Path to your files in NextCloud
|
|
</p>
|
|
</div>
|
|
|
|
<div class="p-4 mb-4 text-sm text-yellow-800 rounded-lg bg-yellow-50 dark:bg-yellow-900/30 dark:text-yellow-300" role="alert">
|
|
<div class="flex">
|
|
<i class="fas fa-lightbulb mr-2 flex-shrink-0"></i>
|
|
<div>
|
|
<h3 class="font-medium">Connection Tip</h3>
|
|
<p class="mt-1">If you have two-factor authentication enabled on your NextCloud account, you'll need to create an app password in your NextCloud security settings.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
} |