diff --git a/filemanager.go b/filemanager.go index 56f3e8f..686eff1 100644 --- a/filemanager.go +++ b/filemanager.go @@ -175,12 +175,12 @@ func (f *FileManager) InitPlugin(srv service.List) { } var info = plugins.Info{ - Website: "https://www.go-admin.cn", + Website: "http://www.go-admin.cn/plugins/detail/DDN7VxZDTHTeaF8HUU", Title: "FileManager", Description: "A plugin help you manage files in your server", - Version: "v0.0.4", + Version: "v0.0.5", Author: "Official", - Url: "https://github.com/GoAdminGroup/filemanager/archive/v0.0.4.zip", + Url: "https://github.com/GoAdminGroup/filemanager/archive/v0.0.5.zip", Cover: "", Agreement: "", Uuid: "DDN7VxZDTHTeaF8HUU", diff --git a/installation.go b/installation.go index b0c2f1b..9c2e872 100644 --- a/installation.go +++ b/installation.go @@ -103,7 +103,7 @@ func (f *FileManager) GetSettingPage() table.Generator { } formList.AddField(language2.Get("Connection"), "conn", db.Varchar, form.SelectSingle). - FieldOptions(ops) + FieldOptions(ops).FieldHelpMsg(language2.GetHTML("sqlite3 need to import the sql first")) formList.AddRow(func(panel *types.FormPanel) { panel.AddField(language2.Get("allow upload"), "allowUpload", db.Int, form.Switch).FieldOptions(types.FieldOptions{ @@ -160,6 +160,7 @@ func (f *FileManager) GetSettingPage() table.Generator { } tables, err := db.WithDriver(f.Conn).Table(f.Conn.GetConfig(connName).Name).ShowTables() if err != nil { + logger.Error("filemanager get sql tables error: ", err) return err } var rootsMap = make(root.Roots, len(values["name"])) @@ -185,9 +186,11 @@ func (f *FileManager) GetSettingPage() table.Generator { } } roots, _ := json.Marshal(rootsMap) + if !utils.InArray(tables, TableName) { err = f.Conn.CreateDB(connName, new(Table)) if err != nil { + logger.Error("filemanager create database table error: ", err) return err } _, err = db.WithDriverAndConnection(connName, f.Conn). diff --git a/modules/language/cn.go b/modules/language/cn.go index f190bf8..a887182 100644 --- a/modules/language/cn.go +++ b/modules/language/cn.go @@ -63,4 +63,6 @@ var CN = language.LangSet{ "filemanager.filemanager setting": "文件管理器设置", "filemanager.filemanager installation": "安装文件管理器", + + "filemanager.sqlite3 need to import the sql first": "如果使用sqlite3,需要先导入执行安装sql", } diff --git a/modules/language/en.go b/modules/language/en.go index fc7a619..96be265 100644 --- a/modules/language/en.go +++ b/modules/language/en.go @@ -62,4 +62,6 @@ var EN = language.LangSet{ "filemanager.filemanager setting": "FileManager Setting", "filemanager.filemanager installation": "FileManager Installation", + + "filemanager.sqlite3 need to import the sql first": "sqlite3 need to import and execute the sql command first", }