feat: 修改检查更新按钮位置
This commit is contained in:
@@ -788,7 +788,7 @@ class SettingUpdateIn(BaseModel):
|
|||||||
|
|
||||||
class UpdateCheckIn(BaseModel):
|
class UpdateCheckIn(BaseModel):
|
||||||
current_version: str = Field(..., description="当前前端版本号")
|
current_version: str = Field(..., description="当前前端版本号")
|
||||||
if_force: bool = Field(..., description="是否强制拉取更新信息")
|
if_force: bool = Field(default=False, description="是否强制拉取更新信息")
|
||||||
|
|
||||||
|
|
||||||
class UpdateCheckOut(OutBase):
|
class UpdateCheckOut(OutBase):
|
||||||
|
|||||||
@@ -906,6 +906,21 @@ onMounted(() => {
|
|||||||
<div class="form-section">
|
<div class="form-section">
|
||||||
<div class="section-header">
|
<div class="section-header">
|
||||||
<h3>更新配置</h3>
|
<h3>更新配置</h3>
|
||||||
|
<a-button
|
||||||
|
type="primary"
|
||||||
|
@click="checkUpdate"
|
||||||
|
size="medium"
|
||||||
|
class="section-update-button"
|
||||||
|
>
|
||||||
|
<template #icon>
|
||||||
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor">
|
||||||
|
<path
|
||||||
|
d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</template>
|
||||||
|
检查更新
|
||||||
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
@@ -1258,25 +1273,6 @@ onMounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
||||||
<!-- 检查更新按钮区域 -->
|
|
||||||
<div class="update-section">
|
|
||||||
<div class="update-button-wrapper">
|
|
||||||
<a-button type="primary" @click="checkUpdate" size="large" class="update-button">
|
|
||||||
<template #icon>
|
|
||||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
|
|
||||||
<path
|
|
||||||
d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</template>
|
|
||||||
检查更新
|
|
||||||
</a-button>
|
|
||||||
<div class="update-hint">
|
|
||||||
<span>点击检查是否有新版本可用</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
@@ -1393,6 +1389,47 @@ onMounted(() => {
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* section标题右侧检查更新按钮 */
|
||||||
|
.section-update-button {
|
||||||
|
height: 32px;
|
||||||
|
padding: 0 12px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 2px 6px rgba(22, 119, 255, 0.2);
|
||||||
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
background: linear-gradient(135deg, var(--ant-color-primary), var(--ant-color-primary-hover)) !important;
|
||||||
|
border: none !important;
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-update-button:hover {
|
||||||
|
transform: translateY(-1px);
|
||||||
|
box-shadow: 0 4px 12px rgba(22, 119, 255, 0.3);
|
||||||
|
background: linear-gradient(135deg, #4096ff, #1677ff) !important;
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-update-button:active {
|
||||||
|
transform: translateY(0);
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-update-button:focus {
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-update-button svg {
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-update-button:hover svg {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
|
||||||
/* 垂直排列的表单项 */
|
/* 垂直排列的表单项 */
|
||||||
.form-item-vertical {
|
.form-item-vertical {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -1528,78 +1565,4 @@ onMounted(() => {
|
|||||||
color: var(--ant-color-text-secondary);
|
color: var(--ant-color-text-secondary);
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 检查更新按钮样式 */
|
|
||||||
.update-section {
|
|
||||||
margin-top: 24px;
|
|
||||||
padding: 20px;
|
|
||||||
background: linear-gradient(
|
|
||||||
135deg,
|
|
||||||
var(--ant-color-primary-bg) 0%,
|
|
||||||
var(--ant-color-primary-bg-hover) 100%
|
|
||||||
);
|
|
||||||
border: 1px solid var(--ant-color-primary-border);
|
|
||||||
border-radius: 12px;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.update-section::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
height: 3px;
|
|
||||||
background: linear-gradient(90deg, var(--ant-color-primary), var(--ant-color-primary-hover));
|
|
||||||
}
|
|
||||||
|
|
||||||
.update-button-wrapper {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
gap: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.update-button {
|
|
||||||
height: 48px;
|
|
||||||
padding: 0 32px;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 600;
|
|
||||||
border-radius: 8px;
|
|
||||||
box-shadow: 0 4px 12px rgba(22, 119, 255, 0.3);
|
|
||||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
min-width: 160px;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.update-button:hover {
|
|
||||||
transform: translateY(-2px);
|
|
||||||
box-shadow: 0 6px 20px rgba(22, 119, 255, 0.4);
|
|
||||||
}
|
|
||||||
|
|
||||||
.update-button:active {
|
|
||||||
transform: translateY(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
.update-button svg {
|
|
||||||
transition: transform 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.update-button:hover svg {
|
|
||||||
transform: rotate(180deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.update-hint {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.update-hint span {
|
|
||||||
font-size: 13px;
|
|
||||||
color: var(--ant-color-text-tertiary);
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user