<!-- pages/settings/about/update-log/update-log.wxml -->
<view class="update-log-container">
  <!-- 自定义导航栏 -->
  <view class="custom-nav-bar" style="height: {{menuButtonInfo.height}}px; top: {{statusBarHeight}}px; width: 100%;">
    <!-- 左侧返回按钮 -->
    <view class="nav-left" bindtap="navigateBack" style="width: {{menuButtonInfo.width}}px; height: {{menuButtonInfo.height}}px; line-height: {{menuButtonInfo.height}}px;">
      <text class="back-icon">↩</text>
    </view>
    
    <!-- 中间标题 -->
    <view class="nav-title" style="position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);">
      更新日志
    </view>
    
    <!-- 右侧占位区 -->
    <view class="nav-right" style="width: {{menuButtonInfo.width}}px; height: {{menuButtonInfo.height}}px;"></view>
  </view>

  <!-- 内容区域 - 关键修改：将样式合并到一行 -->
  <scroll-view class="content-area" scroll-y style="padding-top: {{statusBarHeight + menuButtonInfo.height + 30}}px; height: calc(100vh - {{statusBarHeight + menuButtonInfo.height + 30}}px);">
    <!-- 当前版本信息 -->
    <view class="current-version-card">
      <text class="current-version-badge">当前版本</text>
      <view class="current-version-info">
        <text class="current-version-name">{{currentVersion}}</text>
        <text class="current-version-date">{{currentVersionDate}}</text>
      </view>
    </view>

    <!-- 更新日志列表 -->
    <view class="log-list">
      <!-- 版本项 -->
      <view class="version-item" wx:for="{{updateLogs}}" wx:key="version">
        <!-- 版本头部 -->
        <view class="version-header">
          <text class="version-name">{{item.version}}</text>
          <text class="version-date">{{item.date}}</text>
        </view>
        
        <!-- 版本内容 -->
        <view class="version-content">
          <!-- 特性更新 -->
          <view class="update-section" wx:if="{{item.newFeatures && item.newFeatures.length > 0}}">
            <view class="section-title">
              <text class="section-icon">✨</text>
              <text class="section-text">新功能</text>
            </view>
            <view class="section-items">
              <text class="update-item" wx:for="{{item.newFeatures}}" wx:key="index" wx:for-item="feature">{{feature}}</text>
            </view>
          </view>
          
          <!-- 优化改进 -->
          <view class="update-section" wx:if="{{item.improvements && item.improvements.length > 0}}">
            <view class="section-title">
              <text class="section-icon">⚡</text>
              <text class="section-text">优化改进</text>
            </view>
            <view class="section-items">
              <text class="update-item" wx:for="{{item.improvements}}" wx:key="index" wx:for-item="improvement">{{improvement}}</text>
            </view>
          </view>
          
          <!-- 问题修复 -->
          <view class="update-section" wx:if="{{item.fixes && item.fixes.length > 0}}">
            <view class="section-title">
              <text class="section-icon">🔧</text>
              <text class="section-text">问题修复</text>
            </view>
            <view class="section-items">
              <text class="update-item" wx:for="{{item.fixes}}" wx:key="index" wx:for-item="fix">{{fix}}</text>
            </view>
          </view>
        </view>
      </view>

      <!-- 加载更多提示 -->
      <view class="load-more" wx:if="{{hasMoreLogs}}" bindtap="loadMoreLogs">
        <text class="load-more-text">加载更多历史版本</text>
        <text class="load-more-icon">↓</text>
      </view>
      
      <!-- 没有更多内容提示 -->
      <view class="no-more" wx:else>
        <text class="no-more-text">已经到底啦~</text>
      </view>
    </view>

    <!-- 底部安全区域 -->
    <view class="bottom-space"></view>
  </scroll-view>
</view>
