Commit graph

38 commits

Author SHA1 Message Date
Maaxxs
e4f23fcde4 Audit log, abuse protection, gallery comments with moderation, safe image uploads, 404 page
- Audit log: every admin_log entry is also stored permanently in the database (admin/audit.php, audit.view)
- Rate limits per account, login throttling per IP (not per account), emergency lock after mass deletions, force logout / lock in user management
- Comments under gallery pictures (picture page, report button, owner can disable them)
- Moderation: new members, links, reported content and a "moderate everything" switch go to the approval list (moderation.php)
- Every uploaded image is re-encoded (strips appended code and EXIF data)
- Custom 404 page, also shown for pages without permission

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 21:57:34 +02:00
Maaxxs
a483ea8712 Modern item picker (image, category, stock, keyboard) for deposit, withdraw, history search and shop management; category chips for the stock
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 21:31:52 +02:00
Maaxxs
276f80bd7b User management and raids: search field; user management also has status filters and sorting
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 21:03:17 +02:00
Maaxxs
267a7f532c Member list: redesigned filters with search field, class icon chips, group chips and sort toggle
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 20:53:17 +02:00
Maaxxs
590d50c7f1 Modern file picker with drag and drop and image previews
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 20:47:59 +02:00
Maaxxs
5f8b86663f Member profiles with characters and gallery, member list search/filter/sort/view toggle, Discord join date
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 20:45:37 +02:00
Maaxxs
beff58981a Wiki with the beginner guide: chapters, editor with preview, history, contributors, guide import
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 20:33:17 +02:00
Maaxxs
f773169a7e Dashboard onboarding tour for new members, restartable from the profile
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 18:46:21 +02:00
Maaxxs
17dea6d41f Lumishop partial approval, Lumipunkte on dashboard and in sidebar box
Members may now request more than is in stock (or items that are sold
out); only their points have to cover the full request. When approving,
the manager can approve fewer than requested. The quantity field is
prefilled with what is in stock, the cost updates as you type, and only
the approved part is charged and taken from stock. The order keeps the
requested quantity, so the member sees e.g. "3 von 10 bewilligt". The
order list also shows the current stock and flags when it isn't enough.

The column upgrade check now covers every table that has upgrades,
instead of only users and roles. Tables that are about to be created
fresh are skipped.

The dashboard gets a card with your Lumipunkte and your rank. In the
sidebar, the points move from under your name into a gold box above the
profile.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 10:56:59 +02:00
Maaxxs
ebc9e2367e Lumishop: trade Lumipunkte for items, with approval
Members request items from the shop. Their points and the stock are
earmarked but not taken until someone with shop.manage approves. Approving
books a negative "Lumishop" entry in the Lumipunkte history and takes the
stock. For warehouse-backed items it also books a withdrawal to the member
in the warehouse. Approved orders are then marked as handed over in the
game, or can be reversed, which restores points, stock and the warehouse
withdrawal.

The management page handles categories and items (price, description,
stock). Stock is either the shop's own count, unlimited, or live from a
linked warehouse item. Items in stock can be imported from the warehouse,
and an item's own stock can be moved into the warehouse to link it there.
Warehouse cards show when an item is sold in the shop.

Shop bookings can't be deleted from the Lumipunkte page, only reversed in
the shop, so orders and points stay in sync. The new permissions go to the
Administrator group only, so the shop stays hidden until it is assigned.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 10:49:05 +02:00
Maaxxs
fe1561f4f7 Raids: attendance list, automatic points on archive, reminder callback
Each raid gets an attendance list for raids.manage (present, absent, excused)
with quick actions, members added by hand and a "checked" mark with who and
when. The contribution form can now select a raid's present members for
points or its absent members for a deduction.

Raids can carry points for present members and a deduction for absent ones
(raid_settings). When a raid is archived - on the website or via the button
in Discord, detected on the next raid or contribution page view - the site
awards them once: by attendance if a list exists, otherwise to everyone in a
group without deduction, and not at all if points were already given for
that raid. Settings, attendance and awards follow a raid_id change when the
API re-posts a deleted message.

bot_api.php lets the bot ask which signed-up members have raids.manage when a
raid starts (shared key in config.php bot_callback.key); the bot then sends
them a DM with a link to the list. The bot side lives in the separate bot
repository (cogs/attendance.py).

