forked from boos/BoosAPI
feat(desktop): embed BoosAPI Desktop client as a subproject
Vendor the rebranded BoosAPI Desktop client (Tauri + Vue) into metapi as a monorepo subdirectory under desktop/. Source only — node_modules, dist, Cargo target and the upstream .git history are excluded. desktop/ keeps its own independent Cargo workspace (desktop/src-tauri with crates/*); it is not part of the backend boosapi crate, so a `cargo check` at the metapi root still compiles only the backend. Build the desktop app from desktop/src-tauri per desktop/README.md. Note: app icons are still placeholder assets pending the final BoosAPI logo. The updater signing keys live outside the repo and are not included.
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onMounted } from 'vue';
|
||||
import { useData } from 'vitepress';
|
||||
import {
|
||||
AppleOutlined,
|
||||
WindowsOutlined,
|
||||
ReadOutlined,
|
||||
} from '@ant-design/icons-vue';
|
||||
|
||||
declare const __APP_VERSION__: string;
|
||||
const VERSION = __APP_VERSION__;
|
||||
|
||||
const { lang } = useData();
|
||||
const isZh = computed(() => lang.value === 'zh-CN');
|
||||
|
||||
const detectedOS = ref<'macos' | 'windows' | 'linux'>('macos');
|
||||
|
||||
onMounted(() => {
|
||||
const ua = navigator.userAgent.toLowerCase();
|
||||
if (ua.includes('win')) {
|
||||
detectedOS.value = 'windows';
|
||||
} else if (ua.includes('linux')) {
|
||||
detectedOS.value = 'linux';
|
||||
} else {
|
||||
detectedOS.value = 'macos';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="download-bar">
|
||||
<a href="/download" class="dl-btn dl-primary">
|
||||
<AppleOutlined v-if="detectedOS === 'macos'" class="os-icon" />
|
||||
<WindowsOutlined v-else-if="detectedOS === 'windows'" class="os-icon" />
|
||||
<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-.7-3.9-1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 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>
|
||||
<span>{{ isZh ? '下载' : 'Download' }} v{{ VERSION }}</span>
|
||||
</a>
|
||||
<a href="/features" class="dl-btn dl-docs">
|
||||
<ReadOutlined class="os-icon" />
|
||||
<span>{{ isZh ? '文档' : 'Docs' }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.download-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 20px;
|
||||
padding: 32px 0 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.dl-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
padding: 0 36px;
|
||||
height: 56px;
|
||||
border-radius: 28px;
|
||||
font-size: 17px;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
transition: all 0.25s ease;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.dl-primary {
|
||||
background: var(--vp-c-bg);
|
||||
color: var(--vp-c-text-1);
|
||||
border: 2px solid var(--vp-c-divider);
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
.dl-primary:hover {
|
||||
border-color: var(--vp-c-brand-1);
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.dark .dl-primary {
|
||||
background: var(--vp-c-bg-soft);
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.dl-docs {
|
||||
color: var(--vp-c-text-1);
|
||||
border: 2px solid var(--vp-c-divider);
|
||||
background: transparent;
|
||||
}
|
||||
.dl-docs:hover {
|
||||
border-color: var(--vp-c-brand-1);
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.os-icon {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.dl-btn {
|
||||
padding: 0 28px;
|
||||
height: 50px;
|
||||
font-size: 15px;
|
||||
border-radius: 25px;
|
||||
gap: 8px;
|
||||
}
|
||||
.download-bar {
|
||||
gap: 14px;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.dl-btn {
|
||||
padding: 0 24px;
|
||||
height: 48px;
|
||||
font-size: 15px;
|
||||
border-radius: 24px;
|
||||
gap: 8px;
|
||||
width: 100%;
|
||||
}
|
||||
.download-bar {
|
||||
gap: 12px;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
padding: 24px 16px 8px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user