LinkLeong преди 1 година
родител
ревизия
d6a9ba65ed
променени са 2 файла, в които са добавени 7 реда и са изтрити 0 реда
  1. 2 0
      drivers/onedrive/meta.go
  2. 5 0
      route/v1/cloud.go

+ 2 - 0
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

+ 5 - 0
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{}