mirror of
https://github.com/StarFleetCPTN/GoMFT.git
synced 2026-09-08 15:41:20 +02:00
- Separate built-in authentication options for source and destination in configuration forms. - Update UI components to reflect changes in authentication handling for Google Drive and Google Photos. - Implement path validation for local directories in the configuration forms, enhancing user experience. - Revise README to clarify supported source and destination types, including updated terminology for Google Drive. - Introduce new API endpoint for path validation, improving error handling and user feedback.
40 lines
1.6 KiB
Templ
40 lines
1.6 KiB
Templ
package source
|
|
|
|
templ LocalSourceForm() {
|
|
<div class="sm:col-span-6 space-y-6">
|
|
<div class="sm:col-span-4">
|
|
<label for="source_path" class="block text-sm font-medium text-secondary-700 dark:text-secondary-300 mb-1">Local Path</label>
|
|
<div class="relative">
|
|
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
|
<i class="fas fa-folder-open text-secondary-400 dark:text-secondary-600"></i>
|
|
</div>
|
|
<input
|
|
type="text"
|
|
name="source_path"
|
|
id="source_path"
|
|
x-model="sourcePath"
|
|
required
|
|
:class="{ 'border-red-300 dark:border-red-700': sourcePathValid === false, 'border-green-300 dark:border-green-700': sourcePathValid === true }"
|
|
class="form-input pl-10 w-full rounded-lg border-secondary-300 dark:border-secondary-700 dark:bg-secondary-800 dark:text-secondary-100 focus:ring-primary-500 focus:border-primary-500"
|
|
placeholder="Local directory path (e.g., /path/to/files)"
|
|
/>
|
|
</div>
|
|
<p class="mt-1 text-xs text-secondary-500 dark:text-secondary-400">
|
|
Full path to the local directory containing your files
|
|
</p>
|
|
<!-- Path validation message -->
|
|
<template x-if="sourcePathValid !== null">
|
|
<p x-show="sourcePathError" class="mt-1 text-sm" :class="sourcePathValid ? 'text-green-600 dark:text-green-400' : 'text-red-600 dark:text-red-400'" x-text="sourcePathError"></p>
|
|
</template>
|
|
</div>
|
|
<button
|
|
type="button"
|
|
class="btn-secondary h-10 whitespace-nowrap"
|
|
@click="checkPath(sourcePath, 'source')"
|
|
>
|
|
<i class="fas fa-check-circle mr-2"></i>
|
|
Check Location
|
|
</button>
|
|
</div>
|
|
}
|