mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-12 02:43:50 +00:00
improvements
- stage manager sees timer with negative values - time up only shows if timer has been running - use spacebar to toggle navbar - pip shows times with delays improve iterate
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { Link, Redirect } from 'react-router-dom';
|
||||
import { Image } from '@chakra-ui/react';
|
||||
import { AnimatePresence, motion } from 'framer-motion';
|
||||
import { useState } from 'react';
|
||||
import { useState, useEffect } from 'react';
|
||||
import tinykeys from 'tinykeys';
|
||||
import navlogo from '../../../assets/images/logos/LOGO-72.png';
|
||||
import style from './NavLogo.module.css';
|
||||
|
||||
@@ -12,6 +13,18 @@ export default function NavLogo() {
|
||||
setShowNav(!showNav);
|
||||
};
|
||||
|
||||
// Handle keyboard shortcuts
|
||||
useEffect(() => {
|
||||
let unsubscribe = tinykeys(window, {
|
||||
Space: () => {
|
||||
setShowNav((s) => !s);
|
||||
},
|
||||
});
|
||||
return () => {
|
||||
unsubscribe();
|
||||
};
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<motion.div
|
||||
initial={{ opacity: 0.5 }}
|
||||
|
||||
Reference in New Issue
Block a user