diff --git a/.gitignore b/.gitignore index 935422f..c102b0c 100644 --- a/.gitignore +++ b/.gitignore @@ -43,20 +43,7 @@ node_modules/ Thumbs.db # Ignore all Go files in the components directory -components/*.go -!components/components.go - -components/providers/*.go -!components/providers/providers.go - -components/providers/source/*.go -!components/providers/source/source.go - -components/providers/destination/*.go -!components/providers/destination/destination.go - -components/providers/common/*.go -!components/providers/common/common.go +*_templ.go # Ignore the data directory data/ diff --git a/README.md b/README.md index 3cd619d..94eb62e 100644 --- a/README.md +++ b/README.md @@ -311,6 +311,10 @@ PGID=1000 - If longer than 32 bytes, it will be truncated to 32 bytes - Example: `TOTP_ENCRYPTION_KEY=abcdefghijklmnopqrstuvwxyz123456` + +- SSL/TLS Verification Control: + - `SKIP_SSL_VERIFY`: Set to `true` to disable SSL/TLS certificate verification for outgoing connections (e.g., webhooks, email). Use with caution, as this can expose connections to man-in-the-middle attacks. Defaults to `false` (verification enabled). + - Example: `SKIP_SSL_VERIFY=true` ### Logging Configuration GoMFT provides configurable logging with rotation support through the following environment variables: diff --git a/components/auth_provider_form.templ b/components/auth_provider_form.templ index eca1ef7..0a1fee9 100644 --- a/components/auth_provider_form.templ +++ b/components/auth_provider_form.templ @@ -275,7 +275,7 @@ templ formContent(provider *db.AuthProvider, isNew bool) {
- if provider == nil || provider.Enabled { + if provider == nil || provider.GetEnabled() { - if provider.Enabled { + if provider.GetEnabled() { Active diff --git a/components/auth_providers_buttons.templ b/components/auth_providers_buttons.templ index 33aa3ef..02094f2 100644 --- a/components/auth_providers_buttons.templ +++ b/components/auth_providers_buttons.templ @@ -35,9 +35,9 @@ templ AuthProviderButtons(providers []db.AuthProvider) { } else {
for _, provider := range providers { - if provider.Enabled { - diff --git a/components/config_form.templ b/components/config_form.templ index 397053f..ca6b74e 100644 --- a/components/config_form.templ +++ b/components/config_form.templ @@ -12,6 +12,10 @@ import ( type ConfigFormData struct { Config *db.TransferConfig IsNew bool + // Fields for pre-rendering flags on edit + InitialCommand *db.RcloneCommand + SelectedFlagsMap map[uint]bool + SelectedFlagValues map[uint]string } func getConfigFormTitle(isNew bool) string { @@ -286,33 +290,34 @@ func getInitialData(config *db.TransferConfig) string { // This will need coordination with your backend to ensure the IDs match the commands let commandName = ''; switch(parseInt(this.commandId)) { - // Map command IDs to command names - adjust these based on your actual command IDs + // Correct mapping based on internal/db/migrations/009_add_rclone_tables.go case 1: commandName = 'copy'; break; - case 2: commandName = 'move'; break; - case 3: commandName = 'sync'; break; - case 4: commandName = 'ls'; break; - case 5: commandName = 'lsd'; break; - case 6: commandName = 'lsl'; break; - case 7: commandName = 'lsf'; break; - case 8: commandName = 'lsjson'; break; - case 9: commandName = 'md5sum'; break; - case 10: commandName = 'sha1sum'; break; - case 11: commandName = 'size'; break; - case 12: commandName = 'delete'; break; - case 13: commandName = 'purge'; break; - case 14: commandName = 'mkdir'; break; - case 15: commandName = 'rmdir'; break; - case 16: commandName = 'rmdirs'; break; - case 17: commandName = 'check'; break; - case 18: commandName = 'cleanup'; break; - case 19: commandName = 'dedupe'; break; - case 20: commandName = 'version'; break; - case 21: commandName = 'listremotes'; break; - case 22: commandName = 'cryptcheck'; break; - case 23: commandName = 'bisync'; break; - case 24: commandName = 'copyto'; break; - case 25: commandName = 'moveto'; break; - default: commandName = 'copy'; // Default to copy + case 2: commandName = 'sync'; break; + case 3: commandName = 'bisync'; break; + case 4: commandName = 'move'; break; + case 5: commandName = 'delete'; break; + case 6: commandName = 'purge'; break; + case 7: commandName = 'mkdir'; break; + case 8: commandName = 'rmdir'; break; + case 9: commandName = 'rmdirs'; break; + case 10: commandName = 'check'; break; + case 11: commandName = 'ls'; break; + case 12: commandName = 'lsd'; break; + case 13: commandName = 'lsl'; break; + case 14: commandName = 'lsf'; break; + case 15: commandName = 'lsjson'; break; + case 16: commandName = 'md5sum'; break; + case 17: commandName = 'sha1sum'; break; + case 18: commandName = 'size'; break; + case 19: commandName = 'version'; break; + case 20: commandName = 'cleanup'; break; + case 21: commandName = 'dedupe'; break; + case 22: commandName = 'copyto'; break; + case 23: commandName = 'moveto'; break; + case 24: commandName = 'listremotes'; break; + case 25: commandName = 'obscure'; break; + case 26: commandName = 'cryptcheck'; break; + default: commandName = 'copy'; // Default to copy if ID is unknown } console.log('Command ID:', this.commandId, 'Command Name:', commandName); @@ -455,8 +460,18 @@ templ ConfigForm(ctx context.Context, data ConfigFormData) { Command Configuration - - @common.RcloneFlags() + + @common.RcloneFlags(data.Config.CommandID) // Pass current command ID + + +
+ if !data.IsNew && data.InitialCommand != nil { + // Pre-render flags if editing and command data is available + @common.RcloneCommandFlagsContent(data.InitialCommand, data.SelectedFlagsMap, data.SelectedFlagValues) + } +
+ +
@@ -468,6 +483,20 @@ templ ConfigForm(ctx context.Context, data ConfigFormData) { @common.SourceSelection() +
+ + +
+