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:
StarFleetCPTN committed 2025-04-16 19:24:16 -07:00
1 parent 31871bd16e
commit 130a3b0d1c
6 files changed
+366 -85

No files matched your search

+9 -2
View File
@@ -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
}