DEMO stuff and symbol renames
This commit is contained in:
1 parent
51e5a98a92
commit
45acdd3400
15 files changed
+193
-69
No files matched your search
@@ -11,23 +11,27 @@ import clsx from "clsx";
|
||||
import { getPoints } from "@/utils/points";
|
||||
import VoiceOver from "../VoiceOver";
|
||||
import { VoiceOverMode } from "@/types/voiceOverMode";
|
||||
import { isDemoMode } from "@/utils/demoMode";
|
||||
|
||||
export default function Outro() {
|
||||
const [ resultPage, setResultPage ] = useState(0);
|
||||
const [ stepStr, setStep ] = useLocalStorage(PREF.step, "0");
|
||||
const [ pointsStr, setPoints ] = useLocalStorage(PREF.points, "0");
|
||||
const [ playersStr, setPlayers ] = useLocalStorage(PREF.players, "");
|
||||
const [ worthyWordsStr, setWorthyWords ] = useLocalStorage(PREF.worthyWords, "");
|
||||
const [ worthyWordsStr, setWorthyWords ] = useLocalStorage(PREF.worthy_words, "");
|
||||
const [ rewatchScreen, setRewatchScreen ] = useState(false);
|
||||
const [ videoEnded, setVideoEnded ] = useState(false);
|
||||
const [ videoPaused, setVideoPaused ] = useState(false);
|
||||
const [ voiceOverState, setVoiceOverState ] = useLocalStorage(PREF.voiceover, "off");
|
||||
const [ boughtHintsStr, setBoughtHints ] = useLocalStorage(PREF.boughtHints, "");
|
||||
const [ voiceOverState, setVoiceOverState ] = useLocalStorage(PREF.voice_over, "off");
|
||||
const [ boughtHintsStr, setBoughtHints ] = useLocalStorage(PREF.bought_hints, "");
|
||||
const points = useMemo(() => {
|
||||
return getPoints();
|
||||
}, [pointsStr]);
|
||||
const outroVideoRef = useRef<HTMLVideoElement | null>(null);
|
||||
|
||||
const [ demoModeStr, ] = useLocalStorage(PREF.demo_mode, "");
|
||||
const demoMode = useMemo(() => isDemoMode(demoModeStr), [demoModeStr]);
|
||||
|
||||
const handleVideoClick = (e: PointerEvent<HTMLVideoElement>): boolean => {
|
||||
e.currentTarget.play();
|
||||
return true;
|
||||
@@ -57,6 +61,7 @@ export default function Outro() {
|
||||
>
|
||||
<source src="/res/outro/testoutro.webm" type="video/webm"/>
|
||||
</video>
|
||||
{ demoMode ? <ChargedButton onAction={() => { setResultPage(1); }}>DEMO SKIP</ChargedButton> : null }
|
||||
{ !videoEnded && videoPaused ?
|
||||
<div className={styles["pause-screen"]}>
|
||||
<Image src="/icons/pause.svg" alt="Pause Icon" width={48} height={48}/>
|
||||
@@ -130,6 +135,10 @@ export default function Outro() {
|
||||
<p>Ihr habt die Tour mit <b>{points}</b> Rufpunkten abgeschlossen.</p>
|
||||
</div>
|
||||
}
|
||||
{ demoMode ? <ChargedButton onAction={() => {
|
||||
localStorage.clear();
|
||||
setStep("0");
|
||||
}} style={{position: "absolute", scale: "0.75", top: "2%", left: "1%"}}>DEMO BEENDEN</ChargedButton> : null }
|
||||
</div>
|
||||
)
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user