mirror of
https://github.com/flarum/core.git
synced 2025-07-23 01:31:40 +02:00
Rough implementation of appearance settings
This commit is contained in:
@@ -37,6 +37,14 @@ class UpdateConfigAction extends Action
|
||||
$this->settings->set($k, $v);
|
||||
}
|
||||
|
||||
$assetPath = public_path('assets');
|
||||
$manifest = file_get_contents($assetPath . '/rev-manifest.json');
|
||||
$revisions = json_decode($manifest, true);
|
||||
|
||||
foreach ($revisions as $file => $revision) {
|
||||
@unlink($assetPath . '/' . substr_replace($file, '-' . $revision, strrpos($file, '.'), 0));
|
||||
}
|
||||
|
||||
return $this->success();
|
||||
}
|
||||
}
|
||||
|
@@ -183,8 +183,8 @@ abstract class ClientAction extends HtmlAction
|
||||
protected function getLessVariables()
|
||||
{
|
||||
return [
|
||||
'config-primary-color' => $this->settings->get('theme_primary_color', '#000'),
|
||||
'config-secondary-color' => $this->settings->get('theme_secondary_color', '#000'),
|
||||
'config-primary-color' => $this->settings->get('theme_primary_color') ?: '#000',
|
||||
'config-secondary-color' => $this->settings->get('theme_secondary_color') ?: '#000',
|
||||
'config-dark-mode' => $this->settings->get('theme_dark_mode') ? 'true' : 'false',
|
||||
'config-colored-header' => $this->settings->get('theme_colored_header') ? 'true' : 'false'
|
||||
];
|
||||
|
Reference in New Issue
Block a user