向 Avatar 实体添加可简单类型检查的可视化 Type 字段
- 添加 TYPE 列以存储“ 相片” 或“ Avatar 创建器 ” - 删除与伦博克相冲突的重复构造器@ NoArgsConstructionctor - 在控制器中创建相机时设置相机Type
使用avatarType 字段而不是复杂的代理检测
- 直接检查 AvatarType 字段以进行简单的类型检查 - 创建新相机时设置相机Type - 更简单、更能发挥作用
向 Avatar 实体添加可简单类型检查的可视化 Type 字段
- 添加 TYPE 列以存储“ 相片” 或“ Avatar 创建器 ” - 自动设置在构造器中 - 避免例如检查和代理问题
查询所有用户的外观以获取真正的实体而不是代理
- 从avatar获取用户ID,然后查询找到ByUserId(返回真实实体) - 从列表中查找匹配的外观并检查实例 - 这避免了代理问题 阻止实例工作
使用简单的过滤器检查是否是相片或 Avatar 创建器
- 删除复杂的代理检测逻辑 - 简单的过滤器找到ById结果 检查是否是AvatarPhoto - 如果不是相片, 默认为 Avatar 创建者 - 简单得多
使用 Hibernate Lazy Initializer 来从代理获取实际实体类
- 进入HibernateProxy的懒惰化器,以获得持久的阶级 - 检查是否是AvatarPhoto 或 Avatar 创建者 - 使用QQ强制初始化 - 这应该正确识别Avatar类型 即使它是一个代理
使用直接投影来确定外观类型而不是反射
- 试铸给AvatarPhoto先强制代理初始化 - 直接在投影后访问获取FileExtension() - 回到阿凡达阿凡达 造物主的铸造,如果相片铸造失败 - 更好的类型检测错误处理
通过抓取调用目标来改进代理类型检测
- 在代理上援引方法确定实际类型时处理分类例外 - 尝试先获取FileExtension(相片),再获取Style(阿凡达创建器) - 更好的Hibernate代理类型检测错误处理
改进模拟类型检测的 Hibernate 代理处理
- 搜索等级和接口以获取FileExtension方法 - 使用反射来检测 AvatarPhoto 与 AvatarAvatar 创建者在失败时 - 在类名检查中添加倒数 - 解决将相片造型人错误地当作"神通造型人"的问题
Fix TypeScript errors: Replace 'any' types with proper interface in MemberListProvider
从寄存器重新装入相机以解决 Hibernate 代理实例
- 从关系中装入的神通实体可能是未成功检查的Hibernate代理 - 从寄存器重新装入相机以获得实际实体类型(相机或相机) - 如果重新装入失败, 使用反射法添加倒置逻辑 - 修正“ 未知的可视化类型” 错误, 导致无效可视化 URL
保证在 HexheadGroup 中缺失时总是创建首字母 SVG
- 如果avatar抓取失败, 添加错误处理回落以创建缩写 SVG - 合并缩写 SVG 创建逻辑 - 确保AvatarSrc永远不会是空字符串
为调试添加详细的日志到 avatar URL 生成
- 生成可视化的 URL 时日志, 创建什么 URL - 失传或URL无效时日志 - 这将有助于确定为何Avatars没有出现在聊天头/聊天箱/成员名单中
在设置为活动后刷新相机列表
- 在将相片设定为活动后, 刷新完整相片列表以获取更新的等效旗 - 从已刷新的列表中查找并设置活动相机 - 确保更改正确持续,并更新页面
Determine active avatar by checking user.getAvatar() instead of RecordState
- Backend now correctly marks which avatar is active by comparing to user.getAvatar() - This ensures the isActive flag in the API response reflects the actual a...
Load active avatar from avatars list on Profile page
- Fetch avatars list and find the one marked as active - Set activeAvatar from the full avatar object in the list (has all details and URL) - Remove redundant a...
Fix avatar not displaying on Profile page after refresh
- Ensure avatar URL from member profile is preserved when setting activeAvatar - Update profileData with avatar URL when avatar is loaded - Preserve URL in sync...
Add detailed logging for avatar selection debugging
- Log full avatar object when handleSelectAvatar is called - Add validation for avatar.id before processing - Log API URL being called - Better error messages f...
Fix TypeScript type error - handle null body in apiProxy
- Convert null to undefined for BodyInit type compatibility - Fixes: Type 'null' is not assignable to type 'BodyInit | undefined'
Fix PUT request body handling for set-active endpoint
- Explicitly set body to undefined for PUT requests without body - Improve body handling in apiProxy to gracefully handle empty requests - Prevents body consump...
Improve error handling for set-active avatar endpoint
- Forward actual backend error messages instead of generic message - Better error parsing in frontend (handle both JSON and text responses) - Enhanced logging t...
Use static imports instead of dynamic imports for avatarUtils
- Replace dynamic imports with static imports at top of file - Avoids module resolution issues with TypeScript moduleResolution node16 - Functions are always ne...
Revert to relative paths for dynamic imports - Next.js may not resolve path aliases in dynamic imports at build time
Fix path alias - use @/lib/avatarUtils instead of @/app/lib/avatarUtils
- @/ maps to project root, so @/lib/avatarUtils is correct path - @/app/lib/avatarUtils was incorrect (would look for app/app/lib/avatarUtils)
Fix dynamic imports - use path alias @/app/lib/avatarUtils for Next.js webpack resolution
- Change relative paths to path alias @/app/lib/avatarUtils - Next.js webpack can't resolve .js extensions for .ts files in dynamic imports - Path aliases work ...
Fix TypeScript ESM dynamic imports - add .js extension required for node16/nodenext module resolution
- TypeScript with moduleResolution node16/nodenext requires explicit .js extensions in dynamic imports - TypeScript will resolve .js imports to .ts files at bui...
Fix TypeScript module resolution - remove .js extension from dynamic imports
- Change dynamic imports from avatarUtils.js to avatarUtils (no extension) - Fixes build error: Module not found: Can't resolve '../../lib/avatarUtils.js' - Typ...
Add avatar URLs to members by-department endpoint with override mechanism
- Include avatar URL in each member response from **************** - Respect override mechanism: member avatar (if exists) → user avatar (default) - Frontend ...
Fix avatar display with override mechanism support
- ProfileTab: Always show USER avatar (no override mechanism) - MembershipPermissionsTab: Always show MEMBER avatar (no override mechanism) - Site-wide displays...
合并从 Maxime-J/docker-prisma- engine 收到的拉动请求 # 3755
许可 Docker在只读模式和/或离线env中使用.
Detect member avatar override on page load even if returned as 'avatar'
- Add logging to see what API returns on initial load - Check if member has avatarId/memberAvatarId set to detect member override - If avatar ID matches memberA...
Ensure avatarId is always sent when activeAvatar exists
- Use corrected useDefaultUserAvatar value directly in save logic - If activeAvatar exists, always send avatarId (member override) regardless of flag - Improved...
Preserve avatar URL when saving and add defensive check
- Preserve profilePicture from activeAvatar when updating profileData after save - Add warning if activeAvatar exists but useDefaultUserAvatar is incorrectly tr...
Add detailed logging to track avatar state during save
- Log current state (useDefaultUserAvatar, activeAvatar, avatarIdToSend) before save - Log API response after save (memberAvatar, avatar) - Log refreshed profil...
Preserve avatar state after save to prevent revert
- Fixed save logic to properly send avatarId when avatar is selected - Preserve current activeAvatar and useDefaultUserAvatar state before refresh - If refresh ...
Update avatar state after saving profile to prevent revert
- After saving profile, refresh and update activeAvatar state from API response - Update useDefaultUserAvatar flag to match saved state - Ensures avatar remains...
Prevent avatar from switching to empty avatar when selecting
- Immediately set selected avatar in UI for instant feedback - Only update with refreshed data if it has a URL and is the same avatar - Prevents overwriting sel...
Keep avatar manager dialog open and fix profile avatar display
- Removed handleClose() calls when selecting, creating, or uploading avatars - Dialog now stays open so users can continue selecting/managing avatars - After cr...
Ensure avatar URL is properly preserved and displayed from database
- Changed URL handling to preserve empty strings (use ?? instead of ||) - Updated MemberHeader props to prioritize profileData.profilePicture which contains the...
Ensure avatar is properly set from database on profile tab load
- Fixed URL handling to use original API response URL instead of potentially null transformed value - Added synchronization between activeAvatar and userAvatars...