11<script setup lang="ts">
22import { ref , computed , onMounted } from ' vue' ;
33import { useData } from ' vitepress' ;
4- import { ArrowRight } from ' lucide-vue-next' ;
4+ import {
5+ AppleOutlined ,
6+ WindowsOutlined ,
7+ ReadOutlined ,
8+ } from ' @ant-design/icons-vue' ;
59
610declare const __APP_VERSION__: string ;
711const VERSION = __APP_VERSION__ ;
@@ -21,36 +25,19 @@ onMounted(() => {
2125 detectedOS .value = ' macos' ;
2226 }
2327});
24-
25- const osLabel = computed (() => {
26- const labels: Record <string , { en: string ; zh: string }> = {
27- macos: { en: ' for macOS' , zh: ' macOS 版' },
28- windows: { en: ' for Windows' , zh: ' Windows 版' },
29- linux: { en: ' for Linux' , zh: ' Linux 版' },
30- };
31- const l = labels [detectedOS .value ];
32- return isZh .value ? l .zh : l .en ;
33- });
3428 </script >
3529
3630<template >
3731 <div class =" download-bar" >
3832 <a href =" /download" class =" dl-btn dl-primary" >
39- <!-- OS icon -->
40- <svg v-if =" detectedOS === 'macos'" class =" os-icon" xmlns =" http://www.w3.org/2000/svg" width =" 20" height =" 20" viewBox =" 0 0 24 24" fill =" currentColor" >
41- <path d =" M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.8-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z" />
42- </svg >
43- <svg v-else-if =" detectedOS === 'windows'" class =" os-icon" xmlns =" http://www.w3.org/2000/svg" width =" 20" height =" 20" viewBox =" 0 0 24 24" fill =" currentColor" >
44- <path d =" M3 12V6.5l8-1.1V12H3zm10 0V5.2l8-1.2V12h-8zM3 13h8v6.6l-8-1.1V13zm10 0h8v6l-8 1.2V13z" />
45- </svg >
46- <svg v-else class =" os-icon" xmlns =" http://www.w3.org/2000/svg" width =" 20" height =" 20" viewBox =" 0 0 448 512" fill =" currentColor" >
47- <path d="M220.8 123.3c1 .5 1.8 1.7 3 1.7 1.1 0 2.8-.4 2.9-1.5.2-1.4-1.9-2.3-3.2-2.9-1.7-.7-3.9-1-5.5-.1-.4.2-.8.7-.6 1.1.3 1.3 2.3 1.1 3.4 1.7zm-21.9 1.7c1.2 0 2-1.2 3-1.7 1.1-.6 3.1-.4 3.5-1.6.2-.4-.2-.9-.6-1.1-1.6-.9-3.8-.6-5.5.1-1.3.6-3.4 1.5-3.2 2.9.1 1 1.8 1.5 2.8 1.4zM420 403.8c-3.6-4-5.3-11.6-7.2-19.7-1.8-8.1-3.9-16.8-10.5-22.4-1.3-1.1-2.6-2.1-4-2.9-1.3-.8-2.7-1.5-4.1-2 9.2-27.3 5.6-54.5-3.7-79.1-11.4-30.1-31.3-56.4-46.5-74.4-17.1-21.5-33.7-41.9-33.4-72C311.1 85.4 315.7.1 234.8 0 132.4-.2 158 85.4 157.7 130.9c.3 30.4-16.3 51-33.4 72-15.2 18-35.1 44.3-46.5 74.4-9.3 24.6-12.9 51.8-3.7 79.1-1.4.5-2.8 1.2-4.1 2-1.4.8-2.7 1.8-4 2.9-6.6 5.6-8.7 14.3-10.5 22.4-1.9 8.1-3.6 15.7-7.2 19.7-6.3 6.7-7.1 16.5-3.5 22.9 3.6 6.4 11.5 9.5 18.5 6.9 3.6-1.3 6.5-4 9.1-6.5 2.5-2.5 4.9-5 7.9-6.5 5.4-2.8 12.4-2.3 19-1.2 6.8 1.2 13.2 3.1 18.8 1.9 12.2-2.6 16.5-11.1 23.7-16.9.5-.4.4-1.2-.1-1.6-.4-.3-1-.3-1.4.1-3.6 4-10.1 12.6-19.4 14.5-5.1 1-11.1-1-17.5-2.1-6.4-1.2-13.5-1.6-19.4 1.4-3.5 1.8-6.1 4.6-8.7 7.1-2.6 2.6-5.1 4.9-8.2 6-4.3 1.6-9.4-.3-11.7-4.4-2.3-4.1-1.7-10.6 2.6-15.1 4.5-4.9 6.3-13.5 8.2-21.5 1.9-8.1 3.9-16.3 9.6-21.1 2.4-2 5.3-3.2 8.3-3.5 2 12.3 9.2 23.4 19.5 31.1 1.4 1 1 3.6-.5 4.1-5.1 1.6-7.4 6.5-4.8 10.4 2.5 3.7 7.9 4.7 11.6 2.2 3.8-2.5 5.1-7.8 2.6-11.6-.5-.8-1.2-1.4-1.9-1.9 1.4-.5 2.4-1.8 2.1-3.2-.3-1.3-1.7-2.2-3-2.2h-.7c3.4-3.7 6.2-8.1 7.9-13 4.3.3 8.4 2 11.3 5.1 4.4 4.8 5.3 11.7 7.1 18 1.8 6.2 4.5 12.4 10.2 15.7 2.5 1.4 5.6 2 8.5 1 2.5-.9 4.3-3.1 5-5.7.4-1.5.2-3.1-.4-4.5-1.4-3.2-4.6-5-7.6-6.6-3-1.5-6.2-3-8-5.8-1.6-2.5-2-5.6-1.2-8.5.6-2.2 2.1-4.2 4.2-5 3.2-1.2 6.7.3 8.5 3.1 1 1.5 1.4 3.4 1.2 5.2.2.5.4 1 .5 1.5.3 1 .5 2.1.5 3.2 0 3.5-1.3 6.8-3.5 9.3 2.4 1.7 5.2 2.7 8.2 2.7 4.4 0 8.5-2.1 11.1-5.5 2.8-3.7 3.5-8.6 1.8-12.9z"/>
48- </svg >
33+ <AppleOutlined v-if =" detectedOS === 'macos'" class =" os-icon" />
34+ <WindowsOutlined v-else-if =" detectedOS === 'windows'" class =" os-icon" />
35+ <svg v-else class="os-icon" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 448 512" fill="currentColor"><path d="M220.8 123.3c1 .5 1.8 1.7 3 1.7 1.1 0 2.8-.4 2.9-1.5.2-1.4-1.9-2.3-3.2-2.9-1.7-.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6.5-4.8 10.4 2.5 3.7 7.9 4.7 11.6 2.2 3.8-2.5 5.1-7.8 2.6-11.6-.5-.8-1.2-1.4-1.9-1.9 1.4-.5 2.4-1.8 2.1-3.2-.3-1.3-1.7-2.2-3-2.2h-.7c3.4-3.7 6.2-8.1 7.9-13 4.3.3 8.4 2 11.3 5.1 4.4 4.8 5.3 11.7 7.1 18 1.8 6.2 4.5 12.4 10.2 15.7 2.5 1.4 5.6 2 8.5 1 2.5-.9 4.3-3.1 5-5.7.4-1.5.2-3.1-.4-4.5-1.4-3.2-4.6-5-7.6-6.6-3-1.5-6.2-3-8-5.8-1.6-2.5-2-5.6-1.2-8.5.6-2.2 2.1-4.2 4.2-5 3.2-1.2 6.7.3 8.5 3.1 1 1.5 1.4 3.4 1.2 5.2.2.5.4 1 .5 1.5.3 1 .5 2.1.5 3.2 0 3.5-1.3 6.8-3.5 9.3 2.4 1.7 5.2 2.7 8.2 2.7 4.4 0 8.5-2.1 11.1-5.5 2.8-3.7 3.5-8.6 1.8-12.9z"/></svg>
4936 <span >{{ isZh ? '下载' : 'Download' }} v{{ VERSION }}</span >
5037 </a >
5138 <a href =" /features" class =" dl-btn dl-docs" >
39+ <ReadOutlined class =" os-icon" />
5240 <span >{{ isZh ? '文档' : 'Docs' }}</span >
53- <ArrowRight :size =" 18" />
5441 </a >
5542 </div >
5643</template >
@@ -100,12 +87,12 @@ const osLabel = computed(() => {
10087
10188.dl-docs {
10289 color : var (--vp-c-text-1 );
103- border : 2px solid var (--vp-c-text-3 );
90+ border : 2px solid var (--vp-c-divider );
10491 background : transparent ;
10592}
10693.dl-docs :hover {
10794 border-color : var (--vp-c-brand-1 );
108- color : var ( --vp-c-brand-1 );
95+ box-shadow : 0 4 px 20 px rgba ( 0 , 0 , 0 , 0.12 );
10996 transform : translateY (-1px );
11097}
11198
0 commit comments