Skip to content

Commit 4eeaec9

Browse files
committed
feat: 新增赞助商模块
1 parent 8e8bbbf commit 4eeaec9

6 files changed

Lines changed: 154 additions & 65 deletions

File tree

app/pages/activate.vue

Lines changed: 78 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ function handleMenuClick(key: string) {
2424
navigateTo(localePath(`/activate/${key}`))
2525
drawerVisible.value = false
2626
}
27+
28+
const rainyunAdUrlBase64 =
29+
'aHR0cHM6Ly93d3cucmFpbnl1bi5jb20vbW1fP3M9a21zLXRvb2xz'
30+
31+
function handleRainyunAdClick() {
32+
window.open(atob(rainyunAdUrlBase64), '_blank', 'noopener,noreferrer')
33+
}
2734
</script>
2835

2936
<template>
@@ -73,6 +80,22 @@ function handleMenuClick(key: string) {
7380
</AMenuItem>
7481
</ASubMenu>
7582
</AMenu>
83+
84+
<div
85+
class="hover:bg-[var(--color-fill-2)]/50 group relative mt-4 flex rounded-lg bg-[var(--color-bg-2)] p-2 ring-1 ring-[var(--color-border)] transition"
86+
>
87+
<button
88+
type="button"
89+
class="flex w-full flex-col items-start gap-y-2 text-left"
90+
@click="handleRainyunAdClick"
91+
>
92+
<img
93+
src="/images/rainyun_1.png"
94+
alt="RainYun"
95+
class="h-auto w-full rounded-md object-cover"
96+
/>
97+
</button>
98+
</div>
7699
</ADrawer>
77100

78101
<!-- Mobile: page content -->
@@ -85,45 +108,65 @@ function handleMenuClick(key: string) {
85108
:width="240"
86109
class="hidden rounded md:block [&>.arco-layout-sider-children]:rounded"
87110
>
88-
<AMenu
89-
:selected-keys="path"
90-
:default-open-keys="['system', 'software']"
91-
class="h-full select-none [&>.arco-menu-inner]:p-2 [&_.arco-menu-icon>i]:inline-block"
92-
>
93-
<ASubMenu key="system">
94-
<template #icon>
95-
<Icon name="icons:system" />
96-
</template>
97-
<template #title>{{ t('label.system') }}</template>
98-
<AMenuItem key="windows" @click="handleMenuClick('windows')">
111+
<div class="flex h-full flex-col">
112+
<AMenu
113+
:selected-keys="path"
114+
:default-open-keys="['system', 'software']"
115+
class="flex-1 select-none [&>.arco-menu-inner]:p-2 [&_.arco-menu-icon>i]:inline-block"
116+
>
117+
<ASubMenu key="system">
99118
<template #icon>
100-
<Icon name="icons:windows" />
119+
<Icon name="icons:system" />
101120
</template>
102-
<span>Windows</span>
103-
</AMenuItem>
104-
<AMenuItem
105-
key="windows-server"
106-
@click="handleMenuClick('windows-server')"
107-
>
108-
<template #icon>
109-
<Icon name="icons:windows-server" />
110-
</template>
111-
<span>Windows Server</span>
112-
</AMenuItem>
113-
</ASubMenu>
114-
<ASubMenu key="software">
115-
<template #icon>
116-
<Icon name="icons:software" />
117-
</template>
118-
<template #title>{{ t('label.software') }}</template>
119-
<AMenuItem key="office" @click="handleMenuClick('office')">
121+
<template #title>{{ t('label.system') }}</template>
122+
<AMenuItem key="windows" @click="handleMenuClick('windows')">
123+
<template #icon>
124+
<Icon name="icons:windows" />
125+
</template>
126+
<span>Windows</span>
127+
</AMenuItem>
128+
<AMenuItem
129+
key="windows-server"
130+
@click="handleMenuClick('windows-server')"
131+
>
132+
<template #icon>
133+
<Icon name="icons:windows-server" />
134+
</template>
135+
<span>Windows Server</span>
136+
</AMenuItem>
137+
</ASubMenu>
138+
<ASubMenu key="software">
120139
<template #icon>
121-
<Icon name="icons:office" />
140+
<Icon name="icons:software" />
122141
</template>
123-
<span>Office</span>
124-
</AMenuItem>
125-
</ASubMenu>
126-
</AMenu>
142+
<template #title>{{ t('label.software') }}</template>
143+
<AMenuItem key="office" @click="handleMenuClick('office')">
144+
<template #icon>
145+
<Icon name="icons:office" />
146+
</template>
147+
<span>Office</span>
148+
</AMenuItem>
149+
</ASubMenu>
150+
</AMenu>
151+
152+
<div class="p-2 pt-0">
153+
<div
154+
class="hover:bg-[var(--color-fill-2)]/50 group relative flex rounded-lg bg-[var(--color-bg-2)] p-2 ring-1 ring-[var(--color-border)] transition"
155+
>
156+
<button
157+
type="button"
158+
class="flex w-full flex-col items-start gap-y-2 text-left"
159+
@click="handleRainyunAdClick"
160+
>
161+
<img
162+
src="/images/rainyun_1.png"
163+
alt="RainYun"
164+
class="h-auto w-full rounded-md object-cover"
165+
/>
166+
</button>
167+
</div>
168+
</div>
169+
</div>
127170
</ALayoutSider>
128171
<ALayoutContent class="hidden flex-col gap-4 md:flex">
129172
<NuxtPage />

app/pages/index.vue

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ const features = computed(() => [
1919
link: '/monitor'
2020
}
2121
])
22+
23+
function openBase64Url(urlBase64: string) {
24+
window.open(atob(urlBase64), '_blank', 'noopener,noreferrer')
25+
}
2226
</script>
2327

2428
<template>
@@ -105,5 +109,65 @@ const features = computed(() => [
105109
</NuxtLink>
106110
</div>
107111
</div>
112+
113+
<!-- Sponsors Section -->
114+
<div class="w-full rounded bg-[var(--color-bg-2)] p-6 shadow-lg md:p-10">
115+
<div class="mb-6 text-center md:mb-8">
116+
<h3
117+
class="mb-2 text-2xl font-bold text-[var(--color-text-1)] md:text-3xl"
118+
>
119+
{{ t('home.sponsors.title') }}
120+
</h3>
121+
<p class="text-sm text-[var(--color-text-3)] md:text-base">
122+
{{ t('home.sponsors.subtitle') }}
123+
</p>
124+
</div>
125+
<div class="grid grid-cols-1 gap-4 md:grid-cols-2 md:gap-6">
126+
<button
127+
type="button"
128+
class="group flex items-center justify-between rounded-lg border border-[var(--color-border)] p-5 text-left transition-all hover:border-[rgb(var(--primary-6))] hover:shadow-md md:p-6"
129+
@click="openBase64Url('aHR0cHM6Ly9jaGF0Lm1hcmtodWIudG9wLw==')"
130+
>
131+
<div>
132+
<h4
133+
class="mb-1 text-lg font-semibold text-[var(--color-text-1)] group-hover:text-[rgb(var(--primary-6))]"
134+
>
135+
MarkHub AI
136+
</h4>
137+
<p class="text-sm text-[var(--color-text-3)]">
138+
{{ t('home.sponsors.visit') }}
139+
</p>
140+
</div>
141+
<Icon
142+
name="tabler:external-link"
143+
class="text-xl text-[var(--color-text-3)] transition-colors group-hover:text-[rgb(var(--primary-6))]"
144+
/>
145+
</button>
146+
<button
147+
type="button"
148+
class="group flex items-center justify-between rounded-lg border border-[var(--color-border)] p-5 text-left transition-all hover:border-[rgb(var(--primary-6))] hover:shadow-md md:p-6"
149+
@click="
150+
openBase64Url(
151+
'aHR0cHM6Ly93d3cucmFpbnl1bi5jb20vbW1fP3M9a21zLXRvb2xz'
152+
)
153+
"
154+
>
155+
<div>
156+
<h4
157+
class="mb-1 text-lg font-semibold text-[var(--color-text-1)] group-hover:text-[rgb(var(--primary-6))]"
158+
>
159+
RainYun
160+
</h4>
161+
<p class="text-sm text-[var(--color-text-3)]">
162+
{{ t('home.sponsors.visit') }}
163+
</p>
164+
</div>
165+
<Icon
166+
name="tabler:external-link"
167+
class="text-xl text-[var(--color-text-3)] transition-colors group-hover:text-[rgb(var(--primary-6))]"
168+
/>
169+
</button>
170+
</div>
171+
</div>
108172
</div>
109173
</template>

i18n/locales/en.json

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
"title": "Real-time Monitoring",
2626
"description": "Continuously monitor KMS server status with visual charts for success rate and latency"
2727
}
28+
},
29+
"sponsors": {
30+
"title": "Sponsors",
31+
"subtitle": "Thanks to our partners for supporting KMS Tools",
32+
"visit": "Visit Website"
2833
}
2934
},
3035
"pages": {
@@ -110,21 +115,7 @@
110115
"delay": "Delay"
111116
},
112117
"footer": {
113-
"badge": "Arco Design System",
114-
"description": "Lightweight online utilities for activation workflows, KMS diagnostics and service monitoring.",
115-
"openSource": "Open Source",
116-
"sections": {
117-
"product": "Product",
118-
"resources": "Resources"
119-
},
120-
"links": {
121-
"github": "GitHub Repository",
122-
"blog": "Author Blog",
123-
"hosting": "Cloud Hosting"
124-
},
125-
"copyright": "Copyright",
126-
"runningOn": "Running on",
127-
"codeBy": "Code by"
118+
"description": "Lightweight online utilities for activation workflows, KMS diagnostics and service monitoring."
128119
},
129120
"title": {
130121
"kms-check": "KMS Server Check",

i18n/locales/zh-cn.json

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
"title": "实时监控",
2626
"description": "持续监控 KMS 服务器运行状态,可视化展示成功率与延迟数据"
2727
}
28+
},
29+
"sponsors": {
30+
"title": "赞助商",
31+
"subtitle": "感谢以下伙伴对 KMS Tools 的支持",
32+
"visit": "访问官网"
2833
}
2934
},
3035
"pages": {
@@ -110,21 +115,7 @@
110115
"delay": "延迟"
111116
},
112117
"footer": {
113-
"badge": "Arco 设计体系",
114-
"description": "简洁稳定的 KMS 在线工具,覆盖激活、检测与监控场景,提供一致、可靠的操作体验。",
115-
"openSource": "开源项目",
116-
"sections": {
117-
"product": "产品功能",
118-
"resources": "相关资源"
119-
},
120-
"links": {
121-
"github": "GitHub 仓库",
122-
"blog": "作者博客",
123-
"hosting": "云服务"
124-
},
125-
"copyright": "版权所有",
126-
"runningOn": "运行于",
127-
"codeBy": "开发者"
118+
"description": "简洁稳定的 KMS 在线工具,覆盖激活、检测与监控场景,提供一致、可靠的操作体验。"
128119
},
129120
"title": {
130121
"kms-check": "KMS 服务器检测",

public/images/rainyun_1.png

81.3 KB
Loading

public/images/rainyun_2.png

93.8 KB
Loading

0 commit comments

Comments
 (0)