mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:35:30 +00:00
fix theme apps
This commit is contained in:
parent
d396317fc9
commit
5b1183d960
3 changed files with 12 additions and 6 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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'];
|
||||
|
||||
|
||||
/**
|
||||
|
@ -183,6 +183,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");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue