chore: remove custom style

- Deleted the custom_style field from WorkspaceProfile and WorkspaceSetting messages in workspace_service.proto.
- Updated the corresponding Go files and gRPC service implementations to reflect the removal of custom_style.
- Removed references to custom_style in the API documentation and Swagger definitions.
- Adjusted the workspace setting migration logic to exclude custom_style.
- Updated README files to remove mentions of custom_style.
- Bumped protoc-gen-go and protoc-gen-go-grpc versions in generated files.
This commit is contained in:
Johnny
2025-12-21 21:32:01 +08:00
parent 73d83de323
commit ec5db24b2a
44 changed files with 306 additions and 241 deletions
-15
View File
@@ -54,7 +54,6 @@ func (s *APIV1Service) GetWorkspaceSetting(ctx context.Context, _ *v1pb.GetWorks
if v.Key == storepb.WorkspaceSettingKey_WORKSPACE_SETTING_GENERAL {
generalSetting := v.GetGeneral()
workspaceSetting.Branding = generalSetting.GetBranding()
workspaceSetting.CustomStyle = generalSetting.GetCustomStyle()
} else if v.Key == storepb.WorkspaceSettingKey_WORKSPACE_SETTING_SECURITY {
securitySetting := v.GetSecurity()
workspaceSetting.DisallowUserRegistration = securitySetting.GetDisallowUserRegistration()
@@ -100,20 +99,6 @@ func (s *APIV1Service) UpdateWorkspaceSetting(ctx context.Context, request *v1pb
}); err != nil {
return nil, status.Errorf(codes.Internal, "failed to update workspace setting: %v", err)
}
} else if path == "custom_style" {
generalSetting, err := s.Store.GetWorkspaceGeneralSetting(ctx)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get workspace setting: %v", err)
}
generalSetting.CustomStyle = request.Setting.CustomStyle
if _, err := s.Store.UpsertWorkspaceSetting(ctx, &storepb.WorkspaceSetting{
Key: storepb.WorkspaceSettingKey_WORKSPACE_SETTING_GENERAL,
Value: &storepb.WorkspaceSetting_General{
General: generalSetting,
},
}); err != nil {
return nil, status.Errorf(codes.Internal, "failed to update workspace setting: %v", err)
}
} else if path == "default_visibility" {
shortcutRelatedSetting, err := s.Store.GetWorkspaceSetting(ctx, &store.FindWorkspaceSetting{
Key: storepb.WorkspaceSettingKey_WORKSPACE_SETTING_SHORTCUT_RELATED,