mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-18 14:07:53 +03:00
## Mirror of PR #26223: [Improve admin message seen/dismiss state.](https://github.com/space-wizards/space-station-14/pull/26223) from <img src="https://avatars.githubusercontent.com/u/10567778?v=4" alt="space-wizards" width="22"/> [space-wizards](https://github.com/space-wizards)/[space-station-14](https://github.com/space-wizards/space-station-14) ###### `d776c4b392a082dba7539d77cfa20fc904ed4091` PR opened by <img src="https://avatars.githubusercontent.com/u/8107459?v=4" width="16"/><a href="https://github.com/PJB3005"> PJB3005</a> at 2024-03-18 04:02:20 UTC --- PR changed 21 files with 3748 additions and 108 deletions. The PR had the following labels: - Changes: UI - Status: Needs Review --- <details open="true"><summary><h1>Original Body</h1></summary> > 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. > > ## About the PR > 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. > > ## Why / Balance > Fixes #26211 > > ## Technical details > 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). > > ## Media > - [X] I have added screenshots/videos to this PR showcasing its changes ingame, **or** this PR does not require an ingame showcase > >  > >  > > **Changelog** > <!-- > Make players aware of new features and changes that could affect how they play the game by adding a Changelog entry. Please read the Changelog guidelines located at: https://docs.spacestation14.io/en/getting-started/pr-guideline#changelog > --> > > 🆑 > ADMIN: > - tweak: Admin messages are now shown as "seen" even if the player dismisses them only temporarily. Also, it is impossible for players to play without dismissing the message (temporary or permanent). </details> Co-authored-by: SimpleStation14 <Unknown>
37 lines
1.6 KiB
XML
37 lines
1.6 KiB
XML
<Control xmlns="https://spacestation14.io"
|
|
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client">
|
|
<PanelContainer MouseFilter="Stop">
|
|
<PanelContainer.PanelOverride>
|
|
<!-- semi-transparent background -->
|
|
<gfx:StyleBoxFlat BackgroundColor="#000000AA" />
|
|
</PanelContainer.PanelOverride>
|
|
|
|
<Control HorizontalAlignment="Center" VerticalAlignment="Center" MaxWidth="600">
|
|
<PanelContainer StyleClasses="AngleRect" />
|
|
|
|
<BoxContainer Orientation="Vertical" Margin="4">
|
|
<RichTextLabel Name="Description" />
|
|
|
|
<!-- Contains actual messages -->
|
|
<ScrollContainer HScrollEnabled="False" Margin="4" VerticalExpand="True" ReturnMeasure="True" MaxHeight="400">
|
|
<BoxContainer Orientation="Vertical" Name="MessageContainer" Margin="0 2 0 0" />
|
|
</ScrollContainer>
|
|
|
|
<Label Name="WaitLabel" />
|
|
<BoxContainer Orientation="Horizontal">
|
|
<Button Name="DismissButton"
|
|
Text="{Loc 'admin-notes-message-dismiss'}"
|
|
Disabled="True"
|
|
HorizontalExpand="True"
|
|
StyleClasses="OpenRight" />
|
|
<Button Name="AcceptButton"
|
|
Text="{Loc 'admin-notes-message-accept'}"
|
|
Disabled="True"
|
|
HorizontalExpand="True"
|
|
StyleClasses="OpenLeft" />
|
|
</BoxContainer>
|
|
</BoxContainer>
|
|
</Control>
|
|
</PanelContainer>
|
|
</Control>
|