mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-05-06 14:03:40 +08:00
chore: update .gitignore and remove settings.local.json
This commit is contained in:
@@ -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
1
.gitignore
vendored
@@ -27,3 +27,4 @@ log-index/
|
||||
*.test
|
||||
GeoLite2-City.mmdb
|
||||
*.log
|
||||
.claude/settings.local.json
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user