From d6a9ba65edd06d98dbf3daa6c0e7c4005dc1cdc7 Mon Sep 17 00:00:00 2001 From: LinkLeong Date: Tue, 22 Aug 2023 05:01:40 +0100 Subject: [PATCH] add onedrive icon --- drivers/onedrive/meta.go | 2 ++ route/v1/cloud.go | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/drivers/onedrive/meta.go b/drivers/onedrive/meta.go index 2b56de5..729e157 100644 --- a/drivers/onedrive/meta.go +++ b/drivers/onedrive/meta.go @@ -4,6 +4,8 @@ import ( "github.com/IceWhaleTech/CasaOS/internal/driver" ) +const ICONURL = "./img/driver/OneDrive.svg" + type Host struct { Oauth string Api string diff --git a/route/v1/cloud.go b/route/v1/cloud.go index f4ab07b..57870ea 100644 --- a/route/v1/cloud.go +++ b/route/v1/cloud.go @@ -6,6 +6,7 @@ import ( "github.com/IceWhaleTech/CasaOS-Common/utils/logger" "github.com/IceWhaleTech/CasaOS/drivers/dropbox" "github.com/IceWhaleTech/CasaOS/drivers/google_drive" + "github.com/IceWhaleTech/CasaOS/drivers/onedrive" "github.com/IceWhaleTech/CasaOS/model" "github.com/IceWhaleTech/CasaOS/pkg/utils/common_err" "github.com/IceWhaleTech/CasaOS/pkg/utils/httper" @@ -51,6 +52,10 @@ func ListStorages(c *gin.Context) { if dataMap["type"] == "dropbox" { r.MountPoints[i].Icon = dropbox.ICONURL } + if dataMap["type"] == "onedrive" { + + r.MountPoints[i].Icon = onedrive.ICONURL + } r.MountPoints[i].Name = dataMap["username"] } list := []httper.MountPoint{}