Commit Graph
9 Commits
Author SHA1 Message Date
Qi HU 908b4b19ea feat(attendance): enforce captcha validation before check-in
- require a successful captcha challenge before recording the day’s attendance
- preserve the original attendance summary layout after a successful check-in

Signed-off-by: Qi HU <github@spcsky.com>
2025-10-14 10:39:57 +08:00
Qi HU ce913b7a54 feat(admin): manage captcha configuration centrally
- add a dedicated Filament settings tab for captcha drivers
- persist selections into config-compatible schema and migrate legacy keys
- extend captcha manager to consume database overrides transparently

Signed-off-by: Qi HU <github@spcsky.com>
2025-10-13 12:15:33 +08:00
Qi HU 60e1e45d73 feat(i18n): clarify captcha challenge labels
- harmonize challenge prompts across supported locales
- reuse shared helper to reduce duplicated translations
- ensure login flow references updated label key

Signed-off-by: Qi HU <github@spcsky.com>
2025-10-13 12:15:25 +08:00
Qi HU 1614ac3f3d refactor(ui): improve captcha form responsiveness
- adjust layout spacing on public auth-related templates
- ensure captcha challenge areas remain visible on small screens
- align image driver output with refreshed markup

Signed-off-by: Qi HU <github@spcsky.com>
2025-10-13 12:15:15 +08:00
Qi HU 9033eff8ea feat: Refine captcha configuration and drivers
Introduce a configurable captcha manager with drivers for image,
Cloudflare Turnstile, and Google reCAPTCHA, including fallback
behaviour.

Refactor login, signup, complain, and related flows to use the new
abstraction while simplifying the legacy image endpoint.

Document captcha environment options and restore classic defaults in
.env.example.

Signed-off-by: Qi HU <github@spcsky.com>
2025-10-11 23:38:27 +08:00
Qi HU d9f1612e8e fix: Fix duplicate includes in app.php
When we use `php artisan optimize` command, it will cause duplicate includes:
```
PHP Fatal error:  Cannot redeclare function get_global_sp_state() (previously declared in include/globalfunctions.php:3) in include/globalfunctions.php on line 3

   Symfony\Component\ErrorHandler\Error\FatalError

  Cannot redeclare function get_global_sp_state() (previously declared in include/globalfunctions.php:3)

  at include/globalfunctions.php:3
      1▕ <?php
      2▕
  ➜   3▕ function get_global_sp_state()
      4▕ {
      5▕        static $global_promotion_state;
      6▕        $cacheKey = \App\Models\Setting::TORRENT_GLOBAL_STATE_CACHE_KEY;
      7▕        if (is_null($global_promotion_state)) {
      8▕         $row = \Nexus\Database\NexusDB::remember($cacheKey, 600, function () use ($cacheKey) {
      9▕             return \Nexus\Database\NexusDB::getOne('torrents_state', 1);

   Whoops\Exception\ErrorException

  Cannot redeclare function get_global_sp_state() (previously declared in include/globalfunctions.php:3)

  at include/globalfunctions.php:3
      1▕ <?php
      2▕
  ➜   3▕ function get_global_sp_state()
      4▕ {
      5▕        static $global_promotion_state;
      6▕        $cacheKey = \App\Models\Setting::TORRENT_GLOBAL_STATE_CACHE_KEY;
      7▕        if (is_null($global_promotion_state)) {
      8▕         $row = \Nexus\Database\NexusDB::remember($cacheKey, 600, function () use ($cacheKey) {
      9▕             return \Nexus\Database\NexusDB::getOne('torrents_state', 1);

      +1 vendor frames

  2   [internal]:0
      Whoops\Run::handleShutdown()
```

So we should use `require_once` instead of `require` to avoid this issue.

Signed-off-by: Qi HU <github@spcsky.com>
2025-10-02 21:46:24 +08:00
SPC 0f089d39ab fix: style for staff.php and lang_functions.php
Signed-off-by: SPC <github@spcsky.com>
2025-10-02 21:43:45 +08:00
SPC a80f53d4f4 fix: Change Refresh into Location
If use Refresh, it will not work on some browser and
some protocols (e.g. HTTP/2). So, change Refresh
into Location.

Signed-off-by: SPC <github@spcsky.com>
2025-02-19 20:04:54 +08:00
SPC 888f50e0bd fix: viewrequests.php: Totalreq style fix
Signed-off-by: SPC <github@spcsky.com>
2025-01-02 11:20:49 +08:00