diff --git a/resources/css/bem/team-action-button.less b/resources/css/bem/team-action-button.less index bb0712b5cc3..9655f5c63cf 100644 --- a/resources/css/bem/team-action-button.less +++ b/resources/css/bem/team-action-button.less @@ -24,6 +24,11 @@ background: var(--bg-hover); } + &--disabled { + pointer-events: none; + opacity: 0.7; + } + &--part { --bg: hsl(var(--hsl-red-3)); --bg-hover: hsl(var(--hsl-red-2)); diff --git a/resources/css/bem/team-settings.less b/resources/css/bem/team-settings.less index d8df6d1fcee..407ad8c3e4a 100644 --- a/resources/css/bem/team-settings.less +++ b/resources/css/bem/team-settings.less @@ -5,6 +5,11 @@ display: grid; gap: 5px; + &__buttons { + display: flex; + gap: 10px; + } + &__description-preview { --padding: 10px; padding: var(--padding) 0; diff --git a/resources/views/teams/edit.blade.php b/resources/views/teams/edit.blade.php index 91c57089f74..e6a3111ed03 100644 --- a/resources/views/teams/edit.blade.php +++ b/resources/views/teams/edit.blade.php @@ -172,15 +172,23 @@ class="input-text__bbcode-textarea js-post-preview--auto js-bbcode-body"
+ + {{ osu_trans('teams.show.bar.destroy') }} + +
+ + - -
diff --git a/resources/views/teams/show.blade.php b/resources/views/teams/show.blade.php index ae9e5927d8e..fa9ecfc8358 100644 --- a/resources/views/teams/show.blade.php +++ b/resources/views/teams/show.blade.php @@ -13,14 +13,6 @@ $teamMembers['member'] ??= []; $teamMembers['leader'] ??= $toJson([$team->members()->make(['user_id' => $team->leader_id])->userOrDeleted()]); $headerUrl = $team->header()->url(); - - $buttons = new Ds\Set(); - if (priv_check('TeamPart', $team)->can()) { - $buttons->add('part'); - } - if (priv_check('TeamUpdate', $team)->can()) { - $buttons->add('destroy'); - } @endphp @extends('master', [ @@ -77,31 +69,27 @@ class="btn-circle btn-circle--page-toggle"
- @if (!$buttons->isEmpty()) + @if (Auth::user()?->team?->getKey() === $team->getKey())
- @if ($buttons->contains('destroy')) -
- - -
- @endif - @if ($buttons->contains('part')) -
can(); + @endphp + + -
- @endif + {{ osu_trans('teams.show.bar.part') }} + +
@endif