Files
StarFleetCPTN 8acdfc216d refactor: Remove check location buttons from local destination and source forms
- Eliminated the "Check Location" button from both LocalDestinationForm and LocalSourceForm templates to streamline the user interface.
- This change simplifies the forms by removing unnecessary elements, enhancing overall usability.
2025-04-07 11:32:58 -07:00

32 lines
1.6 KiB
Templ

package source
templ LocalSourceForm() {
<div class="space-y-4 mt-4">
<div>
<label for="source_path" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Local 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="{ 'border-red-500 dark:border-red-700': sourcePathValid === false, 'border-green-500 dark:border-green-700': sourcePathValid === true }"
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">Full path to the local directory containing your files</p>
<div x-show="sourcePathValid === false" class="mt-2 text-sm text-red-600 dark:text-red-400">
<div class="flex items-center">
<i class="fas fa-exclamation-circle mr-2"></i>
<span x-text="sourcePathError"></span>
</div>
</div>
<div x-show="sourcePathValid === true" class="mt-2 text-sm text-green-600 dark:text-green-400">
<div class="flex items-center">
<i class="fas fa-check-circle mr-2"></i>
<span x-text="sourcePathError || 'Path is valid'"></span>
</div>
</div>
</div>
</div>
}