Update provider type from "drive" to "gdrive" across codebase for Google Drive storage

This commit is contained in:
StarFleetCPTN
2025-04-18 21:12:47 -07:00
parent d9cb1cac03
commit 6e8fe9ad72
9 changed files with 34 additions and 34 deletions
+1 -1
View File
@@ -161,7 +161,7 @@ templ formFields(data StorageProviderFormData) {
selected="selected"
}
>OneDrive</option>
<option value="drive"
<option value="gdrive"
if data.Provider.Type == db.ProviderTypeGoogleDrive {
selected="selected"
}
+4 -4
View File
@@ -493,11 +493,11 @@ templ StorageProviders_ProvidersList(providers []db.StorageProvider) {
Region: { provider.Region }
</p>
}
} else if provider.Type == "drive" || provider.Type == "gphotos" {
} else if provider.Type == "gdrive" || provider.Type == "gphotos" {
<p class="flex items-center text-sm text-gray-500 dark:text-gray-400">
<i class="fab fa-google-drive w-4 h-4 mr-1.5 text-gray-400 dark:text-gray-500"></i>
Google
if provider.Type == "drive" {
if provider.Type == "gdrive" {
Drive
} else {
Photos
@@ -611,13 +611,13 @@ templ StorageProviders_ProvidersList(providers []db.StorageProvider) {
</div>
<!-- Authentication Notice (More Visible) -->
if (provider.Type == "drive" || provider.Type == "gphotos") && (provider.Authenticated == nil || !*provider.Authenticated) {
if (provider.Type == "gdrive" || provider.Type == "gphotos") && (provider.Authenticated == nil || !*provider.Authenticated) {
<div class="mt-3 flex items-center justify-between bg-yellow-50 dark:bg-yellow-900/30 rounded-lg p-3 border border-yellow-200 dark:border-yellow-800">
<div class="flex items-center">
<i class="fas fa-exclamation-triangle text-yellow-500 w-5 h-5 mr-2"></i>
<span class="text-sm text-yellow-700 dark:text-yellow-300">
Authentication required for Google
if provider.Type == "drive" {
if provider.Type == "gdrive" {
Drive
} else {
Photos
+1 -1
View File
@@ -230,7 +230,7 @@ templ RcloneImportPreviewContent(ctx context.Context, preview RcloneImportPrevie
}
<!-- OAuth credentials -->
if remote.Type == "drive" || remote.Type == "onedrive" || remote.Type == "gphotos" {
if remote.Type == "gdrive" || remote.Type == "onedrive" || remote.Type == "gphotos" {
<!-- Client ID -->
if _, exists := remote.Fields["client_id"]; !exists {
<div class="flex items-center gap-2">