Also fixes contribution_awards.raid_id being too small for Discord IDs (it
is widened automatically) and raid IDs losing precision in the contribution
form's JavaScript, which kept the raid preselection from ever matching.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 09:52:34 +02:00
Maaxxs
852eee357d Beitragspunkte for members, new Lumina logo
Members can be awarded contribution points for raids, events and other
activities, shown with a golden heart-shaped coin. An award has an occasion,
reason, date and points per member; members are picked with search and
select all/none, and choosing a raid preselects its participants (signed up
in a group and linked to a website account), fills in reason and date and
names participants without an account. The + on a member's card awards to
that member alone, negative points deduct, and awards can be deleted whole
or per member. Balances are always computed from the awards.

The ranking shows members as cards with gold/silver/bronze for the top three
and the viewer's own balance in the header and sidebar. With only
contributions.view it lists the best 25 places plus the viewer's own place;
contributions.view_all or contributions.manage show everyone. The history of
awards is paginated, using pagination now shared with the warehouse.

The sidebar shows the new logo, and the login page and mobile top bar a
wordmark cut from it with soft edges.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 09:23:55 +02:00
Maaxxs
3e025b811e Lagerhaus: stock and history of the legion's items
A new page records items handed in (item, quantity, when, and from whom -
a website account or a free-text name) and taken out (when, now or entered
by hand, and optionally to whom). Stock is always computed from the
movements, withdrawals can't exceed it, and a deposit can only be deleted
once nothing of it has been taken out. Stock is shown as cards with the item
picture and quantity, name and category below, plus search and a category
filter; the history lists every movement with who entered it.

The item list holds 2,301 weapons, armor pieces, accessories and consumables
read from the Aion 2 wiki's MediaWiki API, with each item's icon downscaled
to 128px under assets/images/warehouse/. It is loaded into the database on
first visit and again whenever the JSON changes. Unknown names can be added
as custom items after a confirmation, since the wiki lists no materials.

warehouse.view and warehouse.manage are new permissions. Missing core
permissions are now created automatically and granted to the Administrator
group, and the two tables are created like the other schema additions.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 08:46:40 +02:00
Maaxxs
c5213b5736 Karte: replace the tactical map with the interactive map viewer
The Karte page now embeds a standalone viewer (assets/map/) covering all ten
regions - Verteron, Altgard, Elthen, Morheim, Poeta, Ishalgen and the
Reshanta maps - with markers and category filters from interactivemap.app.
map.php loads it in an iframe because its stylesheet restyles body, button
and * globally and would otherwise break the site layout.

The tile, marker and icon data (~230 MB, ~39,000 files) is kept out of Git
and uploaded by FTP; the README explains where it comes from.

Removed with it: own markers and categories, tactic layers, the in-browser
map builder, the tile/stitch/viewer tools, the bundled Leaflet, the four map
tables in schema.sql and the map.manage / map.tactics permissions. Existing
databases keep their old map tables untouched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 06:54:17 +02:00
Maaxxs
c1dacc6688 Karte: allow zooming past the deepest tile level
The map's zoom was capped at the deepest level that has tiles, which leaves
almost no room on a shallow pyramid: a 1024px map only has levels 0 to 2, so
fitBounds already landed at the maximum and the zoom-in button was disabled
from the moment the page loaded. Reproduced against a copy of the live map
(1024x1024, max_zoom 2): zoom-in disabled on load, clicking it did nothing.

The tile layer now declares maxNativeZoom as the deepest level that really
exists, and the map may zoom two levels beyond it - Leaflet scales those
tiles up instead of requesting levels that would 404. Verified across the
range: level 1 at zoom 1.25, native level 2 at zoom 2, and the same level 2
tiles upscaled to 362/512/724/1024px at zoom 2.5 through 4, with no request
for the non-existent level 3.

This also removes detectRetina, which made the problem worse rather than
better: it costs a zoom level of magnification, not just resolution, so on a
high-density display a three-level map lost a third of its already minimal
range.

tools/tile_viewer.html had the same constraint one level up and now allows
two levels past native as well.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 15:10:07 +02:00
Maaxxs
52fea9f92d Karte: build a map from an image right on the page
Pick an image, press "Karte bauen", done - no FTP, no command line tool.
The panel sits on the setup page while no map exists and under the map as
"Karte neu bauen" afterwards.

