release: v1.2.1 — login captcha, docs site, and bug fixes

Add slider captcha for web login, VitePress documentation on GitHub Pages,
and fixes for gallery delete refresh, pagination jump, and copy-format persistence.
This commit is contained in:
O96u committed 2026-08-29 11:42:18 +08:00
1 parent 469d3be735
commit ff20f97522
66 files changed
+2497 -616

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
import { describe, expect, it } from 'vitest'
import {
__peekLoginCaptchaTargetForTests,
__resetLoginCaptchaStoreForTests,
confirmLoginCaptcha,
createLoginCaptchaChallenge,
verifyLoginCaptcha
} from './login-captcha'
describe('login-captcha', () => {
it('requires confirm before login verify', () => {
__resetLoginCaptchaStoreForTests()
const { id } = createLoginCaptchaChallenge()
const target = __peekLoginCaptchaTargetForTests(id)!
expect(verifyLoginCaptcha(id, target)).toBe(false)
expect(confirmLoginCaptcha(id, target)).toBe(true)
expect(verifyLoginCaptcha(id, target)).toBe(true)
expect(verifyLoginCaptcha(id, target)).toBe(false)
})
it('rejects position outside tolerance', () => {
__resetLoginCaptchaStoreForTests()
const { id } = createLoginCaptchaChallenge()
const target = __peekLoginCaptchaTargetForTests(id)!
expect(confirmLoginCaptcha(id, target + 10)).toBe(false)
})
})