Skip to content

Commit 51c5108

Browse files
committed
disable download button
1 parent 5f02ea8 commit 51c5108

2 files changed

Lines changed: 52 additions & 25 deletions

File tree

i18n/zh-CN/docusaurus-plugin-content-pages/download-page.mdx

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,14 @@ export const DownloadPage = () => {
3434
const toolItems = [
3535
{
3636
key: 'assess-x86',
37-
name: 'Assess 迁移工具',
37+
name: '评估工具',
3838
version: '1.0.0',
3939
platform: 'Linux x86_64',
4040
size: '',
4141
checksumAlgo: 'MD5',
4242
sha256: '8a75568de634f5f6ace18797d0d217d8',
4343
url: 'https://yum.highgo.com/dists/IvorySQL/download/assess-1.0.0-linux.gtk.x86_64.tar.gz',
44+
disabled: true,
4445
},
4546
];
4647

@@ -145,13 +146,20 @@ export const DownloadPage = () => {
145146
</div>
146147

147148
<div style={{ padding: '14px 16px', textAlign: 'center' }}>
148-
<a href={item.url}
149-
style={{ display: 'inline-flex', alignItems: 'center', gap: '5px', fontSize: '0.82rem', fontWeight: 600, color: accentColor, textDecoration: 'none', padding: '6px 12px', borderRadius: '6px', border: `1px solid ${accentColor}40`, background: `${accentColor}08`, transition: 'background 0.15s', whiteSpace: 'nowrap' }}
150-
onMouseEnter={e => { e.currentTarget.style.background = `${accentColor}18`; }}
151-
onMouseLeave={e => { e.currentTarget.style.background = `${accentColor}08`; }}>
152-
<svg width="13" height="13" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth="2.2"><path strokeLinecap="round" strokeLinejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" /></svg>
153-
下载
154-
</a>
149+
{item.disabled ? (
150+
<span style={{ display: 'inline-flex', alignItems: 'center', gap: '5px', fontSize: '0.82rem', fontWeight: 600, color: '#cbd5e1', padding: '6px 12px', borderRadius: '6px', border: '1px solid #e2e8f0', background: '#f8fafc', whiteSpace: 'nowrap', cursor: 'not-allowed' }}>
151+
<svg width="13" height="13" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth="2.2"><path strokeLinecap="round" strokeLinejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" /></svg>
152+
下载
153+
</span>
154+
) : (
155+
<a href={item.url}
156+
style={{ display: 'inline-flex', alignItems: 'center', gap: '5px', fontSize: '0.82rem', fontWeight: 600, color: accentColor, textDecoration: 'none', padding: '6px 12px', borderRadius: '6px', border: `1px solid ${accentColor}40`, background: `${accentColor}08`, transition: 'background 0.15s', whiteSpace: 'nowrap' }}
157+
onMouseEnter={e => { e.currentTarget.style.background = `${accentColor}18`; }}
158+
onMouseLeave={e => { e.currentTarget.style.background = `${accentColor}08`; }}>
159+
<svg width="13" height="13" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth="2.2"><path strokeLinecap="round" strokeLinejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" /></svg>
160+
下载
161+
</a>
162+
)}
155163
</div>
156164
</div>
157165
))}

src/pages/download-page.mdx

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,14 @@ export const DownloadPage = () => {
3434
const toolItems = [
3535
{
3636
key: 'assess-x86',
37-
name: 'Assess Migration Tool',
37+
name: 'Assessment Tool',
3838
version: '1.0.0',
3939
platform: 'Linux x86_64',
4040
size: '',
4141
checksumAlgo: 'MD5',
4242
sha256: '8a75568de634f5f6ace18797d0d217d8',
4343
url: 'https://yum.highgo.com/dists/IvorySQL/download/assess-1.0.0-linux.gtk.x86_64.tar.gz',
44+
disabled: true,
4445
},
4546
];
4647

@@ -167,26 +168,44 @@ export const DownloadPage = () => {
167168

168169
{/* Download */}
169170
<div style={{ padding: '14px 16px', textAlign: 'center' }}>
170-
<a
171-
href={item.url}
172-
style={{
171+
{item.disabled ? (
172+
<span style={{
173173
display: 'inline-flex', alignItems: 'center', gap: '5px',
174174
fontSize: '0.82rem', fontWeight: 600,
175-
color: accentColor, textDecoration: 'none',
175+
color: '#cbd5e1',
176176
padding: '6px 12px', borderRadius: '6px',
177-
border: `1px solid ${accentColor}40`,
178-
background: `${accentColor}08`,
179-
transition: 'background 0.15s',
177+
border: '1px solid #e2e8f0',
178+
background: '#f8fafc',
180179
whiteSpace: 'nowrap',
181-
}}
182-
onMouseEnter={e => { e.currentTarget.style.background = `${accentColor}18`; }}
183-
onMouseLeave={e => { e.currentTarget.style.background = `${accentColor}08`; }}
184-
>
185-
<svg width="13" height="13" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth="2.2">
186-
<path strokeLinecap="round" strokeLinejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />
187-
</svg>
188-
下载
189-
</a>
180+
cursor: 'not-allowed',
181+
}}>
182+
<svg width="13" height="13" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth="2.2">
183+
<path strokeLinecap="round" strokeLinejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />
184+
</svg>
185+
下载
186+
</span>
187+
) : (
188+
<a
189+
href={item.url}
190+
style={{
191+
display: 'inline-flex', alignItems: 'center', gap: '5px',
192+
fontSize: '0.82rem', fontWeight: 600,
193+
color: accentColor, textDecoration: 'none',
194+
padding: '6px 12px', borderRadius: '6px',
195+
border: `1px solid ${accentColor}40`,
196+
background: `${accentColor}08`,
197+
transition: 'background 0.15s',
198+
whiteSpace: 'nowrap',
199+
}}
200+
onMouseEnter={e => { e.currentTarget.style.background = `${accentColor}18`; }}
201+
onMouseLeave={e => { e.currentTarget.style.background = `${accentColor}08`; }}
202+
>
203+
<svg width="13" height="13" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth="2.2">
204+
<path strokeLinecap="round" strokeLinejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />
205+
</svg>
206+
下载
207+
</a>
208+
)}
190209
</div>
191210
</div>
192211
))}

0 commit comments

Comments
 (0)