]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Improve admin message seen/dismiss state. (#26223)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Thu, 21 Mar 2024 15:15:46 +0000 (16:15 +0100)
committerGitHub <noreply@github.com>
Thu, 21 Mar 2024 15:15:46 +0000 (16:15 +0100)
commitd776c4b392a082dba7539d77cfa20fc904ed4091
tree5be9a78e553c47bc15e6d5e4198553ab6ac68bdf
parentf87480dd3692f6aa6fda17043446eca14383e736
Improve admin message seen/dismiss state. (#26223)

Fixes #26211

Admin messages now have separate "seen" and "dismissed" fields. The idea is that an admin should be able to tell whether a user pressed the "dismiss for now" button. Instead of using "seen" as "show this message to players when they join", "dismissed" is now used for this.

Existing notes in the database will automatically be marked as dismissed on migration. A note cannot be dismissed without being seen (enforced via constraint in the database too, aren't I fancy).

As part of this, it has become impossible for a player to play without dismissing the message in some form. Instead of a shitty popup window, the popup is now a fullscreen overlay that blocks clicks behind it, making the game unplayable. Also, if a user somehow has multiple messages they will be combined into one popup.

Also I had enough respect for the codebase to make it look better and clean up the code somewhat. Yippee.
21 files changed:
Content.Client/Administration/UI/AdminRemarks/AdminMessageEui.cs
Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupMessage.xaml [new file with mode: 0644]
Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupMessage.xaml.cs [new file with mode: 0644]
Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml
Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml.cs
Content.Server.Database/Migrations/Postgres/20240318022005_AdminMessageDismiss.Designer.cs [new file with mode: 0644]
Content.Server.Database/Migrations/Postgres/20240318022005_AdminMessageDismiss.cs [new file with mode: 0644]
Content.Server.Database/Migrations/Postgres/PostgresServerDbContextModelSnapshot.cs
Content.Server.Database/Migrations/Sqlite/20240318021959_AdminMessageDismiss.Designer.cs [new file with mode: 0644]
Content.Server.Database/Migrations/Sqlite/20240318021959_AdminMessageDismiss.cs [new file with mode: 0644]
Content.Server.Database/Migrations/Sqlite/SqliteServerDbContextModelSnapshot.cs
Content.Server.Database/Model.cs
Content.Server/Administration/Notes/AdminMessageEui.cs
Content.Server/Administration/Notes/AdminNotesManager.cs
Content.Server/Administration/Notes/AdminNotesSystem.cs
Content.Server/Administration/Notes/IAdminNotesManager.cs
Content.Server/Database/DatabaseRecords.cs
Content.Server/Database/ServerDbBase.cs
Content.Server/Database/ServerDbManager.cs
Content.Shared/Administration/Notes/AdminMessageEuiState.cs
Resources/Locale/en-US/administration/ui/admin-notes.ftl