From 9fbb9e785a6e4007e6ce58b1749a8d84b28913a4 Mon Sep 17 00:00:00 2001 From: gww Date: Wed, 21 Jan 2026 13:02:14 +0800 Subject: [PATCH] =?UTF-8?q?logo=E5=AD=97=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/(tabs)/index.tsx | 89 +++++++++++++++++++++++++----- components/ParallelogramButton.tsx | 34 ++++++------ 2 files changed, 91 insertions(+), 32 deletions(-) diff --git a/app/(tabs)/index.tsx b/app/(tabs)/index.tsx index 2ec0e6b..ccd855a 100644 --- a/app/(tabs)/index.tsx +++ b/app/(tabs)/index.tsx @@ -8,6 +8,7 @@ import { router, useFocusEffect } from 'expo-router' import { observer } from 'mobx-react-lite' import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react' import { ActivityIndicator, RefreshControl, TextInput } from 'react-native' +import { Canvas, Paragraph as SkiaParagraph, Skia, useFonts } from '@shopify/react-native-skia' import ParallelogramButton from '@/components/ParallelogramButton' import ParallelogramGridItem from '@/components/ParallelogramGridItem' @@ -575,17 +576,62 @@ const GooActions = observer(function GooActions({ gooPoints, on )} - - + */} ) }) +const DuooomiLogo = memo(function DuooomiLogo() { + const fontMgr = useFonts({ + System: [], + }) + + const paragraph = useMemo(() => { + if (!fontMgr) return null + const para = Skia.ParagraphBuilder.Make({}, fontMgr) + .pushStyle({ + color: Skia.Color('#FFFFFF'), + fontSize: 18, + fontFamilies: ['System'], + fontStyle: { weight: 900 }, + shadows: [ + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: -1, y: -1 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: 1, y: -1 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: -1, y: 1 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: 1, y: 1 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: -1, y: 0 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: 1, y: 0 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: 0, y: -1 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: 0, y: 1 } }, + ], + }) + .addText('DUOOOMI') + .build() + + para.layout(200) + return para + }, [fontMgr]) + + if (!paragraph) return null + + const width = 200 + const height = 40 + const textHeight = paragraph.getHeight() + const y = (height - textHeight) / 2 + + return ( + + + + ) +}) + type HeroCircleProps = { selectedItem: MediaItem | null onQuickGen: () => void @@ -602,9 +648,27 @@ const HeroCircle = observer(function HeroCircle({ selectedItem, return ( - + + + + + + { + if (!isAuthenticated) { + router.push('/auth') + } else { + router.push('/pointList') + } + }} + onOpenSearch={onOpenSearch} + /> + + + - + {existItem && ( @@ -634,17 +698,12 @@ const HeroCircle = observer(function HeroCircle({ selectedItem, - { - if (!isAuthenticated) { - router.push('/auth') - } else { - router.push('/pointList') - } - }} - onOpenSearch={onOpenSearch} - /> + + + ) diff --git a/components/ParallelogramButton.tsx b/components/ParallelogramButton.tsx index bab9229..1375112 100644 --- a/components/ParallelogramButton.tsx +++ b/components/ParallelogramButton.tsx @@ -34,14 +34,14 @@ const ParallelogramButton = memo(function Parallelogra fontStyle: { weight: 700 }, shadows: [ // 黑色描边效果(略微偏移,避免过粗) - { color: Skia.Color('#000000'), blurRadius: 0, offset: { x: -0.5, y: -0.5 } }, - { color: Skia.Color('#000000'), blurRadius: 0, offset: { x: 0.5, y: -0.5 } }, - { color: Skia.Color('#000000'), blurRadius: 0, offset: { x: -0.5, y: 0.5 } }, - { color: Skia.Color('#000000'), blurRadius: 0, offset: { x: 0.5, y: 0.5 } }, - { color: Skia.Color('#000000'), blurRadius: 0, offset: { x: -0.5, y: 0 } }, - { color: Skia.Color('#000000'), blurRadius: 0, offset: { x: 0.5, y: 0 } }, - { color: Skia.Color('#000000'), blurRadius: 0, offset: { x: 0, y: -0.5 } }, - { color: Skia.Color('#000000'), blurRadius: 0, offset: { x: 0, y: 0.5 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: -0.5, y: -0.5 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: 0.5, y: -0.5 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: -0.5, y: 0.5 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: 0.5, y: 0.5 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: -0.5, y: 0 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: 0.5, y: 0 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: 0, y: -0.5 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: 0, y: 0.5 } }, ], }) .addText(state) @@ -60,14 +60,14 @@ const ParallelogramButton = memo(function Parallelogra fontFamilies: ['System'], fontStyle: { weight: 900 }, shadows: [ - { color: Skia.Color('#000000'), blurRadius: 0, offset: { x: -1, y: -1 } }, - { color: Skia.Color('#000000'), blurRadius: 0, offset: { x: 1, y: -1 } }, - { color: Skia.Color('#000000'), blurRadius: 0, offset: { x: -1, y: 1 } }, - { color: Skia.Color('#000000'), blurRadius: 0, offset: { x: 1, y: 1 } }, - { color: Skia.Color('#000000'), blurRadius: 0, offset: { x: -1, y: 0 } }, - { color: Skia.Color('#000000'), blurRadius: 0, offset: { x: 1, y: 0 } }, - { color: Skia.Color('#000000'), blurRadius: 0, offset: { x: 0, y: -1 } }, - { color: Skia.Color('#000000'), blurRadius: 0, offset: { x: 0, y: 1 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: -1, y: -1 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: 1, y: -1 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: -1, y: 1 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: 1, y: 1 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: -1, y: 0 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: 1, y: 0 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: 0, y: -1 } }, + { color: Skia.Color('#323232'), blurRadius: 0, offset: { x: 0, y: 1 } }, ], }) .addText(label) @@ -124,7 +124,7 @@ const ParallelogramButton = memo(function Parallelogra /> {/* 边框 - 平行四边形 */} - + {/* 英文 state 标签 - 左上角,以左下角为中心,逆时针旋转 15 度 */} {stateParagraph && (() => {