chore: update .gitignore and remove settings.local.json

This commit is contained in:
0xJacky
2026-04-18 08:08:03 +00:00
parent 535c8efb38
commit b1b1596a4d
4 changed files with 8 additions and 33 deletions

View File

@@ -1,31 +0,0 @@
{
"permissions": {
"allow": [
"Bash(pnpm typecheck:*)",
"Bash(pnpm lint:*)",
"Bash(npm run build:*)",
"Bash(go build:*)",
"Bash(npm run typecheck:*)",
"Bash(mkdir:*)",
"Bash(mv:*)",
"Bash(grep:*)",
"Bash(go test:*)",
"mcp__context7__resolve-library-id",
"mcp__context7__get-library-docs",
"Bash(find:*)",
"Bash(sed:*)",
"Bash(cp:*)",
"mcp__eslint__lint-files",
"Bash(go generate:*)",
"Bash(pnpm eslint:*)",
"Read(//workspaces/cosy/settings/**)",
"Bash(go doc:*)",
"Bash(pnpm exec eslint:*)",
"Bash(go:*)",
"Bash(git pull *)",
"Bash(git add *)",
"Bash(git commit -m ' *)"
],
"deny": []
}
}

1
.gitignore vendored
View File

@@ -27,3 +27,4 @@ log-index/
*.test
GeoLite2-City.mmdb
*.log
.claude/settings.local.json

View File

@@ -16,11 +16,13 @@ export const useNgxConfigStore = defineStore('ngxConfig', () => {
const curServerIdx = ref(0)
function setNgxConfig(config: NgxConfig) {
curServerIdx.value = 0
ngxConfig.value = {
...createEmptyNgxConfig(),
...config,
}
const serverCount = ngxConfig.value.servers?.length ?? 0
if (curServerIdx.value < 0 || curServerIdx.value >= serverCount)
curServerIdx.value = 0
}
function reset() {

View File

@@ -146,7 +146,10 @@ async function onchange(status: boolean) {
ngxConfig.value.servers.forEach(v => {
v.locations = v?.locations?.filter(l => l.path !== '/.well-known/acme-challenge')
})
await editorStore.save()
// Skip syncing the response so handleResponse() does not overwrite
// our local autoCert back to the backend's still-enabled state, which
// would leave the switch showing on until a page reload.
await editorStore.save({ syncResponse: false })
changeAutoCert(status)
}