mirror of
https://ghproxy.com/https://github.com/StreakingMan/solvable-sheep-game
synced 2026-07-29 18:56:38 +08:00
feat: diy模式区分入口
This commit is contained in:
+28
-19
@@ -41,6 +41,7 @@ const App: FC<{ theme: Theme<any> }> = ({ theme: initTheme }) => {
|
||||
|
||||
// 生产环境才统计
|
||||
useEffect(() => {
|
||||
if (__DIY__) return;
|
||||
console.log(import.meta.env.MODE);
|
||||
if (import.meta.env.PROD) {
|
||||
const busuanziScript = document.createElement('script');
|
||||
@@ -71,31 +72,39 @@ const App: FC<{ theme: Theme<any> }> = ({ theme: initTheme }) => {
|
||||
/>
|
||||
<PersonalInfo />
|
||||
<div className={'flex-spacer'} />
|
||||
<p style={{ textAlign: 'center', fontSize: 10, opacity: 0.5 }}>
|
||||
<span id="busuanzi_container_site_pv">
|
||||
累计访问:
|
||||
<span id="busuanzi_value_site_pv" />次
|
||||
</span>
|
||||
<br />
|
||||
<BeiAn />
|
||||
</p>
|
||||
<Suspense fallback={<span>Loading</span>}>
|
||||
{!theme.pure && (
|
||||
<>
|
||||
<Info />
|
||||
<ThemeChanger
|
||||
changeTheme={changeTheme}
|
||||
onDiyClick={() => setDiyDialogShow(true)}
|
||||
/>
|
||||
{!__DIY__ && (
|
||||
<p
|
||||
style={{
|
||||
textAlign: 'center',
|
||||
fontSize: 10,
|
||||
opacity: 0.5,
|
||||
}}
|
||||
>
|
||||
<span id="busuanzi_container_site_pv">
|
||||
累计访问:
|
||||
<span id="busuanzi_value_site_pv" />次
|
||||
</span>
|
||||
<br />
|
||||
<BeiAn />
|
||||
</p>
|
||||
)}
|
||||
{!__DIY__ && !theme.pure && (
|
||||
<>
|
||||
<Info />
|
||||
<ThemeChanger
|
||||
changeTheme={changeTheme}
|
||||
onDiyClick={() => setDiyDialogShow(true)}
|
||||
/>
|
||||
<Suspense fallback={<span>Loading</span>}>
|
||||
{diyDialogShow && (
|
||||
<ConfigDialog
|
||||
closeMethod={() => setDiyDialogShow(false)}
|
||||
previewMethod={previewTheme}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</Suspense>
|
||||
</Suspense>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -142,8 +142,9 @@ const Symbol: FC<SymbolProps> = ({ x, y, icon, isCover, status, onClick }) => {
|
||||
style={{ opacity: isCover ? 0.4 : 1 }}
|
||||
>
|
||||
{typeof icon.content === 'string' ? (
|
||||
icon.content.startsWith('http') ? (
|
||||
/*图片外链*/
|
||||
icon.content.startsWith('http') ||
|
||||
icon.content.startsWith('/') ? (
|
||||
/*图片地址*/
|
||||
<img src={icon.content} alt="" />
|
||||
) : (
|
||||
/*字符表情*/
|
||||
|
||||
@@ -57,6 +57,8 @@ Bmob.initialize(
|
||||
import.meta.env.VITE_BMOB_SECCODE
|
||||
);
|
||||
|
||||
console.log(import.meta.env);
|
||||
|
||||
const loadTheme = () => {
|
||||
// 请求主题
|
||||
if (customThemeIdFromPath) {
|
||||
|
||||
Vendored
+1
@@ -1 +1,2 @@
|
||||
/// <reference types="vite/client" />
|
||||
declare const __DIY__: boolean;
|
||||
|
||||
Reference in New Issue
Block a user