abp
abp copied to clipboard
Remove Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared form Volo.Abp.OpenIddict.AspNetCore
Is there an existing issue for this?
- [X] I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
我不想使用abp默认的主题系统,但是Volo.Abp.OpenIddict..AspNetCore项目依赖了Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared这个主题包。 我看了下 发现Volo.Abp.OpenIddict.AspNetCore项目中仅仅包含一个页面,能否将这个页面独立出来,不要让整个项目都依赖Theme.Shared这个主题包。
I don't want to use the abp default Theme system, but Volo.Abp.OpenIddict. AspNetCore project relies on the Volo. Abp. AspNetCore. Mvc. UI.Theme.Shared. I Found Volo. Abp. OpenIddict. AspNetCore project contains only one page, can independence will this page, don't let the whole project depend on the Theme.Shared package
Describe the solution you'd like
将Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared从Volo.Abp.OpenIddict.AspNetCore项目的依赖中移除。
remove Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared form Volo.Abp.OpenIddict.AspNetCore
Additional context
No response
This is an abstraction package. we use it in all modules.
but Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared reference
Volo.Abp.AspNetCore.Mvc.UI.Bootstrap Volo.Abp.AspNetCore.Mvc.UI.Widgets Volo.Abp.AspNetCore.Mvc.UI.Packages
when I use Volo.Abp.OpenIddict.AspNetCore,I must use them ever I don't need them. I think Volo.Abp.OpenIddict.AspNetCore as a base module,Should not dependency them.
This is the current design.
所以希望能优化一下,不然即使我只是一个web api项目,要用openiddict模块也必须添加 主题模块才能运行。代码我已修改,可以的话我提一个合并请求
这不会对你产生影响,主题模块都是没有实际功能的抽象类.
会报没有注册主题的异常
AbpException: No theme registered! Use AbpThemingOptions to register themes. Volo.Abp.AspNetCore.Mvc.UI.Theming.DefaultThemeSelector.GetCurrentThemeInfo()
因为Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared中的 /views/_ViewStart.cshtml 和 Volo.Abp.OpenIddict.AspNetCore 中的/Volo/Abp/OpenIddict/Views/_ViewStart.cshtml 中都要获取当前主题
@using Volo.Abp.AspNetCore.Mvc.UI.Theming
@inject IThemeManager ThemeManager
@{
Layout = ThemeManager.CurrentTheme.GetApplicationLayout();
//Layout = ThemeManager.CurrentTheme.GetAccountLayout(); //Volo.Abp.OpenIddict.AspNetCore
}
好的, 我稍后会检查一下.
我想如果你的webapi项目中没有view的话, _ViewStart
也不会被调用吧?
本来是可以没有的,但是引用了 Volo.Abp.OpenIddict.AspNetCore 模块不就有了么
请分享一个新的模版项目复现问题.
我想如果你的webapi项目中没有view的话,
_ViewStart
也不会被调用吧?
你是对的,没有任何页面的单纯web api项目 是可以正常运行。
可是我用了mcv项目,因为我的页面和api在一个项目里,同时不想用默认的主题和主题系统,这样的话 Volo.Abp.OpenIddict.AspNetCore 模块就成了一个问题,因为他依赖abp的主题模块。虽然我可以自己修改Volo.Abp.OpenIddict.AspNetCore模块,但是会导致我后续要多维护一个自己的Volo.Abp.OpenIddict.AspNetCore模块的副本,所以希望能有一个 不依赖主题模块的Volo.Abp.OpenIddict.AspNetCore模块,这样以后要跟随abp升级也很方便😊
同时不想用默认的主题和主题系统
这个模块没有也无法考虑到这种情况, 它设计为使用abp的主题系统.
明白了,那我先自己维护一个副本自己用吧,3Q
请重新考虑下这个问题吧, dotnet8.0的 blazor比较香,想把服务端页面重写成blazor,这里成了一个钉子户了。。
I checked again. There is no good solution.
我大概明白为什么了。 不用主题的话,这个授权页面就会显得和其他用了主题模块的页面不一样,比如没有主题中配置的 页头和页脚
head
--------
page content
--------
footer
这个问题 就仁者见仁了,有的不在意 有的很在意