refactor: clean up web assets and consolidate PHP helpers
- Remove 2079 unused bootstrap-icons SVGs + min.css (~9.3 MB saved, app uses font approach only) - Remove unused editorjs.umd.js (only .mjs is imported) - Extract shared syncControlState into app-conditional-controls.js, deduplicate SSO/LDAP toggles - Add settingToBool() helper to DRY up repeated bool-parsing pattern across 6 call sites - Merge single-function auth.php into app.php, delete auth.php - Extract 9 branding functions from app.php into dedicated branding.php (app.php 709→528 lines) - Remove empty web/img/ directory Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -121,12 +121,10 @@ class SettingsAppGateway
|
||||
|
||||
public function isUserThemeAllowed(): bool
|
||||
{
|
||||
$value = $this->settingsMetadataGateway->getValue(SettingKeys::APP_THEME_USER_KEY);
|
||||
if ($value === null || $value === '') {
|
||||
return true;
|
||||
}
|
||||
|
||||
return in_array(strtolower($value), ['1', 'true', 'yes', 'on'], true);
|
||||
return settingToBool(
|
||||
$this->settingsMetadataGateway->getValue(SettingKeys::APP_THEME_USER_KEY),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
public function setUserThemeAllowed(bool $allowed, ?string $description = null): bool
|
||||
@@ -138,12 +136,10 @@ class SettingsAppGateway
|
||||
|
||||
public function isRegistrationEnabled(): bool
|
||||
{
|
||||
$value = $this->settingsMetadataGateway->getValue(SettingKeys::APP_REGISTRATION_KEY);
|
||||
if ($value === null || $value === '') {
|
||||
return true;
|
||||
}
|
||||
|
||||
return in_array(strtolower($value), ['1', 'true', 'yes', 'on'], true);
|
||||
return settingToBool(
|
||||
$this->settingsMetadataGateway->getValue(SettingKeys::APP_REGISTRATION_KEY),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
public function setRegistrationEnabled(bool $allowed, ?string $description = null): bool
|
||||
|
||||
Reference in New Issue
Block a user