项目改造
This commit is contained in:
@@ -28,7 +28,6 @@ except ImportError:
|
||||
|
||||
from . import models # noqa: F401 # 确保表结构注册
|
||||
from . import repository, processor
|
||||
from . import web # noqa: F401 # Web 管理后台(/galgame_card)
|
||||
from . import handlers as _handlers # noqa: E402
|
||||
|
||||
from hexi.web_config import register_plugin_config # noqa: E402
|
||||
@@ -57,7 +56,7 @@ def _get_galgame_config_values() -> dict:
|
||||
conf = getattr(conf_mod, "config", None) if conf_mod else None
|
||||
if conf is None:
|
||||
return {}
|
||||
keys = ("web_enable", "web_username", "web_password", "web_secret_key", "image_vision_enabled")
|
||||
keys = ("image_vision_enabled",)
|
||||
return {k: getattr(conf, k, None) for k in keys}
|
||||
|
||||
|
||||
@@ -65,10 +64,6 @@ register_plugin_config(
|
||||
__name__,
|
||||
{
|
||||
"fields": [
|
||||
{"key": "web_enable", "label": "Web 后台启用", "type": "bool", "default": True},
|
||||
{"key": "web_username", "label": "Web 登录账号", "type": "string", "default": "admin"},
|
||||
{"key": "web_password", "label": "Web 登录密码", "type": "password", "default": "galgame", "secret": True},
|
||||
{"key": "web_secret_key", "label": "Web 签名密钥", "type": "password", "default": "galgame-card-secret-key", "secret": True},
|
||||
{"key": "image_vision_enabled", "label": "图片识别启用", "type": "bool", "default": False},
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user