mirror of
https://github.com/StarFleetCPTN/GoMFT.git
synced 2026-10-26 15:00:27 +01:00
feat: Enhance storage provider form and configuration
- Updated the storage provider form to categorize options into server-based, object storage, web storage, and cloud storage. - Improved input placeholders for clarity and added descriptions for fields. - Introduced new storage provider types: WebDAV, Nextcloud, Wasabi, MinIO, and B2. - Added JavaScript functionality to auto-populate default ports based on selected provider type. - Updated .gitignore to include test results and logs, and added Playwright configuration for testing.
This commit is contained in:
1 parent
31871bd16e
commit
130a3b0d1c
6 files changed
+366
-85
No files matched your search
@@ -18,6 +18,11 @@ const (
|
||||
ProviderTypeSMB StorageProviderType = "smb"
|
||||
ProviderTypeHetzner StorageProviderType = "hetzner"
|
||||
ProviderTypeLocal StorageProviderType = "local"
|
||||
ProviderTypeWebDAV StorageProviderType = "webdav"
|
||||
ProviderTypeNextcloud StorageProviderType = "nextcloud"
|
||||
ProviderTypeB2 StorageProviderType = "b2"
|
||||
ProviderTypeWasabi StorageProviderType = "wasabi"
|
||||
ProviderTypeMinio StorageProviderType = "minio"
|
||||
)
|
||||
|
||||
// StorageProvider represents a connection to a storage service
|
||||
@@ -164,7 +169,9 @@ func (sp *StorageProvider) SetAuthenticated(value bool) {
|
||||
func (sp *StorageProvider) IsOAuthProvider() bool {
|
||||
return sp.Type == ProviderTypeOneDrive ||
|
||||
sp.Type == ProviderTypeGoogleDrive ||
|
||||
sp.Type == ProviderTypeGooglePhoto
|
||||
sp.Type == ProviderTypeGooglePhoto ||
|
||||
sp.Type == ProviderTypeWebDAV ||
|
||||
sp.Type == ProviderTypeNextcloud
|
||||
}
|
||||
|
||||
// RequiresEncryption returns true if the provider has sensitive fields that need encryption
|
||||
@@ -183,7 +190,7 @@ func (sp *StorageProvider) GetSensitiveFields() map[string]string {
|
||||
if sp.Password != "" {
|
||||
sensitiveFields["Password"] = sp.Password
|
||||
}
|
||||
case ProviderTypeS3:
|
||||
case ProviderTypeS3, ProviderTypeWasabi, ProviderTypeMinio, ProviderTypeB2:
|
||||
if sp.SecretKey != "" {
|
||||
sensitiveFields["SecretKey"] = sp.SecretKey
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user