diff --git a/app/src/components/CodeEditor/CodeEditor.vue b/app/src/components/CodeEditor/CodeEditor.vue index 3c875171..ee6fde1f 100644 --- a/app/src/components/CodeEditor/CodeEditor.vue +++ b/app/src/components/CodeEditor/CodeEditor.vue @@ -40,7 +40,7 @@ ace.config.setModuleUrl('ace/ext/searchbox', extSearchboxUrl) /> - diff --git a/app/src/views/preference/components/Passkey.vue b/app/src/views/preference/components/Passkey.vue index 10aeaade..1d2b3d04 100644 --- a/app/src/views/preference/components/Passkey.vue +++ b/app/src/views/preference/components/Passkey.vue @@ -1,6 +1,5 @@ @@ -110,9 +80,7 @@ function addPasskey() { {{ $gettext('Your passkeys') }} - - {{ $gettext('Add a passkey') }} - + getList()" /> @@ -139,7 +107,10 @@ function addPasskey() { modifyIdx = index" + @click="() => { + modifyIdx = index + passkeyName = item.name + }" > @@ -180,23 +151,6 @@ function addPasskey() { - - - - - - - - diff --git a/settings/auth.go b/settings/auth.go index 2dbe3d88..cf75c7b4 100644 --- a/settings/auth.go +++ b/settings/auth.go @@ -1,7 +1,7 @@ package settings type Auth struct { - IPWhiteList []string `json:"ip_white_list" binding:"omitempty,dive,ip" ini:",,allowshadow"` + IPWhiteList []string `json:"ip_white_list" binding:"omitempty,dive,ip" ini:",,allowshadow" protected:"true"` BanThresholdMinutes int `json:"ban_threshold_minutes" binding:"min=1"` MaxAttempts int `json:"max_attempts" binding:"min=1"` } diff --git a/settings/settings.go b/settings/settings.go index 3067ab30..d59d5915 100644 --- a/settings/settings.go +++ b/settings/settings.go @@ -104,6 +104,11 @@ func Save() (err error) { reflectFrom(k, v) } + // fix unable to save empty slice + if len(ServerSettings.RecursiveNameservers) == 0 { + Conf.Section("server").Key("RecursiveNameservers").SetValue("") + } + err = Conf.SaveTo(ConfPath) if err != nil { return