💄 优化存储管理卡片布局对齐

前端优化:
- 使用 flexbox 布局确保卡片等高
- 按钮自动对齐到卡片底部
- 添加 align-items: stretch 确保卡片高度一致
- 使用 margin-top: auto 将按钮区域推到底部

视觉改进:
- 两个存储卡片高度保持一致
- 操作按钮在同一水平线上对齐
- 整体布局更加美观和协调

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-24 21:11:48 +08:00
parent 600545d652
commit 220cc2341e

View File

@@ -1254,8 +1254,8 @@
</div> </div>
</div> </div>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 14px;"> <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; align-items: stretch;">
<div style="background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; box-shadow: 0 6px 20px rgba(0,0,0,0.04);"> <div style="background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; box-shadow: 0 6px 20px rgba(0,0,0,0.04); display: flex; flex-direction: column; height: 100%;">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;"> <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;">
<div style="font-weight: 700; color: #0f172a; display: flex; gap: 8px; align-items: center;"> <div style="font-weight: 700; color: #0f172a; display: flex; gap: 8px; align-items: center;">
<i class="fas fa-hard-drive"></i> 本地存储 <i class="fas fa-hard-drive"></i> 本地存储
@@ -1275,12 +1275,14 @@
}"></div> }"></div>
</div> </div>
</div> </div>
<button class="btn btn-primary" style="width: 100%; border-radius: 10px;" :disabled="storageType === 'local' || storageSwitching" @click="switchStorage('local')"> <div style="margin-top: auto;">
<i class="fas fa-bolt"></i> 用本地存储 <button class="btn btn-primary" style="width: 100%; border-radius: 10px;" :disabled="storageType === 'local' || storageSwitching" @click="switchStorage('local')">
</button> <i class="fas fa-bolt"></i> 用本地存储
</button>
</div>
</div> </div>
<div style="background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; box-shadow: 0 6px 20px rgba(0,0,0,0.04);"> <div style="background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; box-shadow: 0 6px 20px rgba(0,0,0,0.04); display: flex; flex-direction: column; height: 100%;">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;"> <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;">
<div style="font-weight: 700; color: #0f172a; display: flex; gap: 8px; align-items: center;"> <div style="font-weight: 700; color: #0f172a; display: flex; gap: 8px; align-items: center;">
<i class="fas fa-server"></i> SFTP 存储 <i class="fas fa-server"></i> SFTP 存储
@@ -1294,19 +1296,21 @@
<div v-else style="font-size: 13px; color: #b45309; background: #fff7ed; border: 1px dashed #fcd34d; padding: 10px; border-radius: 8px; margin-bottom: 10px;"> <div v-else style="font-size: 13px; color: #b45309; background: #fff7ed; border: 1px dashed #fcd34d; padding: 10px; border-radius: 8px; margin-bottom: 10px;">
<i class="fas fa-exclamation-circle"></i> 先填写 SFTP 连接信息再切换 <i class="fas fa-exclamation-circle"></i> 先填写 SFTP 连接信息再切换
</div> </div>
<button <div style="margin-top: auto;">
class="btn" <button
:class="user?.has_ftp_config ? 'btn-primary' : 'btn-secondary'" class="btn"
style="width: 100%; border-radius: 10px;" :class="user?.has_ftp_config ? 'btn-primary' : 'btn-secondary'"
:disabled="storageType === 'sftp' || storageSwitching" style="width: 100%; border-radius: 10px;"
@click="switchStorage('sftp')"> :disabled="storageType === 'sftp' || storageSwitching"
<i class="fas fa-random"></i> @click="switchStorage('sftp')">
{{ user?.has_ftp_config ? '切到 SFTP 存储' : '去配置 SFTP' }} <i class="fas fa-random"></i>
</button> {{ user?.has_ftp_config ? '切到 SFTP 存储' : '去配置 SFTP' }}
<div style="margin-top: 8px; text-align: center;"> </button>
<a style="color: #4b5fc9; font-size: 13px; text-decoration: none; cursor: pointer;" @click.prevent="openSftpConfigModal"> <div style="margin-top: 8px; text-align: center;">
<i class="fas fa-tools"></i> 配置 / 修改 SFTP <a style="color: #4b5fc9; font-size: 13px; text-decoration: none; cursor: pointer;" @click.prevent="openSftpConfigModal">
</a> <i class="fas fa-tools"></i> 配置 / 修改 SFTP
</a>
</div>
</div> </div>
</div> </div>
</div> </div>