spacedrive/interface/hooks/useShowControls.ts

12 lines
406 B
TypeScript
Raw Normal View History

Release landing page (#1464) * start * not for this branch lol * fix dates * fix spacing * revert mistake * progress * blog * improve wording * more blog * more blog moment * moreee blog * cant spell can i * bloggggg * change name * some rambling * sentence meowment * merge * prep * perfect app ui template for landing * updated landing image * fix border * section * fix query param handling * remove apps/snapshot * remove `WindowControls` * Playwright in setup script * `showControls` in a store * better screenshot + fixed stars with fadeout * fix show controls store mistake * begin bento boxes * bento box stuff * taggrid * release blog post: clarifying punctuation & rearrange some sentences (#1097) * landing page wip * Update index.tsx * tweak * Update pnpm-lock.yaml * Update app.webp * better app image + line animation wip * wip * tweak + image * tweaks + 60 fps ball * 60 fps platforms anim * landing updates * static globe * tweaks * device detect and dynamic imports * Accessibility and minor performance improvements from Lh report. * Update globe.webp * Improve randomness of line animation, better cloud image * isMobile vid support * Update index.tsx * new art * docs * docs * Improvements and feedback * Update index.tsx * improvements * quick art tweak * updated art * increase size * SVG animation * animations * convert platforms to arr and framer motion * new section - wip preview * remove border app animation - more animation work * mobile tweaks * tweak * duration adjustment * animation improvements * different floating times for other circles * Pricing page * tweak * optimize images, accessibility values, svg attribute cleanup * launch prep * fix blog link * adding location docs * hover effect * fixes to layout * Update index.tsx * another show controls method * use PageLayoutContext in other file * merge * desktop release download api * update publishing api * hook up desktop releases api to landing page * screenshot stuff * Delete .github/scripts/setup-system.sh * Update october-alpha-release.mdx * rotating screenshots, fixed blog and apple download chooser --------- Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com> Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me> Co-authored-by: pr <pineapplerind.info@gmail.com> Co-authored-by: ameer2468 <33054370+ameer2468@users.noreply.github.com> Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-10-11 04:05:40 +00:00
import { proxy, useSnapshot } from 'valtio';
const showControlsStore = proxy({
isEnabled: location.search.includes('showControls') || localStorage.getItem('showControls'),
transparentBg:
location.search.includes('transparentBg') || localStorage.getItem('transparentBg')
});
export const useShowControls = () => useSnapshot(showControlsStore);
export const getShowControls = () => showControlsStore;