feat(ui): link back to one-time code page from scratch code page (#5712)
Some checks are pending
/ release (push) Waiting to run
testing / security-check (push) Blocked by required conditions
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (map[image:docker.io/bitnami/redis:7.2 port:6379]) (push) Blocked by required conditions
testing / test-remote-cacher (map[image:docker.io/bitnami/valkey:7.2 port:6379]) (push) Blocked by required conditions
testing / test-remote-cacher (map[image:ghcr.io/microsoft/garnet-alpine:1.0.14 port:6379]) (push) Blocked by required conditions
testing / test-remote-cacher (map[image:registry.redict.io/redict:7.3.0-scratch port:6379]) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions

Preview:
https://codeberg.org/attachments/b60c5d7c-103b-4227-9b0d-3d765dba2431

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5712
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
0ko 2024-10-29 05:31:49 +00:00
parent 457be48362
commit 9d687f1069
2 changed files with 2 additions and 0 deletions

View file

@ -442,6 +442,7 @@ verify = Verify
unauthorized_credentials = Credentials are incorrect or have expired. Retry your command or see %s for more information unauthorized_credentials = Credentials are incorrect or have expired. Retry your command or see %s for more information
scratch_code = Scratch code scratch_code = Scratch code
use_scratch_code = Use a scratch code use_scratch_code = Use a scratch code
use_onetime_code = Use a one-time code
twofa_scratch_used = You have used your scratch code. You have been redirected to the two-factor settings page so you may remove your device enrollment or generate a new scratch code. twofa_scratch_used = You have used your scratch code. You have been redirected to the two-factor settings page so you may remove your device enrollment or generate a new scratch code.
twofa_passcode_incorrect = Your passcode is incorrect. If you misplaced your device, use your scratch code to sign in. twofa_passcode_incorrect = Your passcode is incorrect. If you misplaced your device, use your scratch code to sign in.
twofa_scratch_token_incorrect = Your scratch code is incorrect. twofa_scratch_token_incorrect = Your scratch code is incorrect.

View file

@ -16,6 +16,7 @@
<div class="inline field"> <div class="inline field">
<button class="ui primary button">{{ctx.Locale.Tr "auth.verify"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "auth.verify"}}</button>
<a href="{{AppSubUrl}}/user/two_factor">{{ctx.Locale.Tr "auth.use_onetime_code"}}</a>
</div> </div>
</div> </div>
</form> </form>