diff --git a/backend/storage/preferences.go b/backend/storage/preferences.go index 8ca03a0..261bb79 100644 --- a/backend/storage/preferences.go +++ b/backend/storage/preferences.go @@ -27,8 +27,8 @@ func (p *PreferencesStorage) DefaultPreferences() types.Preferences { } func (p *PreferencesStorage) getPreferences() (ret types.Preferences) { - b, err := p.storage.Load() ret = p.DefaultPreferences() + b, err := p.storage.Load() if err != nil { return } diff --git a/backend/types/preferences.go b/backend/types/preferences.go index 846f15c..40d5430 100644 --- a/backend/types/preferences.go +++ b/backend/types/preferences.go @@ -24,6 +24,7 @@ func NewPreferences() Preferences { ScanSize: consts.DEFAULT_SCAN_SIZE, KeyIconStyle: 0, CheckUpdate: true, + AllowTrack: true, }, Editor: PreferencesEditor{ FontSize: consts.DEFAULT_FONT_SIZE, @@ -41,6 +42,7 @@ func NewPreferences() Preferences { } type PreferencesBehavior struct { + Welcomed bool `json:"welcomed" yaml:"welcomed"` AsideWidth int `json:"asideWidth" yaml:"aside_width"` WindowWidth int `json:"windowWidth" yaml:"window_width"` WindowHeight int `json:"windowHeight" yaml:"window_height"` @@ -61,6 +63,7 @@ type PreferencesGeneral struct { UseSysProxyHttp bool `json:"useSysProxyHttp" yaml:"use_sys_proxy_http,omitempty"` CheckUpdate bool `json:"checkUpdate" yaml:"check_update"` SkipVersion string `json:"skipVersion" yaml:"skip_version,omitempty"` + AllowTrack bool `json:"allowTrack" yaml:"allow_track"` } type PreferencesEditor struct { diff --git a/frontend/index.html b/frontend/index.html index b53c808..9d89d63 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -8,8 +8,6 @@
-