From f72be353373808153d6f07cfed6390457f2ec666 Mon Sep 17 00:00:00 2001 From: johnniang Date: Wed, 10 Apr 2019 11:29:20 +0800 Subject: [PATCH] Move theme configuration entities --- .../java/run/halo/app/handler/theme/Item.java | 47 +++++++++++++++++++ .../run/halo/app/handler/theme/Option.java | 23 +++++++++ .../java/run/halo/app/handler/theme/Tab.java | 30 ++++++++++++ .../handler/theme/ThemeConfigResolver.java | 12 +++++ .../java/run/halo/app/utils/YamlTest.java | 27 ++--------- 5 files changed, 115 insertions(+), 24 deletions(-) create mode 100644 src/main/java/run/halo/app/handler/theme/Item.java create mode 100644 src/main/java/run/halo/app/handler/theme/Option.java create mode 100644 src/main/java/run/halo/app/handler/theme/Tab.java create mode 100644 src/main/java/run/halo/app/handler/theme/ThemeConfigResolver.java diff --git a/src/main/java/run/halo/app/handler/theme/Item.java b/src/main/java/run/halo/app/handler/theme/Item.java new file mode 100644 index 000000000..416b18789 --- /dev/null +++ b/src/main/java/run/halo/app/handler/theme/Item.java @@ -0,0 +1,47 @@ +package run.halo.app.handler.theme; + +import lombok.Data; +import run.halo.app.model.enums.DataType; +import run.halo.app.model.enums.InputType; + +import java.util.List; + +/** + * Theme configuration: Item entity + * + * @author johnniang + * @date 4/10/19 + */ +@Data +public class Item { + + /** + * Item name. + */ + private String name; + + /** + * Item label. + */ + private String label; + + /** + * Item input type, default is text. + */ + private InputType type; + + /** + * Item data type, default is string. + */ + private DataType dataType; + + /** + * Item default value. + */ + private Object defaultValue; + + /** + * Item's options, default is empty list + */ + private List