Skip to content

Commit

Permalink
Use vue-based main application layout
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcage committed Mar 24, 2024
1 parent cbb687b commit 0621cb0
Show file tree
Hide file tree
Showing 50 changed files with 356 additions and 1,264 deletions.
1 change: 1 addition & 0 deletions app/Http/Controllers/Settings/API/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ public function list(): JsonResponse
{
return response()
->json([
'branding.signet_file' => Setting::has('branding.signet_file') ? Storage::url(Setting::get('branding.signet_file')) : null,
'accounting.transactions.currency' => Setting::get('accounting.transactions.currency'),
'accounting.transactions.use_locations' => filter_var(Setting::get('accounting.transactions.use_locations', false), FILTER_VALIDATE_BOOLEAN),
'accounting.transactions.use_secondary_categories' => filter_var(Setting::get('accounting.transactions.use_secondary_categories', false), FILTER_VALIDATE_BOOLEAN),
Expand Down
12 changes: 12 additions & 0 deletions app/Http/Controllers/UserManagement/API/UserProfileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@

class UserProfileController extends Controller
{
public function authenticatedUser(): JsonResponse
{
$user = Auth::user();

return response()
->json($user !== null ? [
'id' => $user->id,
'name' => $user->name,
'avatar_url' => $user->avatarUrl(),
] : null);
}

public function index(): JsonResponse
{
$user = Auth::user()->load('roles');
Expand Down
38 changes: 0 additions & 38 deletions app/Http/Controllers/UserManagement/UserController.php

This file was deleted.

21 changes: 0 additions & 21 deletions app/Http/ViewComposers/NavigationComposer.php

This file was deleted.

4 changes: 2 additions & 2 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ public function permissions(): Collection
->values();
}

public function avatarUrl(?int $size = null): string
public function avatarUrl(): ?string
{
if (blank($this->avatar)) {
return route('users.avatar', [$this, 'size' => $size]);
return null;
}

if (filter_var($this->avatar, FILTER_VALIDATE_URL)) {
Expand Down
30 changes: 0 additions & 30 deletions app/Navigation/Drawer/Accounting/AccountingNavigationItem.php

This file was deleted.

25 changes: 0 additions & 25 deletions app/Navigation/Drawer/Badges/BadgesNavigationItem.php

This file was deleted.

60 changes: 0 additions & 60 deletions app/Navigation/Drawer/BaseNavigationItem.php

This file was deleted.

This file was deleted.

24 changes: 0 additions & 24 deletions app/Navigation/Drawer/Fundraising/FundraisingNavigationItem.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Navigation/Drawer/HomeNavigationItem.php

This file was deleted.

16 changes: 0 additions & 16 deletions app/Navigation/Drawer/NavigationItem.php

This file was deleted.

24 changes: 0 additions & 24 deletions app/Navigation/Drawer/ReportsNavigationItem.php

This file was deleted.

21 changes: 0 additions & 21 deletions app/Navigation/Drawer/Settings/SettingsNavigationItem.php

This file was deleted.

27 changes: 0 additions & 27 deletions app/Navigation/Drawer/UserManagement/UsersNavigationItem.php

This file was deleted.

Loading

0 comments on commit 0621cb0

Please sign in to comment.