The tiles are cut in the browser and only the finished 256px JPEGs are
uploaded. That is the point: on ordinary shared hosting a 50MB map image
runs into upload_max_filesize, cutting it server side runs into memory_limit
and max_execution_time, and GD is not installed everywhere. This way the
server needs none of it - it validates small JPEGs and stores them.

Uploads go into a side folder <key>__build that only replaces the live map
once every tile has arrived, so an abort - by button, by error or by closing
the browser - leaves the existing map untouched.

The server trusts nothing from the client: the key must match a strict
pattern, tile coordinates must lie inside 2^z on their level, and each file
is checked with getimagesize for an actual JPEG within a size limit before it
is stored.

Verified against tools/make_map_tiles.php on the same source image: same zoom
levels, same per-level tile counts (1/4/12/40), same tile names, same
manifest.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 14:57:11 +02:00
Maaxxs
4e414cba63 Karte: screenshot stitcher and sharper tiles
Adds tools/stitch_map_screenshots.py, which assembles overlapping in-game
map screenshots into one large image. How far the map can be zoomed in
sharply depends only on the source resolution - the tiler stops at 1:1 - so
the way to a sharp map is capturing a grid of screenshots at maximum in-game
zoom rather than one full-map screenshot.

Offsets are found by FFT phase correlation and verified by the normalised
cross correlation of the actual overlap, so filename order does not matter.
Because phase correlation is cyclic, both readings of every peak are tried
per axis - shifts beyond half the image width are the normal case at 35%
overlap. Overlaps are composited by nearest image centre, which keeps seams
away from the frame edges without the blur of feathering. Verified against a
reference image: 12 shuffled screenshots with UI bands reassemble
pixel-identically.

Sharpness on the website side: the tile layer now uses detectRetina, so
high-density displays get the next tile level drawn at half size instead of
an upscaled, blurry top level. Default JPEG quality raised from 82 to 88,
which suits map labels better.

The GD check in make_map_tiles.php now reports the loaded php.ini, the
extension_dir and the exact lines to add - a stock Windows/scoop PHP loads no
php.ini at all, so the previous one-line error left no way forward.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 13:56:28 +02:00
Maaxxs
6b5661dd53 Karte: tactical map tab with own markers and tactic layers
New "Karte" tab: a tiled zoom/pan map of the game world with a category
sidebar (groups, per-category marker counts, show all / hide all, search)
and marker popups, plus tactic layers drawn on top of it.

Markers are placed by clicking the map (map.manage) and live in freely
editable two-level categories, each with its own emoji and colour. A tactic
(map.tactics) is a separate drawing layer that can be toggled on and off:
rally points, dashed routes, areas and text notes in any colour, finished by
double click, an explicit button or Enter, removed by clicking them.

Coordinates are stored as a fraction of the map's width/height rather than
in pixels, so re-tiling the map at a different resolution never moves
anything.

The map data lives entirely in the website database - the Discord bot is not
involved. tools/make_map_tiles.php slices a high-resolution image into the
zoom pyramid locally; the resulting folder is uploaded by FTP and picked up
automatically, one region per folder. Leaflet 1.9.4 is vendored under
assets/vendor/ so there is still no CDN and no build step.

New permissions map.view / map.manage / map.tactics and four new tables -
existing installs have to add both once (see README).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 13:25:12 +02:00
Maaxxs
300dae4263 Events: new tab for the bot's scheduled event reminders
Mirrors the bot's event planner (/event_planen, /event_liste) on the
website: list all scheduled reminders with a filter for recurring/one-off,
create, edit and delete them. Both sides talk to the same bot database, so
a reminder scheduled in Discord shows up here right away and vice versa -
sending stays with the bot's background job.

Channel and role are real dropdowns pulled from the Discord server instead
of raw IDs (channels the bot cannot post in are disabled), and the form
shows a live preview of the later Discord message, like the bot does before
scheduling. The timestamp is sent as "TT.MM.JJJJ HH:MM" and converted on
the bot side, exactly like the raids, so both ends use the same timezone.

New permissions events.view / events.manage - existing installs have to
add and assign them once under Berechtigungsgruppen.

