diff --git a/packages/client/src/components/Talk/index.jsx b/packages/client/src/components/Talk/index.jsx index 33f21e77..3de99fc6 100644 --- a/packages/client/src/components/Talk/index.jsx +++ b/packages/client/src/components/Talk/index.jsx @@ -7,6 +7,12 @@ import dark from '@/assets/img/duck_index.png'; const Talk = (props) => { const {position, text, curPlayer, step, sample } = props; + + const skip = () => { + // 阻止冒泡 + event.stopPropagation(); + props.onSkip(); + }; return (
@@ -31,7 +37,7 @@ const Talk = (props) => {
{step} / 9
{curPlayer?.name || 'Mistery Duck'}:
-
Click any button to continue
+
Skip The Tutorial {'>'}
diff --git a/packages/client/src/components/Talk/styles.scss b/packages/client/src/components/Talk/styles.scss index b24a153b..a438164f 100644 --- a/packages/client/src/components/Talk/styles.scss +++ b/packages/client/src/components/Talk/styles.scss @@ -45,6 +45,8 @@ position: absolute; top: -40px; right: 0px; + display: flex; + align-items: center; } } } diff --git a/packages/client/src/pages/game/index.tsx b/packages/client/src/pages/game/index.tsx index c8a1e1c5..d02bd9cc 100644 --- a/packages/client/src/pages/game/index.tsx +++ b/packages/client/src/pages/game/index.tsx @@ -458,6 +458,12 @@ const Game = () => { } } + const onSkip = async () => { + setTalked('true') + localStorage.setItem('talked', 'true') + return + } + const blockTime = BLOCK_TIME[network?.publicClient?.chain?.id] return ( { } { - (curPlayer && percentage == 100 && (talked == 'false')) ? : null + (curPlayer && percentage == 100 && (talked == 'false')) ? : null }