From 47d590d6a1ef0c60e103976e2ee8fc112ec1e376 Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Tue, 17 Jun 2025 18:37:05 +0800 Subject: [PATCH] refactor: say good night to YukiReflection --- README-zh-CN.md | 4 ++ README.md | 5 +++ docs-source/src/.vuepress/client.ts | 38 +++++++++++++++++++ .../.vuepress/components/DeprecatedBanner.vue | 35 +++++++++++++++++ 4 files changed, 82 insertions(+) create mode 100644 docs-source/src/.vuepress/client.ts create mode 100644 docs-source/src/.vuepress/components/DeprecatedBanner.vue diff --git a/README-zh-CN.md b/README-zh-CN.md index 169137a..5196842 100644 --- a/README-zh-CN.md +++ b/README-zh-CN.md @@ -17,6 +17,10 @@ 这个项目属于上述组织,**点击上方链接关注这个组织**,发现更多好项目。 +## 🚨 此项目已停止维护 + +此项目由于很多未能解决的黑盒问题已被弃用,我们不再推荐任何人使用它,现在请迁移到全新设计的 [KavaRef](https://github.com/HighCapable/KavaRef)。 + ## 这是什么 这是一个使用 Kotlin 基于 Java 原生反射 API 重新打造的一套简洁、高效的反射 API,同时也是 [YukiHookAPI](https://github.com/HighCapable/YukiHookAPI) diff --git a/README.md b/README.md index f0c4f72..2109c96 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,11 @@ English | [简体中文](README-zh-CN.md) This project belongs to the above-mentioned organization, **click the link above to follow this organization** and discover more good projects. +## 🚨 Maintenance of this project has been stopped + +The `YukiReflection` project has been deprecated due to many unsolved black box issues, so we no longer recommend anyone to use it. +Please now migrate to the brand new design [KavaRef](https://github.com/HighCapable/KavaRef). + ## What's this This is a concise and efficient Reflection API rebuilt based on Java's native Reflection API using Kotlin, diff --git a/docs-source/src/.vuepress/client.ts b/docs-source/src/.vuepress/client.ts new file mode 100644 index 0000000..948a605 --- /dev/null +++ b/docs-source/src/.vuepress/client.ts @@ -0,0 +1,38 @@ +import { defineClientConfig } from '@vuepress/client' +import { h, onMounted, watch } from 'vue' +import DeprecatedBanner from './components/DeprecatedBanner.vue' +import { useRoute } from 'vue-router' + +export default defineClientConfig({ + rootComponents: [ + () => h(DeprecatedBanner) + ], + setup() { + const route = useRoute() + + const adjustLayout = () => { + requestAnimationFrame(() => { + const banner = document.querySelector('.deprecated-banner') as HTMLElement + const height = banner?.clientHeight ?? 0 + + const themeContainer = document.querySelector('.theme-container') as HTMLElement + const navbar = document.querySelector('.navbar') as HTMLElement + const sidebar = document.querySelector('.sidebar') as HTMLElement + + if (height > 0) { + if (themeContainer) themeContainer.style.paddingTop = `${height}px` + if (navbar) navbar.style.marginTop = `${height}px` + if (sidebar) sidebar.style.marginTop = `${height}px` + } + }) + } + + onMounted(() => { + adjustLayout() + }) + + watch(() => route.path, () => { + adjustLayout() + }) + } +}) \ No newline at end of file diff --git a/docs-source/src/.vuepress/components/DeprecatedBanner.vue b/docs-source/src/.vuepress/components/DeprecatedBanner.vue new file mode 100644 index 0000000..4791b7c --- /dev/null +++ b/docs-source/src/.vuepress/components/DeprecatedBanner.vue @@ -0,0 +1,35 @@ + + + \ No newline at end of file