fix(*): 画布与任务详情 - 优化生成参数展示、批量上传和默认模型状态
This commit is contained in:
1 parent
d77432693e
commit
70a6640ecf
22 files changed
+1990
-57
No files matched your search
@@ -38,8 +38,8 @@ type PublicFeatureAvailability struct {
|
||||
}
|
||||
|
||||
func defaultFeatureAvailability() FeatureAvailability {
|
||||
// 缺少配置代表尚未由运维接管,默认保持现有功能全部开放。
|
||||
return FeatureAvailability{ShortDramaEnabled: true, TaskCenterEnabled: true, CreditsEnabled: true, CustomChannelsEnabled: true, FrontendModelsEnabled: true}
|
||||
// 缺少配置代表尚未由运维接管;前台模型需要明确配置后才开放。
|
||||
return FeatureAvailability{ShortDramaEnabled: true, TaskCenterEnabled: true, CreditsEnabled: true, CustomChannelsEnabled: true, FrontendModelsEnabled: false}
|
||||
}
|
||||
|
||||
func (s *Service) FeatureAvailability() (*PublicFeatureAvailability, error) {
|
||||
|
||||
@@ -11,14 +11,14 @@ import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
func TestFeatureAvailabilityDefaultsToEnabled(t *testing.T) {
|
||||
func TestFeatureAvailabilityDefaultsToDisableFrontendModels(t *testing.T) {
|
||||
svc, _ := newFeatureAvailabilityTestService(t)
|
||||
|
||||
setting, err := svc.FeatureAvailability()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if setting.Configured || !setting.ShortDramaEnabled || !setting.TaskCenterEnabled || !setting.CreditsEnabled || !setting.CustomChannelsEnabled {
|
||||
if setting.Configured || !setting.ShortDramaEnabled || !setting.TaskCenterEnabled || !setting.CreditsEnabled || !setting.CustomChannelsEnabled || setting.FrontendModelsEnabled {
|
||||
t.Fatalf("FeatureAvailability() = %#v", setting)
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ func TestFeatureAvailabilityLegacySettingKeepsCustomChannelsEnabled(t *testing.T
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if setting.ShortDramaEnabled || !setting.CustomChannelsEnabled {
|
||||
if setting.ShortDramaEnabled || !setting.CustomChannelsEnabled || setting.FrontendModelsEnabled {
|
||||
t.Fatalf("FeatureAvailability() = %#v", setting)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user