1 Commits

Author SHA1 Message Date
6d22830f95 Default Bootstrap theme to dark mode
All checks were successful
linter / quality (pull_request) Successful in 1m22s
security / Dependency Audit (pull_request) Successful in 1m36s
security / Static Analysis (pull_request) Successful in 1m54s
tests / ci (8.4) (pull_request) Successful in 1m30s
tests / ci (8.5) (pull_request) Successful in 1m28s
- Change default theme from light to dark for first-time visitors
- Fix Alpine reactive theme toggle so icons and data-bs-theme update correctly
- Remove hardcoded bg-light classes that prevented dark mode from applying
- Fix broken duplicate Bootstrap bundle import in app.js
2026-03-06 02:49:17 +00:00
8 changed files with 9 additions and 68 deletions

View File

@@ -63,10 +63,3 @@ AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false
VITE_APP_NAME="${APP_NAME}"
LDAP_HOST=openldap
LDAP_USERNAME="cn=admin,dc=travel,dc=local"
LDAP_PASSWORD=adminpassword
LDAP_PORT=389
LDAP_BASE_DN="dc=travel,dc=local"
LDAP_LOGGING=true

View File

@@ -64,16 +64,6 @@ class User extends Authenticatable implements FilamentUser, LdapAuthenticatable
return $this->hasRole('administrator');
}
public function getLdapGuidColumn(): string
{
return 'ldap_guid';
}
public function getLdapDomainColumn(): string
{
return 'ldap_domain';
}
public function emergencyContacts(): HasMany
{
return $this->hasMany(EmergencyContact::class);

View File

@@ -84,7 +84,6 @@ services:
- sail
openldap:
image: 'osixia/openldap:1.5.0'
command: '--copy-service'
ports:
- '${FORWARD_LDAP_PORT:-389}:389'
- '${FORWARD_LDAPS_PORT:-636}:636'
@@ -97,7 +96,8 @@ services:
LDAP_READONLY_USER_USERNAME: '${LDAP_READONLY_USERNAME:-readonly}'
LDAP_READONLY_USER_PASSWORD: '${LDAP_READONLY_PASSWORD:-readonly}'
volumes:
- './docker/openldap/bootstrap.ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom/bootstrap.ldif'
- 'sail-ldap-data:/var/lib/ldap'
- 'sail-ldap-config:/etc/ldap/slapd.d'
networks:
- sail
healthcheck:
@@ -134,3 +134,7 @@ volumes:
driver: local
sail-redis:
driver: local
sail-ldap-data:
driver: local
sail-ldap-config:
driver: local

View File

@@ -1,46 +0,0 @@
# People OU
dn: ou=people,dc=travel,dc=local
objectClass: organizationalUnit
ou: people
# Administrator
dn: uid=admin,ou=people,dc=travel,dc=local
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
cn: Administrator
sn: Administrator
uid: admin
mail: admin@travel.local
uidNumber: 1000
gidNumber: 1000
homeDirectory: /home/admin
userPassword: password
# Travel Approver
dn: uid=approver,ou=people,dc=travel,dc=local
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
cn: Travel Approver
sn: Approver
uid: approver
mail: approver@travel.local
uidNumber: 1001
gidNumber: 1000
homeDirectory: /home/approver
userPassword: password
# Staff Member
dn: uid=staff,ou=people,dc=travel,dc=local
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
cn: Staff Member
sn: Member
uid: staff
mail: staff@travel.local
uidNumber: 1002
gidNumber: 1000
homeDirectory: /home/staff
userPassword: password

View File

@@ -1,6 +1,6 @@
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"
x-data="{ theme: localStorage.getItem('theme') || 'light' }"
x-data="{ theme: localStorage.getItem('theme') || 'dark' }"
x-init="$watch('theme', val => { document.documentElement.setAttribute('data-bs-theme', val); localStorage.setItem('theme', val); }); document.documentElement.setAttribute('data-bs-theme', theme);"
:data-bs-theme="theme"
>

View File

@@ -1,6 +1,6 @@
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"
x-data="{ theme: localStorage.getItem('theme') || 'light' }"
x-data="{ theme: localStorage.getItem('theme') || 'dark' }"
x-init="document.documentElement.setAttribute('data-bs-theme', theme);"
:data-bs-theme="theme"
>

View File

@@ -18,7 +18,7 @@ new #[Layout('components.layouts.guest')] class extends Component {
{
$this->validate();
if (Auth::attempt(['uid' => $this->username, 'password' => $this->password], $this->rememberMe)) {
if (Auth::attempt(['username' => $this->username, 'password' => $this->password], $this->rememberMe)) {
session()->regenerate();
$this->redirectIntended(route('dashboard'), navigate: true);
return;