Selaa lähdekoodia

Hide base theme (#7234)

Alexandre Alapetite 1 vuosi sitten
vanhempi
commit
825ccf5556

+ 3 - 0
.editorconfig

@@ -15,6 +15,9 @@ indent_style = tab
 [*.js]
 indent_style = tab
 
+[*.json]
+indent_style = tab
+
 [*.md]
 indent_size = 4
 indent_style = tab

+ 1 - 1
app/Controllers/extensionController.php

@@ -90,7 +90,7 @@ class FreshRSS_extension_Controller extends FreshRSS_ActionController {
 					continue 2;
 				}
 			}
-			if (!in_array($extension['type'], ['system', 'user'], true)) {
+			if (!in_array($extension['type'], ['system', 'user'], true) || trim($extension['name']) === '') {
 				continue;
 			}
 			/** @var array{name:string,author:string,description:string,version:string,entrypoint:string,type:'system'|'user',url:string,method:string,directory:string} $extension */

+ 1 - 1
app/Models/Themes.php

@@ -21,7 +21,7 @@ class FreshRSS_Themes extends Minz_Model {
 		$list = [];
 		foreach ($themes_list as $theme_dir) {
 			$theme = self::get_infos($theme_dir);
-			if (is_array($theme)) {
+			if (is_array($theme) && trim($theme['name']) !== '') {
 				$list[$theme_dir] = $theme;
 			}
 		}

+ 1 - 2
p/themes/base-theme/README.md

@@ -8,5 +8,4 @@ A base theme for [FreshRSS](https://freshrss.org)
 3. Choose your new theme in FreshRSS configuration
 4. Enjoy your wonderful theme!
 
-Don’t hesitate to share your theme with us [on GitHub](https://github.com/FreshRSS/FreshRSS/issues) :)
-
+Don’t hesitate to [share your theme with us](https://github.com/FreshRSS/FreshRSS/discussions/categories/show-and-tell) 🙂

+ 6 - 6
p/themes/base-theme/metadata.json

@@ -1,8 +1,8 @@
 {
-  "name": "",
-  "author": "Your name",
-  "description": "A wonderful base theme",
-  "version": 0.1,
-  "files": ["frss.css", "base.css"],
-  "theme-color": "#123456"
+	"name": "",
+	"author": "Your name",
+	"description": "A wonderful base theme",
+	"version": 0.1,
+	"files": ["frss.css", "base.css"],
+	"theme-color": "#123456"
 }