Skip to content

Commit 8221f61

Browse files
committed
feat: add sponsor
1 parent 5f680e9 commit 8221f61

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

docs/.vitepress/components/GImg.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { NImage } from './naive';
33
import { imageSizeList } from '../data/mirror.load';
44
import { convertSrc } from '../utils/img';
55

6-
const imgLoadMap = shallowReactive<Record<string, string | boolean>>({});
6+
const imgLoadMap = shallowReactive<Record<string, boolean>>({});
77

88
const preLoadImg = async (url: string) => {
99
const img = new Image();
@@ -41,13 +41,9 @@ const GImg = defineComponent<{
4141
(props, ctx) => {
4242
const rawSrc = computed(() => convertSrc(props.src));
4343
const src = computed(() => {
44-
const u = imgLoadMap[rawSrc.value];
45-
if (u === true) {
44+
if (imgLoadMap[rawSrc.value]) {
4645
return rawSrc.value;
4746
}
48-
if (typeof u === 'string') {
49-
return u;
50-
}
5147
return getImgPlaceholderUrl(rawSrc.value);
5248
});
5349
return () => {

docs/.vitepress/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export default defineConfig({
4646
{ text: '外部交互', link: '/guide/external' },
4747
{ text: '常见问题', link: '/guide/faq' },
4848
{ text: '隐私政策', link: '/guide/privacy' },
49+
{ text: '捐赠支持', link: '/guide/sponsor' },
4950
],
5051
},
5152
{

docs/.vitepress/theme/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ const handleCompatRedirect = async (router: Router) => {
119119
router.go('/guide/faq#forced-tap');
120120
} else if (r === '9') {
121121
router.go('/guide/faq#work-profile');
122+
}else if (r === '10') {
123+
router.go('/guide/sponsor');
122124
}
123125
} else if (u === '/guide/faq#fail_setting_secure_settings') {
124126
location.hash = 'adb_failed';

docs/guide/sponsor.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# 捐赠支持 {#title}
2+
3+
感谢您对 GKD 的支持!如果您觉得这个项目对您有帮助,欢迎通过以下方式捐赠支持我。
4+
5+
您的支持将帮助我优化功能、修复问题,并为您带来更好的使用体验!感谢您的慷慨支持!
6+
7+
同时您也可以查看 [我的 Github 主页](https://github.com/lisonge),也许其他项目也能对您有所帮助。
8+
9+
---
10+
11+
<GImg src="0046.png" />
12+
13+
---
14+
15+
<GImg src="0047.png" />

0 commit comments

Comments
 (0)