Commit graph

104 commits

Author SHA1 Message Date
ec00aa32ae admin panel: add restrict-account decision template
The moderation case decision dropdown had no way to apply the new
restrict_account/unrestrict_account sanction; add it alongside freeze,
including the appeal-remedy auto-detection. Rebuilds web/dist so the
embedded panel binary picks up the change.
2026-09-16 14:13:27 +01:00
8850554500 admin: fix server settings env editor crashing on empty template
ReadEnvGroups returned a nil slice (out := groups[:0]) whenever no group
ended up with fields, which marshals to JSON null instead of []. The
admin UI's EnvSection calls groups.reduce()/iterates unconditionally, so
that null crashed the Server Settings page.

Also switch the source of the panel structure from .env.example to .env
once .env exists, falling back to .env.example only pre-setup: .env
already carries the same group headers and comments after any save
(WriteEnvValues always rewrites it from .env.example's exact text), so
it's the more current source of what's actually configured.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-14 19:01:18 +01:00
ec91375e99 admin ui: rebuild stale dist bundle from current source
Some checks are pending
CI / Go tests (push) Waiting to run
CI / Admin web build (push) Waiting to run
CI / Grammy store bot (push) Waiting to run
CI / Docker main topology smoke (push) Waiting to run
dist/index.html was pointing at index-DTpNyCcP.js, a bundle left over from
mid-rebase: three consecutive admin-UI commits ("match the reserved-usernames
page layout to the NFT page", "self-contained reserve-username modal", "use
the standard dry-run/confirm flow") each conflicted on dist/index.html, and
resolving each by keeping the already-applied side discarded that commit's
own frontend rebuild. The result was a built bundle several commits stale
relative to the actual ServerSettingsPage.tsx source, which crashed on load
(Cannot read properties of null (reading 'reduce')) since it no longer
matched the current API shape.

Rebuilt via `npm run build` against current source and removed the orphaned
stale bundles.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-14 16:47:46 +01:00
60537342d3 admin ui: reserved usernames use the standard dry-run/confirm flow
Both reserve and unreserve go through ActionButton now (reason -> dry-run ->
confirm, journalled) like every other admin action. The reserve modal keeps
just the username field and hands off; it autofocuses and echoes @<name> live
so the field being filled is unambiguous.
2026-09-14 12:05:28 +01:00
d6d3be0070 admin ui: self-contained reserve-username modal, plain @ text
The reserve modal delegated to a nested ActionButton, whose own flow modal
opened over it - the username field ended up behind it and the request preview
came through empty on confirm. Replace it with a modal that owns its username
and reason fields and posts the reserve/unreserve command directly. Render the
@ prefix as text, not an icon.
2026-09-14 12:05:18 +01:00
9ed8590264 admin ui: match the reserved-usernames page layout to the NFT page
Move "Reserve username" into a modal opened from the page actions, and keep a
single search toolbar in the query panel, so the page matches Collectible
Usernames instead of stacking two toolbars with an unconstrained input.
2026-09-14 12:05:06 +01:00
2bdb1ecf37 usernames: operator reserved-username blocklist
A plain blocklist for names like @support - separate from the collectible
system, so a reservation has no owner, no price and no "bought on Fragment"
badge.

- reserved_usernames table + migration.
- Enforced in replacePeerUsernameTx (the single editable-username write point:
  account.updateUsername, channels.updateUsername, @BotFather /setusername) and
  in the collectible mint path; a reserved name returns USERNAME_OCCUPIED.
- admin.Service: ReserveUsername / UnreserveUsername (journalled commands) and
  the ReservedUsernames listing.
- adminapi: /v1/reserved-usernames{,/reserve,/unreserve}.
- telesrv-admin panel + a "Reserved Usernames" page in the web UI (dist rebuilt).
- Postgres and in-memory store implementations; the memory registry gains an
  optional reserved-name check so tests exercise the same rule.
2026-09-14 12:04:43 +01:00
onysd
7ad68c3983 added full access row to operator modal, plus a test for the last-manager guard
The "*" wildcard was never in assignablePermissions, so an operator holding it
(the one the first-run wizard creates) showed every box unticked while having
every right, and there was no way to take it away. Its own row fixes both; the
grid is disabled while it is on, since normalisePermissions collapses "*" plus
anything back to "*".

That made guardManagerRemoval reachable from the UI for the first time, so it
now has an integration test covering the wildcard match and the enabled filter
in its SQL.
2026-09-11 15:48:07 +03:00
onysd
c04a8ddc6a added bot api question on wev-setup 2026-09-11 05:15:00 +03:00
onysd
2f1818d656 merged with fixes 2026-09-09 02:49:30 +03:00
onysd
274bdc8bac fixing bugs 2026-09-08 18:59:58 +03:00
onysd
979d27ec7a improvements for first-time setup 2026-09-08 17:56:26 +03:00
onysd
7b788408b9 adjusted login form sizes and fixed routing issues after login 2026-09-08 13:52:39 +03:00
onysd
d5eb77e2d6 removed useless text on login form 2026-09-08 13:44:04 +03:00
onysd
2584380a80 glorifying login page 2026-09-08 13:40:48 +03:00
onysd
e240bfbbfa added dry run for update button 2026-09-08 13:25:00 +03:00
onysd
5c16371ae0 added cache for dashboard and storage pages 2026-09-08 02:29:28 +03:00
onysd
eb69c8500c now left menu in admin panel can be minimized 2026-09-08 02:24:58 +03:00
onysd
db40f100cd added 403 screen when operator have no permission for section 2026-09-08 02:19:09 +03:00
onysd
f7b3af48de added background to panel itself 2026-09-08 02:02:18 +03:00
onysd
87173ae43f glorifying admin panel 2026-09-08 01:53:49 +03:00
onysd
ae2cc3ba90 messages screen improvement 2026-09-08 01:19:33 +03:00
onysd
280321b902 server admin panel is now supports multiple operators profiles 2026-09-08 01:01:35 +03:00
onysd
62849c532e added skeletons to admin page when data on dashboard and storage page are loading 2026-09-07 18:40:56 +03:00
onysd
aeaf3f4596 updates for server files size limits 2026-09-06 07:14:50 +03:00
onysd
3fef764ece fix 2026-09-03 10:44:17 +03:00
onysd
508d120bd3 fix for max file size 2026-09-03 10:31:45 +03:00
onysd
a20f5b8b33 fix for ui 2026-09-03 10:19:17 +03:00
onysd
5a7618aaba added danger zones to storage managament menu 2026-09-03 10:04:46 +03:00
onysd
9cf53449fd fixes and ui improvements 2026-09-03 09:37:55 +03:00
onysd
8ef2b58bf9 fixes for storage managament 2026-09-03 08:33:06 +03:00
onysd
e6bfe2d444 fix for retention logic 2026-09-03 05:00:42 +03:00
onysd
70c0ba44f0 adding more functions to media managament system 2026-09-03 00:54:09 +03:00
onysd
95e62c2d77 fix 2026-09-01 20:06:58 +03:00
onysd
d2f4e11390 fixed info about api layer in admin page 2026-09-01 19:12:32 +03:00
onysd
62d8b53030 fix 2026-09-01 17:40:03 +03:00
onysd
7cd1f64d0d added messages templates 2026-09-01 14:40:06 +03:00
onysd
e8dc967e6a fixes 2026-09-01 12:50:18 +03:00
onysd
21a0856587 merged from gramsrv upstream 2026-09-01 12:06:31 +03:00
onysd
79c64ee916 fix 2026-08-27 13:23:17 +03:00
onysd
ef325f31da fix 2026-08-26 03:06:57 +03:00
onysd
f3c4e3c60b fix 2026-08-26 02:53:47 +03:00
onysd
1c9a192a96 improved settings window 2026-08-26 02:44:59 +03:00
onysd
80bc8d352c still tuning server settings section 2026-08-26 01:54:19 +03:00
onysd
66f9c0bc1e fixes and improvements for new server settings menu 2026-08-26 00:37:25 +03:00
onysd
e6a777983c fix 2026-08-25 00:20:05 +03:00
onysd
edc5f84b6d fix 2026-08-24 23:14:50 +03:00
onysd
d0669bdc5e categorisation for gifs 2026-08-24 23:09:08 +03:00
onysd
15f2d6e925 added gifs preview 2026-08-07 10:51:43 +03:00
onysd
354128c106 added full gifts support 2026-08-07 10:13:11 +03:00