diff --git a/app/Models/TeamMember.php b/app/Models/TeamMember.php index d2510426fa1..84030ee2257 100644 --- a/app/Models/TeamMember.php +++ b/app/Models/TeamMember.php @@ -24,4 +24,13 @@ public function user(): BelongsTo { return $this->belongsTo(User::class, 'user_id'); } + + public function userOrDeleted(): User + { + $user = $this->user; + + return $user === null || $user->isRestricted() + ? new DeletedUser(['user_id' => $this->user_id]) + : $user; + } } diff --git a/app/Models/User.php b/app/Models/User.php index 737b66a56e6..dcee75bbedc 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -2128,8 +2128,10 @@ public static function attemptLogin($user, $password, $ip = null) public static function findForLogin($username, $allowEmail = false) { - if (!present($username)) { - return; + $username = trim($username ?? ''); + + if ($username === null) { + return null; } $query = static::where('username', $username); diff --git a/resources/css/bem/input-text.less b/resources/css/bem/input-text.less index 26555c9fd3d..c809fe8db09 100644 --- a/resources/css/bem/input-text.less +++ b/resources/css/bem/input-text.less @@ -10,4 +10,16 @@ padding: var(--input-padding); box-shadow: inset 0 0 0 2px var(--input-border-colour); border-radius: @border-radius-large; + + &--bbcode { + .fancy-scrollbar(); + display: grid; + grid-template-rows: 1fr auto; + gap: 5px; + } + + &__bbcode-textarea { + .reset-input(); + resize: none; + } } diff --git a/resources/css/bem/team-settings-description-preview.less b/resources/css/bem/team-settings-description-preview.less index f1c0b8481b2..2e78b7b8d33 100644 --- a/resources/css/bem/team-settings-description-preview.less +++ b/resources/css/bem/team-settings-description-preview.less @@ -4,5 +4,5 @@ .team-settings-description-preview { padding: 0 var(--padding); overflow-y: scroll; - max-height: calc(70 * var(--vh)); + height: calc(70 * var(--vh)); } diff --git a/resources/views/teams/edit.blade.php b/resources/views/teams/edit.blade.php index 7dd5a31fdec..91c57089f74 100644 --- a/resources/views/teams/edit.blade.php +++ b/resources/views/teams/edit.blade.php @@ -149,10 +149,13 @@ class="team-settings__image" {{ osu_trans('teams.edit.description.label') }} - +