Add website download mirrors (#1189)
This commit is contained in:
@@ -17,12 +17,17 @@ const releaseVersion = __APP_VERSION__.replace(/^v/, '')
|
|||||||
const releaseTag = `v${releaseVersion}`
|
const releaseTag = `v${releaseVersion}`
|
||||||
const releaseBaseUrl = 'https://github.com/EKKOLearnAI/hermes-web-ui/releases'
|
const releaseBaseUrl = 'https://github.com/EKKOLearnAI/hermes-web-ui/releases'
|
||||||
const releaseUrl = `${releaseBaseUrl}/tag/${releaseTag}`
|
const releaseUrl = `${releaseBaseUrl}/tag/${releaseTag}`
|
||||||
const releaseDownloadUrl = `${releaseBaseUrl}/download/${releaseTag}`
|
const githubDownloadUrl = `${releaseBaseUrl}/download/${releaseTag}`
|
||||||
|
const cloudflareDownloadUrl = `https://download.ekkolearnai.com/${releaseTag}`
|
||||||
const desktopDownloads = computed(() =>
|
const desktopDownloads = computed(() =>
|
||||||
(tm('install.desktop.downloads') as DesktopDownload[]).map((item) => ({
|
(tm('install.desktop.downloads') as DesktopDownload[]).map((item) => {
|
||||||
|
const assetName = `Hermes.Studio-${releaseVersion}-${item.assetSuffix}`
|
||||||
|
return {
|
||||||
...item,
|
...item,
|
||||||
href: `${releaseDownloadUrl}/Hermes.Studio-${releaseVersion}-${item.assetSuffix}`,
|
githubHref: `${githubDownloadUrl}/${assetName}`,
|
||||||
})),
|
cloudflareHref: `${cloudflareDownloadUrl}/${assetName}`,
|
||||||
|
}
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
function copyText(text: string) {
|
function copyText(text: string) {
|
||||||
@@ -50,20 +55,34 @@ function copyText(text: string) {
|
|||||||
<div class="install-content reveal reveal-delay-1">
|
<div class="install-content reveal reveal-delay-1">
|
||||||
<template v-if="activeTab === 'desktop'">
|
<template v-if="activeTab === 'desktop'">
|
||||||
<div class="download-list">
|
<div class="download-list">
|
||||||
<a
|
<div
|
||||||
v-for="item in desktopDownloads"
|
v-for="item in desktopDownloads"
|
||||||
:key="item.href"
|
:key="item.githubHref"
|
||||||
class="download-row"
|
class="download-row"
|
||||||
:href="item.href"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener"
|
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<strong>{{ item.title }}</strong>
|
<strong>{{ item.title }}</strong>
|
||||||
<small>{{ item.desc }}</small>
|
<small>{{ item.desc }}</small>
|
||||||
</span>
|
</span>
|
||||||
<span class="download-action">{{ t('install.desktop.download') }}</span>
|
<span class="download-actions">
|
||||||
|
<a
|
||||||
|
class="download-action"
|
||||||
|
:href="item.githubHref"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
>
|
||||||
|
{{ t('install.desktop.githubDownload') }}
|
||||||
</a>
|
</a>
|
||||||
|
<a
|
||||||
|
class="download-action"
|
||||||
|
:href="item.cloudflareHref"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
>
|
||||||
|
{{ t('install.desktop.cloudflareDownload') }}
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a
|
<a
|
||||||
class="all-downloads"
|
class="all-downloads"
|
||||||
@@ -175,12 +194,14 @@ function copyText(text: string) {
|
|||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
||||||
&:first-child {
|
@media (max-width: $breakpoint-mobile) {
|
||||||
padding-top: 0;
|
align-items: flex-start;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover .download-action {
|
&:first-child {
|
||||||
border-color: var(--text-muted);
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
strong,
|
strong,
|
||||||
@@ -200,15 +221,38 @@ function copyText(text: string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.download-action {
|
.download-actions {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
|
@media (max-width: $breakpoint-mobile) {
|
||||||
|
width: 100%;
|
||||||
|
justify-content: stretch;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-action {
|
||||||
|
display: inline-flex;
|
||||||
|
justify-content: center;
|
||||||
border: 1px solid var(--border-color);
|
border: 1px solid var(--border-color);
|
||||||
border-radius: $radius-sm;
|
border-radius: $radius-sm;
|
||||||
padding: 7px 12px;
|
padding: 7px 12px;
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
text-decoration: none;
|
||||||
transition: border-color $transition-fast;
|
transition: border-color $transition-fast;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border-color: var(--text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: $breakpoint-mobile) {
|
||||||
|
flex: 1 1 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.all-downloads {
|
.all-downloads {
|
||||||
|
|||||||
@@ -108,6 +108,8 @@ export default {
|
|||||||
desktop: {
|
desktop: {
|
||||||
title: 'Desktop',
|
title: 'Desktop',
|
||||||
download: 'Download',
|
download: 'Download',
|
||||||
|
githubDownload: 'GitHub Download',
|
||||||
|
cloudflareDownload: 'Cloudflare Download',
|
||||||
allDownloads: 'View all release assets',
|
allDownloads: 'View all release assets',
|
||||||
prereq: 'Desktop builds bundle the Web UI runtime.',
|
prereq: 'Desktop builds bundle the Web UI runtime.',
|
||||||
downloads: [
|
downloads: [
|
||||||
|
|||||||
@@ -108,6 +108,8 @@ export default {
|
|||||||
desktop: {
|
desktop: {
|
||||||
title: '桌面版',
|
title: '桌面版',
|
||||||
download: '下载',
|
download: '下载',
|
||||||
|
githubDownload: 'GitHub 下载',
|
||||||
|
cloudflareDownload: 'Cloudflare 下载',
|
||||||
allDownloads: '查看全部发布文件',
|
allDownloads: '查看全部发布文件',
|
||||||
prereq: '桌面版已内置 Web UI 运行时。',
|
prereq: '桌面版已内置 Web UI 运行时。',
|
||||||
downloads: [
|
downloads: [
|
||||||
|
|||||||
Reference in New Issue
Block a user