[frontend/components] Revert: "Fix note z-indexes"

This reverts commit b9b19b44af.
This commit is contained in:
Laura Hausmann 2025-03-24 13:17:34 +01:00
parent cd0149cfeb
commit b950cb716f
No known key found for this signature in database
GPG key ID: D044E84C5BE01605
3 changed files with 45 additions and 54 deletions

View file

@ -45,7 +45,7 @@
} }
.truncate-btn { .truncate-btn {
z-index: 1; z-index: 5;
width: 100%; width: 100%;
margin-top: 0.5em; margin-top: 0.5em;
background-color: var(--background-color); background-color: var(--background-color);

View file

@ -86,54 +86,54 @@
</button> </button>
<button @ref="MenuButton" class="btn" @onclick="ToggleMenu" @onclick:stopPropagation="true" aria-label="more"> <button @ref="MenuButton" class="btn" @onclick="ToggleMenu" @onclick:stopPropagation="true" aria-label="more">
<Icon Name="Icons.DotsThreeOutline" Size="1.3em"/> <Icon Name="Icons.DotsThreeOutline" Size="1.3em"/>
</button> <Menu @ref="ContextMenu">
<Menu @ref="ContextMenu"> @if (Note.User.Id != Session.Current?.Id)
@if (Note.User.Id != Session.Current?.Id) {
{ <MenuElement Icon="Icons.Tooth" OnSelect="Bite">
<MenuElement Icon="Icons.Tooth" OnSelect="Bite"> <Text>@Loc["Bite"]</Text>
<Text>@Loc["Bite"]</Text> </MenuElement>
}
@if (Note.User.Host != null)
{
<MenuElement Icon="Icons.ArrowsClockwise" OnSelect="RefetchNote">
<Text>@Loc["Refetch"]</Text>
</MenuElement>
}
<MenuElement Icon="Icons.SpeakerX" OnSelect="Mute">
<Text>@Loc["Mute thread"]</Text>
</MenuElement> </MenuElement>
}
@if (Note.User.Host != null)
{
<MenuElement Icon="Icons.ArrowsClockwise" OnSelect="RefetchNote">
<Text>@Loc["Refetch"]</Text>
</MenuElement>
}
<MenuElement Icon="Icons.SpeakerX" OnSelect="Mute">
<Text>@Loc["Mute thread"]</Text>
</MenuElement>
<hr class="rule"/>
<MenuElement Icon="Icons.ArrowSquareOut" OnSelect="OpenOriginal">
<Text>@Loc["Open original page"]</Text>
</MenuElement>
<MenuElement Icon="Icons.Share" OnSelect="CopyLink">
<Text>@Loc["Copy link"]</Text>
</MenuElement>
@if (Note.User.Host != null)
{
<MenuElement Icon="Icons.ShareNetwork" OnSelect="CopyLinkRemote">
<Text>@Loc["Copy link (remote)"]</Text>
</MenuElement>
}
@if (!string.IsNullOrWhiteSpace(Note.Text))
{
<MenuElement Icon="Icons.Copy" OnSelect="CopyContents">
<Text>@Loc["Copy contents"]</Text>
</MenuElement>
}
@if (Note.User.Id == Session.Current?.Id)
{
<hr class="rule"/> <hr class="rule"/>
<MenuElement Icon="Icons.Eraser" OnSelect="Redraft" Danger> <MenuElement Icon="Icons.ArrowSquareOut" OnSelect="OpenOriginal">
<Text>@Loc["Delete & redraft"]</Text> <Text>@Loc["Open original page"]</Text>
</MenuElement> </MenuElement>
<MenuElement Icon="Icons.Trash" OnSelect="Delete" Danger> <MenuElement Icon="Icons.Share" OnSelect="CopyLink">
<Text>@Loc["Delete"]</Text> <Text>@Loc["Copy link"]</Text>
</MenuElement> </MenuElement>
} @if (Note.User.Host != null)
<ClosingBackdrop OnClose="ContextMenu.Close"></ClosingBackdrop> {
</Menu> <MenuElement Icon="Icons.ShareNetwork" OnSelect="CopyLinkRemote">
<Text>@Loc["Copy link (remote)"]</Text>
</MenuElement>
}
@if (!string.IsNullOrWhiteSpace(Note.Text))
{
<MenuElement Icon="Icons.Copy" OnSelect="CopyContents">
<Text>@Loc["Copy contents"]</Text>
</MenuElement>
}
@if (Note.User.Id == Session.Current?.Id)
{
<hr class="rule"/>
<MenuElement Icon="Icons.Eraser" OnSelect="Redraft" Danger>
<Text>@Loc["Delete & redraft"]</Text>
</MenuElement>
<MenuElement Icon="Icons.Trash" OnSelect="Delete" Danger>
<Text>@Loc["Delete"]</Text>
</MenuElement>
}
<ClosingBackdrop OnClose="ContextMenu.Close"></ClosingBackdrop>
</Menu>
</button>
</div> </div>
@code { @code {

View file

@ -10,19 +10,11 @@
margin-bottom: 0.5em; margin-bottom: 0.5em;
} }
::deep {
.reactions .reaction {
position: relative;
z-index: +1;
}
}
.indent { .indent {
padding-left: 0.75em; padding-left: 0.75em;
} }
.btn { .btn {
position: relative;
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
min-width: 2.5em; min-width: 2.5em;
@ -31,7 +23,6 @@
background-color: var(--foreground-color); background-color: var(--foreground-color);
border: 0.1rem solid var(--foreground-color); border: 0.1rem solid var(--foreground-color);
width: fit-content; width: fit-content;
z-index: +1;
} }
.btn:hover { .btn:hover {