Skip to content

Commit

Permalink
fix: new users not receiving default stylesheet defined in config
Browse files Browse the repository at this point in the history
  • Loading branch information
Roardom committed Aug 28, 2024
1 parent f3c21c8 commit ed8aae9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion resources/views/layout/default.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="{{ auth()->user()->locale }}">
<html lang="{{ auth()->user()->settings?->locale ?? config('app.locale') }}">
<head>
@include('partials.head')
</head>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/partials/head.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@if (auth()->user()->settings?->standalone_css === null)
@vite('resources/sass/main.scss')

@switch(auth()->user()->settings?->style)
@switch(auth()->user()->settings?->style ?? config('other.default_style', 0))
@case(0)
@vite('resources/sass/themes/_light.scss')

Expand Down
32 changes: 16 additions & 16 deletions resources/views/user/general_setting/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class="form"
<option
class="form__option"
value="{{ $code }}"
@selected(($user->settings === null && $code === config('app.locale')) || $user->settings?->locale === $code)
@selected($user->settings?->locale ?? config('app.locale') === $code)
>
{{ $name }}
</option>
Expand All @@ -55,105 +55,105 @@ class="form__option"
<option
class="form__option"
value="0"
@selected($user->settings === null || $user->settings?->style === 0)
@selected($user->settings?->style ?? config('other.default_style', 0) === 0)
>
Light
</option>
<option
class="form__option"
value="1"
@selected($user->settings?->style === 1)
@selected($user->settings?->style ?? config('other.default_style', 0) === 1)
>
Galactic
</option>
<option
class="form__option"
value="2"
@selected($user->settings?->style === 2)
@selected($user->settings?->style ?? config('other.default_style', 0) === 2)
>
Dark Blue
</option>
<option
class="form__option"
value="3"
@selected($user->settings?->style === 3)
@selected($user->settings?->style ?? config('other.default_style', 0) === 3)
>
Dark Green
</option>
<option
class="form__option"
value="4"
@selected($user->settings?->style === 4)
@selected($user->settings?->style ?? config('other.default_style', 0) === 4)
>
Dark Pink
</option>
<option
class="form__option"
value="5"
@selected($user->settings?->style === 5)
@selected($user->settings?->style ?? config('other.default_style', 0) === 5)
>
Dark Purple
</option>
<option
class="form__option"
value="6"
@selected($user->settings?->style === 6)
@selected($user->settings?->style ?? config('other.default_style', 0) === 6)
>
Dark Red
</option>
<option
class="form__option"
value="7"
@selected($user->settings?->style === 7)
@selected($user->settings?->style ?? config('other.default_style', 0) === 7)
>
Dark Teal
</option>
<option
class="form__option"
value="8"
@selected($user->settings?->style === 8)
@selected($user->settings?->style ?? config('other.default_style', 0) === 8)
>
Dark Yellow
</option>
<option
class="form__option"
value="9"
@selected($user->settings?->style === 9)
@selected($user->settings?->style ?? config('other.default_style', 0) === 9)
>
Cosmic Void
</option>
<option
class="form__option"
value="10"
@selected($user->settings?->style === 10)
@selected($user->settings?->style ?? config('other.default_style', 0) === 10)
>
Nord
</option>
<option
class="form__option"
value="11"
@selected($user->settings?->style === 11)
@selected($user->settings?->style ?? config('other.default_style', 0) === 11)
>
Revel (Desktop only)
</option>
<option
class="form__option"
value="12"
@selected($user->settings?->style === 12)
@selected($user->settings?->style ?? config('other.default_style', 0) === 12)
>
Material Design 3 Light
</option>
<option
class="form__option"
value="13"
@selected($user->settings?->style === 13)
@selected($user->settings?->style ?? config('other.default_style', 0) === 13)
>
Material Design 3 Dark
</option>
<option
class="form__option"
value="14"
@selected($user->settings?->style === 14)
@selected($user->settings?->style ?? config('other.default_style', 0) === 14)
>
Material Design 3 Amoled
</option>
Expand Down

0 comments on commit ed8aae9

Please sign in to comment.