Skip to content

Commit

Permalink
Allow user to change the dark mode from the config file
Browse files Browse the repository at this point in the history
  • Loading branch information
Ihabafia committed May 10, 2024
1 parent ab24934 commit 6907221
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to `permissions-admin` will be documented in this file.

## 1.0.4 - 2024-05-10
- Allow user to change the dark mode from the config file.

## 1.0.3 - 2024-05-10
- No need to create a Roles and Permission classes in the application.
- Minor bug fixes.
Expand Down
6 changes: 6 additions & 0 deletions config/permissions-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
* This package will be using the Spatie Config File permission.php
*/
return [

/*
* To have the default package in dark mode.
*/
'dark-mode' => true,

/*
* This is the route of your home application for admins.
*/
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/livewire-layout.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<html class="{{ config('permissions-admin.dark-mode') ? 'dark':'' }}" lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
Expand Down

0 comments on commit 6907221

Please sign in to comment.