mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 04:22:33 +08:00
fix: panel version
This commit is contained in:
@@ -5,7 +5,6 @@ app:
|
||||
key: a-long-string-with-32-characters
|
||||
locale: zh_CN
|
||||
timezone: Asia/Shanghai
|
||||
version: 2.3.0
|
||||
root: /www
|
||||
http:
|
||||
debug: false
|
||||
|
||||
@@ -26,7 +26,7 @@ func initConf() {
|
||||
|
||||
func initGlobal() {
|
||||
app.Root = app.Conf.MustString("app.root")
|
||||
app.Version = app.Conf.MustString("app.version")
|
||||
app.Version = "2.3.0"
|
||||
app.Locale = app.Conf.MustString("app.locale")
|
||||
|
||||
// 初始化时区
|
||||
|
||||
@@ -496,7 +496,7 @@ func (s *CliService) Init(ctx context.Context, cmd *cli.Command) error {
|
||||
return fmt.Errorf("已经初始化过了")
|
||||
}
|
||||
|
||||
settings := []biz.Setting{{Key: biz.SettingKeyName, Value: "耗子面板"}, {Key: biz.SettingKeyMonitor, Value: "1"}, {Key: biz.SettingKeyMonitorDays, Value: "30"}, {Key: biz.SettingKeyBackupPath, Value: filepath.Join(app.Root, "backup")}, {Key: biz.SettingKeyWebsitePath, Value: filepath.Join(app.Root, "wwwroot")}, {Key: biz.SettingKeyVersion, Value: app.Conf.String("app.version")}}
|
||||
settings := []biz.Setting{{Key: biz.SettingKeyName, Value: "耗子面板"}, {Key: biz.SettingKeyMonitor, Value: "1"}, {Key: biz.SettingKeyMonitorDays, Value: "30"}, {Key: biz.SettingKeyBackupPath, Value: filepath.Join(app.Root, "backup")}, {Key: biz.SettingKeyWebsitePath, Value: filepath.Join(app.Root, "wwwroot")}, {Key: biz.SettingKeyVersion, Value: app.Version}}
|
||||
if err := app.Orm.Create(&settings).Error; err != nil {
|
||||
return fmt.Errorf("初始化失败:%v", err)
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ type PanelAppConfig struct {
|
||||
Key string `yaml:"key"`
|
||||
Locale string `yaml:"locale"`
|
||||
Timezone string `yaml:"timezone"`
|
||||
Version string `yaml:"version"`
|
||||
Root string `yaml:"root"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user