Needs the matching bot-side API additions (PATCH /api/events/{id},
GET /api/guilds/{id}/channels and /roles, next_run_raw on POST /api/events,
channel/role names in the event list), which live in the separate bot repo.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 12:40:56 +02:00
Maaxxs
c720b0173d Reports: replace the table with a styled card list
The dense table row (avatar, name, time, reason/evidence, badges,
actions all crammed into one baseline-misaligned line) is now a
stacked list of report cards, matching the panel/avatar-chip language
used elsewhere on the site: a colored left border for quick status
scanning (green = active, muted = archived, gold on hover with a
slight lift), a header row with a 40px avatar and reporter subtitle,
reason/evidence in their own section, and a footer row for the
incident timestamp and the archive/delete actions.

Verified the user-filter dropdown still layers correctly above the new
cards, since each card now also uses backdrop-filter (same stacking-
context concern fixed previously via .panel-filter-bar's z-index).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 02:56:32 +02:00
Maaxxs
6333e0533d Reports: rebuild the user filter as a custom dropdown with avatars
Native <select> cannot show per-option avatars or custom styling in the
popup list, so this replaces it with a button+panel component matching
the site's existing modal/picker language: trigger shows the current
selection (avatar + name, or a generic users icon for "all"), the
panel lists every reported user with their avatar, a gold highlight and
checkmark on the active one, opens/closes with a fade+scale animation,
and closes on outside click or Escape.

Fixed two bugs found while building it: the trigger button picked up
the generic button:hover gold fill (same class-vs-button:hover
specificity gap as .icon-button elsewhere), and the panel was rendering
behind the next .panel because that sibling's backdrop-filter creates
its own stacking context that traps z-index descendants - fixed by
giving the filter bar's own .panel a raised z-index of its own.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 02:50:57 +02:00
Maaxxs
c3f2f61d3e Reports: replace free-text filter with a dropdown of reported users
Builds a deduplicated, alphabetically sorted list of reported users
from the currently status-filtered reports and renders it as a
<select>. Filtering is now an exact match on reported_id (via a
data-reported-id attribute per row) instead of substring matching
against lowercased names, so it no longer also matches on the
reporter's name.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 02:44:12 +02:00
Maaxxs
5a2ff73836 Reports: add a live filter by reported/reporter user
A text input above the table filters rows client-side as you type,
matching against both the reported and the reporter name (each row
carries lowercased data-reported-name/data-reporter-name attributes).
Shows a "no matches" message when the filter empties the table. Also
consolidated the previously duplicated reports.js <script> include into
a single unconditional one at the bottom of the page, since the filter
needs it regardless of reports.manage permission.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 02:41:09 +02:00
Maaxxs
828befceb1 Show success flashes as a centered popup with an animated checkmark
Only the "success" flash type moves to the new popup (a self-dismissing
centered overlay with an SVG checkmark that draws itself in, closes
automatically after ~2.8s or on click). Error/other flash types keep
the existing top banner, since those usually carry details worth
reading rather than a quick confirmation. header.php now splits
get_flashes() once into success vs. other so both the logged-in and
guest layouts pick up the same split.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 02:32:23 +02:00
Maaxxs
8588c2fd58 Reports: exclude roles from auto-mute; wire up new landscape backgrounds
Adds a per-role opt-out from the auto-mute mechanic (e.g. Gildenleitung):
members with an excluded role keep accumulating report points normally,
but the timeout itself is skipped, same as the existing server-owner
exemption. Configured the same way as the point weighting - a list of
currently-excluded roles plus a green "+ Rolle ausschliessen" popup for
adding more. Split reports.js into two independently-guarded modal
initializers so the weights and exclusions popups do not depend on each
other being present.

Also wires in the 7 new landscape images as page backgrounds
(web-optimized JPEGs generated via Pillow): raids gets landscape6 as
requested, and the rest are split out for Premades, Mitglieder,
Berechtigungsgruppen, Reports and the logged-out login/homepage view,
which previously had no themed background at all.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 02:27:37 +02:00
Maaxxs
ed4116414f Reports: two-step popup for adding role weights instead of a full list
Roles at the default weight (1) are no longer listed - only roles with
an explicit, non-default point value show up, each editable/removable
inline. A new green "+ Rolle hinzufuegen" button opens a two-step popup:
pick one or more still-unconfigured roles, then set a single point
value applied to all of them at once (new report_action.php action
add_weights). Fixed two CSS specificity bugs while building this
(input[type=text] beating a plain class on width, and the generic
form{flex-direction:column} rule leaking into the inline edit row).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 02:15:09 +02:00
Maaxxs
c8a1748ae5 Raids: use a real date/time picker instead of a free-text field
The "Datum & Uhrzeit" input in raid create/edit is now
<input type="datetime-local">, styled to match the dark theme. The
backend still expects "TT.MM.JJJJ HH:MM" (the Discord bot parses it
verbatim), so raids.js converts the picker's value to that format via a
plain string reshuffle (no Date object, so no timezone drift) before
posting it as date_raw. The edit form prefills the picker from the
raid's existing timestamp.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 01:42:53 +02:00
Maaxxs
1fb6a5fabd Nav: group sidebar links, add mobile slide-out drawer
Sidebar now separates Dashboard/Mein Profil/Mitglieder from Raids/
Premades with a thin divider, keeping the existing Admin section as its
own group below. On narrow screens the sidebar no longer collapses into
a horizontal icon strip - it becomes a full off-canvas drawer (same
layout and labels as desktop) toggled by a hamburger button in a new
mobile top bar, with a backdrop and Escape/backdrop-click/link-click to
close (assets/js/nav.js).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 01:37:12 +02:00
Maaxxs
8d82065220 Premades: bigger class icons, distinct class-action design
Member class icons were too small to read - bumped from 14px to 20px.
The own-class action tile no longer reuses the angled member-card shape
(clip-path border trick); it is now a plain rounded button with a gold
dashed outline so it reads as an action, not another roster slot.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 01:25:29 +02:00
Maaxxs
89ba2ebb35 Premades: move class action out of member cards into own grid slot
The own class control no longer sits inside the lead/member card. It now
renders as a dedicated 6th roster-grid tile (the cell left free next to
slot 5) showing the current class icon and a Festlegen/Aendern label,
opening the same class-picker popup as before.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 01:10:44 +02:00
Maaxxs
2d3a3562c2 Premades: replace inline invite/class selects with popup modals
Invite now opens a member-list popup instead of an inline auto-submit
select, and class selection reuses the raid-signup modal's class-picker
grid, triggered via a "Klasse festlegen/ändern" button.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 01:05:15 +02:00
Maaxxs
f8d4d21fed Add a mobile-friendly move dropdown alongside raid editor drag&drop
Native HTML5 drag&drop doesn't work on touch devices at all, so
moving players between groups in editor mode was effectively unusable
on mobile. Each signup item now also gets a compact <select> (built
from the same data-groups/data-locked-groups already used for the
signup modal) that moves the player on change - works via tap on
mobile and click on desktop, and excludes locked groups as targets
except the player's own current one.

Extracted the shared move logic (API call + DOM patch for counts/
empty-state/header badge) from the drag&drop drop handler into
moveSignupTo(), reused by both the drop handler and the new dropdown
instead of duplicating it.

The select is hidden outside editor mode and switches to a full-width
row below the name under 480px so it's easier to tap; verified via a
local preview at both desktop and mobile (375px) viewport sizes,
including that locked groups are correctly excluded from the options.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19 13:58:22 +02:00
Maaxxs
40d8bec259 Add raid creation from the website and handle auto-repost on save
The bot API now lets the website create raids without knowing a
Discord channel: POST /api/raids accepts guild_id and resolves the
target channel via the server's /set_raidchannel default. Adds a
"+ Neuer Raid" panel on raids.php (raids.manage only) with the same
title/date/max slots/gearscore grid and requirements textarea as the
edit form, plus the group-name row editor reused without its lock
toggle (data-locks="0" on .group-editor, since creation doesn't
support locked_groups) - one shared component instead of a second
implementation. Needs raids_api.guild_id in config.php, documented in
README.md.

Also updates the editor's "Speichern" flow for the API's other
change: PATCH /api/raids/{id} now auto-reposts the Discord message
(via sync_raid_message) if it was deleted manually, returning the new
raid_id. update_raid() now returns the API response instead of
discarding it, and raid_edit_action.php surfaces a distinct message
when the id changed - the page reload right after already picks up
the new id either way, since it re-fetches the raid list fresh.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19 08:09:20 +02:00
Maaxxs
b5fec1d3c7 Redesign raid group editor and keep editor mode open while dragging
Two changes to the raid editor (raids.php/raids.js):

- Moving a member via drag&drop no longer reloads the page. It now
  patches the DOM in place (moves the list item, updates each
  group's member count/empty-state, and adjusts the header's
  "X / Y angemeldet" badge when bench vs. a real group is involved),
  so the editor panel stays open and multiple members can be
  reshuffled without re-entering edit mode each time. The form's own
  "Speichern" still reloads on success, since that's the point where
  the edit is actually committed.
- Replaces the single comma-separated "Gruppennamen" text field and
  the separate "Gruppen sperren" checkbox grid with one row per
  group (name input + inline lock toggle + remove button), plus a
  "+ Gruppe hinzufügen" button to append a new row. Group names and
  locked_groups are now read from these rows on submit instead of
  parsing a comma-separated string.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19 07:47:02 +02:00
Maaxxs
5f64c6fe75 Block moving members into locked groups in the raid editor
Drag&drop moves and the underlying raid_move_action.php had no idea
about locked_groups, so an admin could still drag a member into a
group that was explicitly locked. Locked drop zones are now flagged
in the markup, the frontend refuses the drag/drop, and the endpoint
rejects the move server-side as well.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19 07:12:34 +02:00
Maaxxs
73b670a305 Block joining locked groups and fall back to the bench when none are open
The Wunschgruppe picker let members select a locked group, and the
signup endpoint didn't check locked_groups at all, so the wish could
still go through. Locked groups are now passed to the frontend and
rendered disabled with a lock icon, and the server rejects a locked
group the same way it already rejects a role-capped one. When every
group is locked (or the raid has none), the signup is now assigned
straight to the Ersatzbank instead of relying on the bot's own
auto-assign to skip locked groups.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19 06:57:45 +02:00
Maaxxs
5c28cb5735 Fix signup modal showing on load and switch group picker to buttons
.modal-overlay set display:flex unconditionally, which beats the
browser's default [hidden] { display: none } since author styles
always win over the UA stylesheet - so the popup was visible on every
page load regardless of the hidden attribute. Now display is none by
default and only :not([hidden]) switches to flex.

Also: class picker was auto-fill grid producing an uneven 3/3/2 layout
for 8 classes - now a fixed 4x2 grid (2x4 on narrow screens). Group
selection is no longer a <select>, but the same pill-button pattern as
the class picker (Automatisch/group names/Ersatzbank), built by JS to
match the class picker's look.

Verified via screenshots: modal closed by default, opens only via
button click, uniform icon grid, group pills render and highlight
correctly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 18:46:17 +02:00
Maaxxs
fea0cc3a91 Overhaul raid signup/management to match the Discord bot's full feature set
Signup is now a single "Anmelden" button that opens a class-icon
picker + optional group choice. A new raid_wish_is_sensible() mirrors
the bot's exact role-cap algorithm (Tank/Heal 1, DPS 3 per 5-player
group, ROLE_MAPPING copied from teamplaner.py) to decide server-side
whether the requested group is honored or the request falls back to
the bot's own auto-assignment - with a message telling the member to
ping the raid lead if they wanted something specific. Verified the
cap logic with 7 synthetic cases (own-signup exclusion, full group,
role caps, bench always allowed) before wiring it up.

Admins get a per-raid edit-mode toggle (pencil icon) that reveals:
inline raid editing (title/date/requirements/gearscore/groups/slots/
group locks) via PATCH, a premade-invite mini-form via the new
premades endpoint, and native HTML5 drag-and-drop to move a signup
between groups/bench via PATCH .../signup/{user_id}.

New pieces: includes/raids_api.php gained move_signup(), update_raid(),
invite_premade(), fetch_premades(), fetch_raid_by_id() and the wish-
sensibility check; four new JSON action endpoints (raid_signup_action,
raid_move_action, raid_edit_action, raid_premade_invite_action) reusing
the session CSRF token via a new verify_csrf_token()/read_json_body()/
json_response() trio in functions.php; assets/js/raids.js drives the
modal, edit-mode, and drag-and-drop with plain fetch() (no framework).

Read-heavy parts (page render, class icons, signup-wish logic) verified
against real data/live API. Edit, move and premade-invite are NOT
tested against the live API yet since they'd mutate the real raid or
send real Discord DMs to guild members - flagging this for a
supervised live check before considering it fully verified.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 18:36:04 +02:00