optimize button ui

This commit is contained in:
Julian Freeman
2026-03-14 17:49:33 -04:00
parent 65ce05b36b
commit 66ad8da599

View File

@@ -27,7 +27,7 @@
<button <button
v-if="software.status === 'idle'" v-if="software.status === 'idle'"
@click="$emit('install', software.id)" @click="$emit('install', software.id)"
class="install-btn" class="action-btn install-btn"
> >
{{ actionLabel }} {{ actionLabel }}
</button> </button>
@@ -35,7 +35,7 @@
<button <button
v-else-if="software.status === 'installed'" v-else-if="software.status === 'installed'"
disabled disabled
class="installed-btn" class="action-btn installed-btn"
> >
已安装 已安装
</button> </button>
@@ -206,31 +206,33 @@ const placeholderColor = computed(() => {
justify-content: flex-end; justify-content: flex-end;
} }
.install-btn { .action-btn {
padding: 8px 24px; width: 90px; /* 固定宽度,确保对齐 */
background-color: var(--bg-light); height: 34px; /* 固定高度 */
display: flex;
align-items: center;
justify-content: center;
border: none; border: none;
border-radius: 20px; border-radius: 17px;
color: var(--primary-color);
font-weight: 600; font-weight: 600;
font-size: 14px; font-size: 13px;
cursor: pointer; cursor: pointer;
transition: all 0.2s ease; transition: all 0.2s ease;
} }
.install-btn {
background-color: rgba(0, 122, 255, 0.05);
color: var(--primary-color);
}
.install-btn:hover { .install-btn:hover {
background-color: var(--primary-color); background-color: var(--primary-color);
color: white; color: white;
} }
.installed-btn { .installed-btn {
padding: 8px 24px; background-color: #F2F2F7; /* 更浅的灰色 */
background-color: #E5E5E7; color: #AEAEB2; /* 更淡的文字颜色 */
border: none;
border-radius: 20px;
color: #86868B;
font-weight: 600;
font-size: 14px;
cursor: not-allowed; cursor: not-allowed;
} }
@@ -238,11 +240,13 @@ const placeholderColor = computed(() => {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 10px; gap: 10px;
width: 90px;
justify-content: center;
} }
.progress-ring { .progress-ring {
width: 20px; width: 18px;
height: 20px; height: 18px;
} }
.progress-ring svg { .progress-ring svg {
@@ -260,20 +264,24 @@ const placeholderColor = computed(() => {
} }
.status-text { .status-text {
font-size: 13px; font-size: 12px;
font-weight: 500; font-weight: 500;
color: var(--primary-color); color: var(--primary-color);
display: none; /* 在固定宽度下隐藏文字,保持简洁 */
}
.status-success, .status-error {
width: 90px;
text-align: center;
font-weight: 600;
font-size: 13px;
} }
.status-success { .status-success {
color: #34C759; color: #34C759;
font-weight: 600;
font-size: 14px;
} }
.status-error { .status-error {
color: #FF3B30; color: #FF3B30;
font-weight: 600;
font-size: 14px;
} }
</style> </style>