PluginCore icon indicating copy to clipboard operation
PluginCore copied to clipboard

插件 `设置` 可视化

Open yiyungent opened this issue 2 years ago • 1 comments

通过将 SettingsModel 解析,来做到 可视化 设置 页面,当然也可以选择编辑源文件字符串(现在的方式),就像 vscode 一样,即可可视化设置,也可以编辑设置文件

yiyungent avatar Apr 23 '22 05:04 yiyungent

例如:

{
	"GitHubOAuth": {
            "AppName": "HelloWorldPlugin",
		        "HomePageUrl": "/api/GitHub/Index",
		        "ClientId": "ea71f9ab3f05e7837e7a",
		        "ClientSecret": "0f979a8fe468582748f069bc19a1e7c3083d2c4a",
		        "RedirectUrl": "/api/GitHub/Callback",
		        "Scopes": [ "user", "notifications", "repo" ]
	        }
}

就可以对 HomePageUrl 展示一个对应的文本输入框

,当然可在 SettingsModel 的属性上添加特性 [DisplayLabel("主页URL")] 来提供对应文本框的提示

yiyungent avatar Apr 23 '22 05:04 yiyungent