Oops, removed by mistake

This commit is contained in:
Andy Miller
2020-05-12 18:08:22 -06:00
parent 6389e76434
commit 70a417d52f

View File

@@ -67,4 +67,25 @@ class WhiteLabel
} }
return [false, ' Could not be recompiled, missing color scheme...']; return [false, ' Could not be recompiled, missing color scheme...'];
} }
public function exportPresetScsss($config, $location = 'asset://admin-theme-export.yaml')
{
if (isset($config['color_scheme'])) {
$color_scheme = $config['color_scheme'];
$body = Yaml::dump($color_scheme);
$file = new File($location);
$file->save($body);
// todo: handle errors/exceptions?
return [true, 'File created successfully'];
} else {
return [false, ' Could not export, missing color scheme...'];
}
}
} }