fix theme apps

This commit is contained in:
Mike Macgirvin 2023-10-17 18:17:22 +11:00
parent d396317fc9
commit 5b1183d960
3 changed files with 12 additions and 6 deletions

View file

@ -21,12 +21,11 @@ class Apps
public static function get_theme()
{
$themename = Config::Get('system', 'theme', 'fresh');
if (local_channel()) {
$themespec = explode(':', App::$channel['channel_theme']);
$themename = $themespec[0];
$themespec = Theme::current();
if ($themespec) {
return $themespec[0];
}
return $themename;
return 'fresh';
}
public static function get_system_apps($translate = true)

View file

@ -209,6 +209,9 @@ class Site
$f = basename($file);
$info = Theme::get_info($f);
if (! is_array($info)) {
continue;
}
$compatible = Addon::check_versions($info);
if (!$compatible) {
$theme_choices[$f] = $theme_choices_mobile[$f] = sprintf(t('%s - (Incompatible)'), $f);

View file

@ -17,7 +17,7 @@ class Theme
/**
* @brief Array with base or fallback themes.
*/
public static $base_themes = ['redbasic', 'fresh'];
public static $base_themes = ['fresh', 'redbasic'];
/**
@ -182,6 +182,10 @@ class Theme
$info = null;
$has_yaml = true;
if (! is_dir("view/theme/$theme")) {
return false;
}
if (is_file("view/theme/$theme.yml")) {
$info = Infocon::from_file("view/theme/$theme.yml");