2
0
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:
耗子
2024-10-13 00:35:56 +08:00
parent 3fae54bf58
commit b9d5aa5fb1
4 changed files with 2 additions and 4 deletions

View File

@@ -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

View File

@@ -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")
// 初始化时区

View File

@@ -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)
}

View File

@@ -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"`
}